Changing parameters that aren't attached to a bone?

Ok, so I have a basic idea of how to alter the paramaters in a character's bone using a script; get the selected item, find the skeleton, find the bone, find the parameters, then change the parameters (such as the limits, and whether they're locked or not).

But how would I do this if the parameter in question is in the main part of the character? For example, the body morphs for Genesis are all located in the main "Genesis" part rather than in any particular bone.

Comments

  • Are you asking how you'd get the figure from a bone selection? Use getSkeleton() on the bone.

  • rbtwhizrbtwhiz Posts: 2,181

    The "main part of the character" is its skeleton. So, given your sequence, omit the "find the bone" part and access the properties associated with the skeleton.

    DzSkeleton and DzBone both derive from DzNode, which itself derives from DzElement. DzElement provides the API for accessing properties... therefore, due to the nature of inheritance (a critical concept of Object Oriented Programming to understand), you can "find the parameters" on the skeleton using the same methods you do for a bone... or any other element.

    Having said that, and being as you mention morphs specifically, I suspect what you don't understand yet are the intricacies of object construction; how the data of the object is structured - i.e. where the morphs actually live and how to get to the properties that control them. More specifically... that a DzNode can have a DzObject, and that object has a modifier stack... that DzMorph is a type of DzModifier, and that it has at least one property used to attenuate the amount of DzMorphDeltas applied.

    I would suggest spending some time studying the Samples posted in the Properties section. What I have there shows a simpler way of accessing properties associated with a given node.

    -Rob

Sign In or Register to comment.