Remove All texture projections form an object.

Discussions concerning programming of SOFTIMAGE©
Post Reply
User avatar
Pete
Posts: 118
Joined: 16 Jun 2009, 09:28

Remove All texture projections form an object.

Post by Pete » 30 Jan 2014, 03:28

Hi there,

Sorry but this is probably a pretty basic script. I'm just not sure how to approach it so I thought I'd ask here for a little help.
Just wondering, how would I go about removing any texture projections from an object through scripting??

If anyone could point me in the right direction it'd be great!
Thanks,
Pete

User avatar
csaez
Posts: 253
Joined: 09 Jul 2012, 15:31
Skype: csaezmargotta
Location: Sydney, Australia
Contact:

Re: Remove All texture projections form an object.

Post by csaez » 30 Jan 2014, 04:00

This python snippet should do the trick :)

Code: Select all

get_uvs = lambda x: [p for c in x.ActivePrimitive.Geometry.Clusters
                     for p in c.Properties if p.Type == "uvspace"]

for o in Application.Selection:
    Application.DeleteObj(get_uvs(o))

User avatar
Pete
Posts: 118
Joined: 16 Jun 2009, 09:28

Re: Remove All texture projections form an object.

Post by Pete » 02 Feb 2014, 00:19

Awesome! thanks mate!

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests