[Closed] Detach with edit poly modifier
Hi guys!
I麓m new in this forum, and I麓ve got some problems with a script. I was searching by the forum and I found a thread with a script to detach a element sub-object of edit.poly modifier, but I麓ve got some problems yet.
This is the code
(
detached = #()
selectedObjs = getCurrentSelection()
for obj in selectedObjs do
(
--obj = selection[1]
puppet = undefined
max modify mode
modPanel.setCurrentObject obj.modifiers[#Puppet]
subobjectlevel=5
max select all
nameParts = filterString obj.name "_"
puppetName = substituteString obj.name nameParts[3] "puppet"
--obj.modifiers[#Puppet].ButtonOp #DetachFace
obj.modifiers[#Puppet].DetachToObject puppetName
--
try
(
puppet = execute ("$" + puppetName)
print puppet
append detached puppet
)
catch()
subobjectlevel=0
)
print detached
select detached
)
I need detach the element of edit poly, introduce it in an array, and move the pivot of these news object to 0,0,0 position.
But when I evaluate the script, detach the object, and the script delete all modifiers of the bone ( the edit modifier it is in a bone ), and I don麓t no why.
I was searching a solution too for move the pivot of the object detached, because when I detach the object, catch the properties of the bone, and a bone you can麓t move the pivot. I think need attach the new element detached to box converted in a edit poly ( for example) and delete the box in subobject mode.
If anybody have got any idea, o can help me, I will be grateful.
Thanks you in advance people!!