Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Python introspection...

Python introspection...

2005-06-13       - By Jerry Gamache

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

I think getattr if what you want, especially with something in the third
argument:

Application.LogMessage(help(getattr))
oObj = Application.Selection(0)
if getattr(oObj, "Properties", None):
  Application.LogMessage("Yea")
else:
  Application.LogMessage("Nay")


-- --Original Message-- --
From: owner-xsi@(protected) [mailto:owner-xsi@(protected)]On Behalf
Of Bernard Lebel
Posted At: Monday, June 13, 2005 7:43 AM
Posted To: xsi
Conversation: Python introspection...
Subject: Re: Python introspection...


Well, that's idea. There is no way to know what the user has selected,
so the script has to filter out invalid selected objects.


Cheers
Bernard


Hans,Veenendaal,AMplus R&D,SOJ wrote:

>This works for me.
>
>App = Application
>for obj in App.Selection:
>  Test = obj.LocalProperties
>  LogMessage(str(obj) + " has " + str(Test.Count) + " local properties")
>
>If this fails than you have things selected that are not SceneItem
>derived objects...
>  
>

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi