Re: [scripting] Findobjects

Date : Thu, 27 Sep 2007 09:47:59 +0300
To : <XSI(at)Softimage.COM>
From : "Alexander Hemery" <vortex(at)fhw.gr>
Subject : Re: [scripting] Findobjects
Hi Julian,

Thanks! Will give it a go.
By the way, I used to know a Julian Johnson ..we worked together in Glasgow around 2003.
Is it you man ? :)


Alex.

----- Original Message ----- From: "Julian Johnson" <julian(at)exch.demon.co.uk>
To: <XSI(at)Softimage.COM>
Sent: Wednesday, September 26, 2007 6:17 PM
Subject: Re: [scripting] Findobjects



Alexander Hemery wrote:
What I'm trying to do is .. while in a for loop going through each object in a scene, delete all material clusters but leave the texture coordinates intact.
I would use DeleteObj oObj & "*.cls.Polygon*", but there are some material clusters that are renamed randomly.
Any help appreciated!



Hi Alex,

Could you do this:

oDelete = XSIFactory.CreateObject('XSI.Collection')

oFoundClusters = Application.FindObjects("","{600E50F1-52FC-11D2-A924-00A024190119}")
for x in oFoundClusters:
for y in x.LocalProperties:
if y.Type == 'material':
oDelete.Add(x)
Application.DeleteObj(oDelete)


Just check to see if there's a material node in the Local Properties of the cluster?

Julian
========================================

This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Men-from-Mars unless specifically stated.

If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.