Convert Instance to model / geometry

Discussions regarding modelling with SOFTIMAGE©
Post Reply
tarkovsky
Posts: 59
Joined: 05 Oct 2012, 20:02

Convert Instance to model / geometry

Post by tarkovsky » 01 Nov 2016, 16:26

Hi all.
I need to export a file for someone else to use in Sketchup. I used a lot of instanced geometry (no ICE).
Found various scripts for converting the instances to models, but none seem to work on 2015.

Thanks!

User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Convert Instance to model / geometry

Post by Draise » 01 Nov 2016, 16:46

I think freezing them turns them to normal objects.

User avatar
gaboraa
Posts: 314
Joined: 16 Apr 2010, 23:14

Re: Convert Instance to model / geometry

Post by gaboraa » 01 Nov 2016, 17:28

below script seems to work for me

Code: Select all

si = Application
sel = si.Selection
count = si.Selection.Count

selection = [sel[i] for i in range(count) if str(si.ClassName(sel[i])) == 'Model' and sel[i].ModelKind == 2]

for i in selection:
    d = si.Duplicate("B:"+str(i.InstanceMaster))
    si.MatchTransform(d, i)
    if i.Parent.Name != si.ActiveProject.ActiveScene.Root.Name:
        si.ParentObj(i.Parent, d)
    si.DeleteObj(i)

tarkovsky
Posts: 59
Joined: 05 Oct 2012, 20:02

Re: Convert Instance to model / geometry

Post by tarkovsky » 02 Nov 2016, 15:20

gaboraa wrote:below script seems to work for me

Code: Select all

si = Application
sel = si.Selection
count = si.Selection.Count

selection = [sel[i] for i in range(count) if str(si.ClassName(sel[i])) == 'Model' and sel[i].ModelKind == 2]

for i in selection:
    d = si.Duplicate("B:"+str(i.InstanceMaster))
    si.MatchTransform(d, i)
    if i.Parent.Name != si.ActiveProject.ActiveScene.Root.Name:
        si.ParentObj(i.Parent, d)
    si.DeleteObj(i)
Fantastic. Thought I tried that one - dunno why it didn't work the first time. Thanks!

@Draise: No the Instances don't become models by freezing them :)

User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Convert Instance to model / geometry

Post by Draise » 02 Nov 2016, 16:47

Ah. I was thinking clones. x_x

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests