View Full Version : Get Base Object type ?
zhucde 06-16-2006, 10:18 AM we can know the current selection is or not a box like this:
if classof selection[j]== Box
alse for sphere:
if classof selection[j]== Sphere,
but if they are all turned to Editable Mesh,
how can we know it's base object ? i mean how can we know is it derived from box or sphere or
others ?
|
|
f97ao
06-16-2006, 02:39 PM
Do something like this
classOf($.baseObject)==Editable_Poly
classOf($.baseObject)==Editable_Mesh
/Andreas
Jon-Huhn
06-16-2006, 05:50 PM
Maybe I'm not understanding the situation correctly, but if you convert a box or sphere to an editable poly or editable mesh, any connection to the original parametric object is lost... it's now just a collection of verts and polygons, so to speak.
we can know the current selection is or not a box like this:
if classof selection[j]== Box
alse for sphere:
if classof selection[j]== Sphere,
but if they are all turned to Editable Mesh,
how can we know it's base object ? i mean how can we know is it derived from box or sphere or
others ?
If the top of the stack returns Editable_Mesh because of, say, a Mesh_Select modifier on top of a sphere, you can ask for the class of the base object as mentioned before:
if classof $.baseobject == Sphere do...
But if the sphere was COLLAPSED to Editable_Mesh, then the base object IS Editable_Mesh and you cannot know what it used to be before the collapsing.
zhucde
06-17-2006, 05:53 AM
thank you all
i knowed that there is no way to get origin object when it is turned to editmesh.
CGTalk Moderation
06-17-2006, 05:53 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.