PDA

View Full Version : "Skin.Always Deform" in script?


stefan
06-15-2008, 03:11 PM
Please help,
As many of U I also found that $.modifiers[#Skin].always_deform = off or on does not works in script. It change button on/off but it does nothing. Is there any workaround for reseting skin modifier? Thanks.

Bobo
06-15-2008, 03:43 PM
Please help,
As many of U I also found that $.modifiers[#Skin].always_deform = off or on does not works in script. It change button on/off but it does nothing. Is there any workaround for reseting skin modifier? Thanks.

Is your Skin modifier displayed in the modify panel while you are setting the property?

stefan
06-15-2008, 04:30 PM
Sorry, I do not understund Your question.
But there is only skin in the stack. I change position of bones. Mesh is screwed. If I click alwaysdeform off and on with mouse it jumps to default.
If I turn it off with script on selected object or on deselected object it does something but not what I woud expect. Like it is resetted for current frame and on other frames it jumps back to screwed. and when I turn it on with script it jumps back completely.

PS: "Bobo" U shoud take a rest maybe ;). I am madly happy :D that U are answering my question but man it is sunday and there is thousend other questions like this one. But Thanks and Have a nice day.

IkerCLoN
06-15-2008, 04:46 PM
What Bobo means (I guess) is that you should display your modify panel for the property to work, using...

max modify mode

... before setting the 'always deform' property. Take a look because maybe this is the problem...

p.s.: by the way, stefan, very nice works in your portfolio! ;)

stefan
06-15-2008, 06:01 PM
But I found that when I use always_deform = off in script then I can change positions of bones without deforming the mesh. After that I turn it on and it takes the new positions and deforms corectly. So when it is off it needs to have any change in bones there are driving it /skin/ . So I can made a window with on/off checkbox and change rest pose only when it is off. Or to have same functionality as was my habbit I can make a change of scelet a part of script. So turn it off move bone 10 units left move bone 10 units right turn on. It can be any part of scelet. Even with zero waights. And it is working :buttrock:.
To make it completly good I need to find a way to look to skin modifier and take one part of scelet check its's position. Move it and move it back. then it woud be name independent.

PS:man sticky points that is gr8. that is coding not my on-off 2 days headbreaking

stefan
06-23-2008, 03:36 PM
Coud any one help

rollout ResetSkin "ResetSkin"
(
pickButton btn1 "PickSkin" pos:[30,25] width:169 height:40
pickButton btn2 "PickAnyBone" pos:[30,75] width:169 height:20
button btn3 "Reset" pos:[30,110] width:169 height:20

on btn1 picked obj do
(
btn1.text = obj.name
Global Skinned = obj
)
on btn2 picked Goo do
(
btn2.text = Goo.name
Global Bonz= Goo
)
on btn3 pressed do
(
Sel=Selection as array
Skinned.modifiers[#Skin].always_deform=off
move Bonz [0,10,0] animate off
redrawViews
move Bonz [0,-10,0] animate off
redrawViews
Skinned.modifiers[#Skin].always_deform=on
select Sel
)
)
createDialog ResetSkin width:234 height:180


Why this does not work on some computers? I was happy becouse I runned it on my laptop at home and it worked. But on my comp at work it does not work. Is it in code or something in preferencies?

CGTalk Moderation
06-23-2008, 03:36 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.