Digital Art Zone

 
     
New to Daz SDK - Manipulating Joints via Scripts?
Posted: 24 May 2013 10:13 PM   [ Ignore ]
Member
Rank
Total Posts:  88
Joined  2006-01-29

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.

Profile
 
 
Posted: 25 May 2013 03:13 AM   [ Ignore ]   [ # 1 ]
Active Member
Avatar
RankRank
Total Posts:  708
Joined  2012-07-21

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

 Signature 

my freebies at ShareCG
me at DeviantArt

Profile
 
 
Posted: 25 May 2013 05:13 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  14000
Joined  2003-10-09

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.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 25 May 2013 06:59 AM   [ Ignore ]   [ # 3 ]
Member
Rank
Total Posts:  88
Joined  2006-01-29

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

Profile
 
 
Posted: 25 May 2013 09:08 AM   [ Ignore ]   [ # 4 ]
Active Member
Avatar
RankRank
Total Posts:  708
Joined  2012-07-21

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); 
 Signature 

my freebies at ShareCG
me at DeviantArt

Profile
 
 
Posted: 25 May 2013 10:07 AM   [ Ignore ]   [ # 5 ]
Member
Rank
Total Posts:  88
Joined  2006-01-29

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

Profile