NoFlame
05-31-2011, 08:43 AM
Hi there. I got a wierd problem.
I am trying use skinWrap modifier to make a mesh fit to another.
It work find when i manipulate it via UI, but not in script.
the following code explain what I am trying to do.
(
setCommandPanelTaskMode mode:#modify
sp1 = sphere()
sp2 = sphere()
bx1 = box()
sp1.radius = 10
sp2.radius = 15
sp3 = snapshot sp2
delete sp2
bx1.length = 10
bx1.width = 10
bx1.height = 10
morMod = copy(morpher())
addmodifier sp1 morMod
modPanel.setCurrentObject morMod ui:true
WM3_MC_BuildFromNode morMod 1 sp3
delete sp3
WM3_MC_SetValue morMod 1 100.0
WM3_MC_SetActive morMod 1 false
skinWpMod = copy( skin_Wrap())
addmodifier bx1 skinWpMod
modPanel.setCurrentObject skinWpMod ui:true
skinWpMod.meshList= #(sp1)
modPanel.setCurrentObject morMod ui:true
WM3_MC_SetActive morMod 1 true
)
It work well when execute it line by line but when you run the script,
the last line has no effect to box.
Is there anything I should do it in script to make it work...
Thanks.
I am trying use skinWrap modifier to make a mesh fit to another.
It work find when i manipulate it via UI, but not in script.
the following code explain what I am trying to do.
(
setCommandPanelTaskMode mode:#modify
sp1 = sphere()
sp2 = sphere()
bx1 = box()
sp1.radius = 10
sp2.radius = 15
sp3 = snapshot sp2
delete sp2
bx1.length = 10
bx1.width = 10
bx1.height = 10
morMod = copy(morpher())
addmodifier sp1 morMod
modPanel.setCurrentObject morMod ui:true
WM3_MC_BuildFromNode morMod 1 sp3
delete sp3
WM3_MC_SetValue morMod 1 100.0
WM3_MC_SetActive morMod 1 false
skinWpMod = copy( skin_Wrap())
addmodifier bx1 skinWpMod
modPanel.setCurrentObject skinWpMod ui:true
skinWpMod.meshList= #(sp1)
modPanel.setCurrentObject morMod ui:true
WM3_MC_SetActive morMod 1 true
)
It work well when execute it line by line but when you run the script,
the last line has no effect to box.
Is there anything I should do it in script to make it work...
Thanks.
