PDA

View Full Version : Scale tool for an easy rig !


JeFArs
10-02-2005, 04:28 PM
I know that I am new on forum, but I tien showed you this.
(sorry for my english)

They is only lines of codes, but you can clean it and test it:

----------
Fn nubBone =

(

undo On

(

for x in objects do

(

if ((classOf x.baseObject) == boneGeometry) and (x.children[1] == undefined) do

(

x.length = ((x.width + x.height) / 2)

)

)

)

)



rollout _RiggingTools "Rigging Tools"

(

GroupBox grp4 "Scale object Unit in World reference" pos:[24,96] width:192 height:135

radiobuttons rdo_scope2 "" pos:[47,115] width:146 height:16 labels:#("Selection", "Scene") columns:2

label lbl1 "Scale Factor :" pos:[38,138] width:70 height:19

spinner spn_Rescale "" pos:[125,137] width:75 height:16 range:[0,1000,1]

button btn_rescale "Rescale" pos:[35,162] width:170 height:25

button btn_nublenght "Reset Nub" pos:[35,195] width:80 height:25

button btn_resetstrech "Reset Bone" pos:[125,195] width:80 height:25



on btn_rescale pressed do

(

if rdo_scope2.state==1 then rescaleWorldUnits spn_Rescale.value #selOnly

else rescaleWorldUnits spn_Rescale.value

)



on btn_nublenght pressed do

(

nubBone()

)



on btn_resetstrech pressed do

(

undo "Reset Stretch" on

(

for b in selection do b.resetBoneStretch()

)

)

----------

If you want to add something, go, post!

CGTalk Moderation
10-02-2005, 04:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.