Explode Script?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2005   #1
Explode Script?

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.
__________________
.
~MvN
~My opinions do not represent those of my employer~


 
Old 09 September 2005   #2
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
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
__________________
www.joshuanewman.net
 
Old 09 September 2005   #3
Thanks alot Jman!

But I meant to say polygons not faces. Is it the same?
__________________
.
~MvN
~My opinions do not represent those of my employer~


 
Old 09 September 2005   #4
ah-ha! I guess you can see it isn' the same!


-- 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
__________________
www.joshuanewman.net
 
Old 09 September 2005   #5
thanks again.
__________________
.
~MvN
~My opinions do not represent those of my employer~


 
Old 09 September 2005   #6
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:17 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.