Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete all 2D entities

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
sanj.shah
479 Views, 3 Replies

Delete all 2D entities

Hi,

 

Has anyone seen a script that will delete all entites except 3D?

 

Thanks

3 REPLIES 3
Message 2 of 4
Swordslayer
in reply to: sanj.shah

Well, first it would be helpful if you could elaborate on what you mean by 2D entities (splines, even if they are 3D splines? what about renderable splines? etc.). If you only want to keep geometry objects, this will be enough:

 

delete (for obj in objects where NOT isKindOf obj GeometryClass collect obj)

 

 

Message 3 of 4
sanjshah
in reply to: sanj.shah

Thanks for you replies, when I noted 2D i was refering to enteites like splines etc that are usually importrde from AutoCAD. I would like to keep 3D objects, cameras etc.

 

I tried the SwordSlayers script but it seems that it deletes too much items even 3D objects.

Message 4 of 4
Swordslayer
in reply to: sanjshah

Yeah, that's why I asked for further specification, although 'splines etc' is still not all that much better. Anyway, you can use delete shapes to delete all the splines and for the rest... that depends on what it is.. If you'd for example want to delete all shapes that are flat, you could do it this way:

 

delete (for obj in shapes where abs (obj.max - obj.min).z < 1e-3 collect obj)

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report