New to Daz SDK - Manipulating Joints via Scripts?

Joe827Joe827 Posts: 225
edited December 1969 in Daz SDK Developer Discussion

When somone has a moment, do you know where I can find an example script for manipulating joints on a figure. Just trying to build my skills, and I haven't had much luck with my searches.

-Joe.

Comments

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    Are you looking for help with scripts or plugins ?
    If it's scripts, i can hook you up with some examples.

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

    What sort of manipulation do you have in mind? If you want to pose figures, try saving a Pose Preset using the File>Save as>Deprecated menu in .dsa ASCII format and pick the result apart. If you want to edit the joint properties then I'm not sure what there is in the way of example code, especially for the newer TriAx trigging system.

  • Joe827Joe827 Posts: 225
    edited December 1969

    To give you some more background, I am a pose artist who sells pose packs for M4 and V4. Typically, I create poses for M4 and then transposes them to V4 by apply the M4 pose to V4 and then adjusting it to fit her unique geometry. There are ~5 joints that I always have to adjust to get V4's feet on the ground and to get her shoulders looking right. I am hoping to automate some of this with a script that I can reuse.

    It could still be an ugly process, but it is worth a try...

    -Joe

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    With only that one Victoria in your scene, it could be as simple as this :

    // Find the joint you want to adjust
    var oNode = Scene.findNodeByLabel("lCollar");
    
    // If you need the current value to calculate the new value,
    // get the current value of the property you want to adjust
    var fOldValue = oNode.findPropertyByLabel("Twist").getValue();
    
    // Set a new value for that property
    var fNewValue = 4.45; // Any value or calculation of your choice
    oNode.findPropertyByLabel("Twist").setValue(fNewValue);
    
  • Joe827Joe827 Posts: 225
    edited December 1969

    Thanks. I'll play around with it. Much appreciated.

Sign In or Register to comment.