Setting parameter value by name
m.bulmer_ecbc0d73d4
Posts: 0
I'm aiming to migrate my scripts from PoserPython to DAZ Studio but so far I am completely stuck with how to set a parameter value by name. Could someone tell me if it is possible to script something like this?
poser.Scene().Figure("SimonG2").Actor("Head").SetParameter("NoseHeight",0.5 )
I managed to do it by modifying one of the samples that went through all the nodes until I found the one I wanted, but that doesn't seem so elegant.
Thanks,
Michael
Comments
How about something like:
var oObj = actor.getObject();
if ( oObj ) {
var oMod = oObj.findModifier( “NoseHeight” );
if ( oMod ) {
if ( oMod.inherits( "DzMorph" ) {
oMod.getValueChannel().setValue( 0.5 );
}
}
}