Determining the selected parameter(s)
metrantor
Posts: 10
Hello folks,
actually, I have two questions:
1) is there a way to find out in a script which single parameter or group of parameters was selected in the UI parameter tab?
2) I would like to create a keyframe for the selected parameter in the current, the previous, and the following frame and set the mode of change to constant. Is there an example somewhere?
Comments
For (1), I've asked this question myself and apparently there's no way. The SDK might have that functionality but not for scripting.
This works for me:
I've forgotten how I found this, but I think it was mostly from a post by Rob a few years ago, and/or from mCasual, plus a bit of experimentation.
DzEnumProperty::setValueFromString()
DzFloatProperty::setValue()
DzIntProperty::setValue()
...etc., plus the various setKey*() functions (I think).
Interesting ... 'getNodeEditor()' ?? Doesn't appear to be documented.
Found Rob's post that I referred to above: Self-Discovery
I regard it as the most important and useful item ever posted to the SDK/Scripting Forums.
The method of iterating over members can be used to discover useful undocumented info about any descendant of an ECMASCript Object - just remember that undocumented stuff is not supported: "IF you're up for a bit of self-discovery (i.e. no published documentation) and you realize that what you discover isn't officially supported. Meaning, it may change, without warning or notification."
See also: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/properties/node_properties/start
Hey, Praxis,
that was exactly what I have been looking for! Thank you very much!
You are welcome.
P.