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-04-05       - By kim aldis

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

That was fun. Even more fun when you start running on a selection. Thanks
Jerry.

> -- --Original Message-- --
> From: owner-xsi@(protected)
> [mailto:owner-xsi@(protected)] On Behalf Of Jerry Gamache
> Sent: 05 April 2005 21:26
> To: XSI@(protected)
> Subject: Python introspection...
>
> Ever wondered what function an XSI object exposes at runtime?
>
> def GetFunctions( dynDisp ):
>   """returns a sorted and unique list of all functions
> defined in a dynamic dispatch"""
>   dict = {}
>   try:
>     for iTI in
> xrange(0,dynDisp._oleobj_.GetTypeInfoCount()):
>       typeInfo = dynDisp._oleobj_.GetTypeInfo(iTI)
>       typeAttr = typeInfo.GetTypeAttr()
>       for iFun in xrange(0,typeAttr.cFuncs):
>         funDesc = typeInfo.GetFuncDesc(iFun)
>         name =
> typeInfo.GetNames(funDesc.memid)[0]
>         dict[name] = 1
>   except:
>     pass # Object is not the dynamic dispatch I knew
>   ret = dict.keys()
>   ret.sort()
>   return ret
>
> import pprint
>
> funcs = GetFunctions(Application)
> Application.LogMessage(pprint.pformat(funcs))
>
> funcs = GetFunctions(Application.ActiveSceneRoot)
> Application.LogMessage(pprint.pformat(funcs))
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following
> text in body:
> unsubscribe xsi
>
>

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