Notifications
Clear all
[Closed] Explode Script?
Sep 27, 2005 1:34 pm
I’m looking for a script that would take a piece of geometry and detach every face into seperate objects.
Does anybody know if one exsists?
Thanks.
4 Replies
Sep 27, 2005 1:34 pm
Hi Maven,
This is easy with a script, but you don’t need one.
From the modify panel, go to the face SO level, select all of the faces and then explode them to objects with a face tolerence value of 0.
This will detach every face to a seperate object.
If you did want to do it with a script it would loko a little something like this.
-- [www.joshuanewman.net]( http://www.joshuanewman.net)
obj=selection[1]
while obj.faces.count>0 do
(
newmesh=editable_mesh() -- create an empty mesh object
newmesh.pos=obj.pos -- position the new mesh
newmesh.name=(obj.name+"_"+(i as String)) -- name the new mesh
newmesh.mesh=meshop.detachFaces obj #(1) delete:true asmesh:true
update newmesh -- update the new mesh
update obj -- update the old mesh
)
If you want this to be a function you would structure it differently.
J¬
Sep 27, 2005 1:34 pm
ah-ha! I guess you can see it isn’ the same!
-- [www.joshuanewman.net]( http://www.joshuanewman.net/)
obj=selection[1]
while obj.faces.count>0 do
(
newmesh=editable_mesh() -- create an empty mesh object
newmesh.pos=obj.pos -- position the new mesh
newmesh.name=(obj.name+"_"+(i as String)) -- name the new mesh
fce=(meshop.getpolysusingface obj #(1) threshold:100) as array
newmesh.mesh=meshop.detachFaces obj fce delete:true asmesh:true
update newmesh -- update the new mesh
update obj -- update the old mesh
)
Cheers,
J¬