Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

GF3 pose usage with GF8 correction script help

$
0
0

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 figure
var item = Scene.getPrimarySelection();

if ( item.inherits( "DzBone" ))	{
	item = item.getSkeleton();
	}

//select the Hip node of the figure
var 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)
	}

 


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>