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

How to restore bone's center_point and end_point to default by script?

$
0
0

There are some high heels gonna change feet bone's center_point and end_point when wearing them. These high heels run following code in their .duf file:

{

"id" : "lFoot",

"url" : "/data/path/HighHeel.dsf#lFoot",

"name" : "lFoot",

"label" : "Left Foot",

"parent" : "#lShin",

"preview" : {

"type" : "bone",

"oriented_box" : {

"min" : [ -4.58, -13.362, -1.964 ],

"max" : [ 4.016, -1.565, 10.886 ]

},

"center_point" : [ 20.50789, 8.32, -4.65 ],

"end_point" : [ 22.5267, 5.493055, 0.3605399 ],

"rotation_order" : "ZYX"

}

},

 

It changes foot bone's head and tail's position, which changes character's zero pose forever. That is a big problem in some case.

When this happen, if you run "bone.clearAllTransformData()" in script, it will not restore to default pose, it will still be in high heeled pose.

 

So, How to restore a bone's center_point and end_point to default position by script?

Thanks!

 


Viewing all articles
Browse latest Browse all 1036

Trending Articles



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