Script to go right to parameter

I want to create a script that selects a specified parameter in the parameters tab.  For example I run my script and it navigates to path "Actor/Head/Ears/Fantasy SciFi/" and highlights "Ears Elf".  Can this even be done?  Or at the very least a script that fills in the filter field so that it'll show my parameter. 

I've tried this:

var item = Scene.findNodeByLabel( "Genesis 8 Female" );

var param = item.findPropertyByLabel( "Ears ELf" );

if ( param ) {

param.setValue( 1 );

}

But Param comes up nil.

Any help wpuld be apreciated.

Comments

  • algovincianalgovincian Posts: 2,610

    RainGoon said:

    I want to create a script that selects a specified parameter in the parameters tab.  For example I run my script and it navigates to path "Actor/Head/Ears/Fantasy SciFi/" and highlights "Ears Elf".  Can this even be done?  Or at the very least a script that fills in the filter field so that it'll show my parameter. 

    I've tried this:

    var item = Scene.findNodeByLabel( "Genesis 8 Female" );

    var param = item.findPropertyByLabel( "Ears ELf" );

    if ( param ) {

    param.setValue( 1 );

    }

    But Param comes up nil.

    Any help wpuld be apreciated.

    It's been a while since I've done any DS scripting, but I believe findPropertyByLabel is case sensitive. I suspect the "L" may be the issue.

    HTH.

    - Greg

  • Thanks algovincian.  Turns out "Ears Elf" isn't a property, it's a modifier, so it can't be searched the same way as a property.  I ended up using the following.

    var par = Scene.getPrimarySelection();var obj = par.getObject();var mod = obj.findModifier("PHMEarsElf");    mod.getValueChannel().setValue( 1 );

    It still doesn't navigate to and visually highlight my parameter but I guess that's a pipe dream.  I've since abandoned that idea for a new approach.

Sign In or Register to comment.