Search and select a specific Property in the Parameter-Pane

peter_2762644peter_2762644 Posts: 53
edited December 1969 in Daz Script Developer Discussion

Hi Guys,

I'm looking for a Script-Snippet (or at least the name of the correct Class/Method, I have to use), which allows to navigate to specific Properties and/or Property-Group in the Parameter-Pane. Sometimes it's hard to change Values in the tree of hundreds of Parameters. And there are a few settings that I often use.

My Idea is now, to write a Script, which simply selects a specific Property (i.E. "Pose Controls -> Head -> Mouth -> Mouth Smile" etc.). The Script need not to change the Value, it should just locate it in the tree (or at least a Group).

I'd make a custom Dialog, place simple Buttons for "GoTo Mouth Smile Prop" and so on. Assigning this Dialog to a Keyboard-Shortcut would be very usefull.

Thx in advance,
Peter

PropPane.JPG
465 x 442 - 52K

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,938
    edited December 1969

    Can you not do this with the filter box at the top of the pane, and if desied by making the frequently used properties "favo(u)rites"? Finding a property by label is easy - DzElement.findPropertyByLabel (String label) (where your figure would be the DzElement) but I'm not sure how to select, or to expand the property group listing.

  • I'm interested in controlling this froms cript also. Were you able to find a solution?

  • YudinEdYudinEd Posts: 90

    where your figure would be the DzElement

    Can you tell  more about. Please. Perhaps the example of script  ... thanks in advance. 

  • Richard HaseltineRichard Haseltine Posts: 100,938

    Assuming you have your bone or figure in oMyNode, and want to get access to the parameter "MyMorph", you'd use something like

    var oMyMorphParameter = oMyNode.findPropertyByLabel( "MyMorph" );

    and then set its value using

    oMyMorphParameter.setValue( 1 );

  • YudinEdYudinEd Posts: 90

    Wow! It's really simple. I tried to make similar, but apparently I had an error in the script. I joined with other code. Now I have everything that I need for my work. Or  maybe not everything? :)))). Richard, thank tou very much. You are strongly helped out.

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

    item.select( true );       // false - not selected :)

    var oMyMorphParameter = item.findPropertyByLabel( "myMorph" );

    oMyMorphParameter.setValue( 2 );

  • Richard HaseltineRichard Haseltine Posts: 100,938

    I would check that item and myMorph were non-null and the right type of object before doing anything to them - my scripts end up so indented with nested if statements that the actual code that does something is starting at the right margin.

Sign In or Register to comment.