GF3 pose usage with GF8 correction script help
j11011
Posts: 32
Hello everyone,
first, I'm completely new to Daz scripting, and I wanted to fix a nagging issue I had with older GF3 pose presets I was using with GF8 models, the shoulder and thigh bends needed readjusting, so I looked for a quicker way to do this than manually moving sliders around and hacked together a script from an example I found that did something similar to what I wanted, it works like I expected it to on the view screen, but I'd like a comment from experienced people if this method is safe and wouldn't cause any problems?
thank you in advance
// DAZ Studio version 4.20.0.17 filetype DAZ Script//select the figurevar item = Scene.getPrimarySelection();if ( item.inherits( "DzBone" )) { item = item.getSkeleton(); }//select the Hip node of the figurevar item = Scene.findNodeByLabel( "Left Shoulder Bend" );if (item){ var correction = 45; Set_PosRot_to_Zero (item)}var item = Scene.findNodeByLabel( "Right Shoulder Bend" );if (item){ var correction = -45; Set_PosRot_to_Zero (item)}var item = Scene.findNodeByLabel( "Left Thigh Bend" );if (item){ var correction = -5.5; Set_PosRot_to_Zero (item)}var item = Scene.findNodeByLabel( "Right Thigh Bend" );if (item){ var correction = 5.5; Set_PosRot_to_Zero (item)}function Set_PosRot_to_Zero (item) { item.select( true );// print (item.name)// print ("tx: " + item.getXPosControl().getValue()) // print ("ty: " + item.getYPosControl().getValue()) // print ("tz: " + item.getZPosControl().getValue()) // print ("rx: " + item.getXRotControl().getValue()) // print ("ry: " + item.getYRotControl().getValue()) // print ("rz: " + item.getZRotControl().getValue()) var currentLShB = item.getZRotControl().getValue(); //item.getXPosControl().setValue(0) //item.getYPosControl().setValue(0) //item.getZPosControl().setValue(0) //item.getXRotControl().setValue(0) //item.getYRotControl().setValue(0) item.getZRotControl().setValue(currentLShB+correction) }
dsa
dsa
GF3toGF8 pose correction script.dsa
1K
Post edited by j11011 on
Comments
ran into a problem with the first attempt, it wouldn't work with multiple figures, it would work on the first figure in the Scene only, so I hacked together a better one, works on multiple selected figures and has an undo function