Search and select a specific Property in the Parameter-Pane
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
Comments
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?
Can you tell more about. Please. Perhaps the example of script ... thanks in advance.
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 );
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.
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.