Setting parameter value by name
![m.bulmer_ecbc0d73d4](https://secure.gravatar.com/avatar/b21ab2dcff3690772e260325681b9c5d?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2Fb21ab2dcff3690772e260325681b9c5d_100.png)
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 );
}
}
}