Digital Art Zone

 
     
DzNode scale controls changed in DS4.5?
Posted: 09 September 2012 08:30 PM   [ Ignore ]
Active Member
RankRank
Total Posts:  901
Joined  2009-12-07

Hi

I’m investigating some script changes since upgrading to DS4.5 and have tracked it down (I think) to possible changes to the DzNode.getScaleControl functionality since DS4.0.

There are 4 related functions

getScaleControl()
getXScaleControl()
getYScaleControl()
getZScaleControl() 


In DS4, after calling setValue() on any of the scale controls, DS would propagate the W scale to the underlying X, Y and Z scale controls and reset the W scale control to 1, as follows:

//Node's initial scale vector (1, 1, 1, 1)
getScaleControl().setValue(2)
//Node's final scale vector (1, 2, 2, 2) 


It appears now that in DS4.5 the W scale is not propagated to the underlying controls, as follows:

//Node's initial scale vector (1, 1, 1, 1)
getScaleControl().setValue(2)
//Node's final scale vector (2, 1, 1, 1) 

 
Can anyone pls confirm whether the scale controls implementation was changed in DS4.5?

Thanks

 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 10 September 2012 06:25 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13654
Joined  2003-10-09

Looks plausible - formerly drop to floor did the same, switching the scale from the master control to the axis controls but now it doesn’t (and drop to floor is a script).

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 10 September 2012 03:13 PM   [ Ignore ]   [ # 2 ]
Member
Rank
Total Posts:  62
Joined  2004-12-26

The set value on the properties did not change, however there was a new variant of DzNode::setLocalTransform that was written that tries to maintain the value in the general scale property.  DzNode::setWSTransform now calls this new variant.  So depending on what you do before or after the setValue on a scale property, it may cause what you are seeing.  The new variant of setLocalTransform will cause the general scale to be set to a non-one value when any two of the component scales matches values.

Profile