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?
 
avoiding using get value with python

avoiding using get value with python

2005-03-17       - By softimage@(protected)

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

Well that's a two-fold problem in my experience:

First, there seem to be some flakyness with the way data is referenced in XSI's
Python implementation. Although you can get to basic properties like Name and
Fullname, as soon as you want other properties and traverse down an object you
have to explicitely "reget" the object.

Second, the ConstructionHistory is a can of worm if you ask me. Even the sdk
docs mentions its limitations in terms of iteration. Plus, ConstructionHistory
is subject to changes depending if the object is frozen or not.

Basically, in your iteration of the ConstructionHistory, to get around these two
problems you have to use the dictionary.getobject() method call on each operator
before starting to check their parameters.

Tonight I'll try to fork an example for you from my scripts.


Cheers
Bernard


Quoting benp <benp@(protected)>:

> mmm, exactly what i thought - xsi complainns that the com instance has
> no attribute "Parameters" ! In the example in my first post, i must
> surround
>
> oTo.ActivePrimitive.ConstructionHistory.Find("hairGenOp")
>
>
> with GetValue to get it to work. The above line returns an object
> Operator (according to ClassName()), but i cannot get to the
> Parameters.Or am i just very tired?
> Thanks heaps for the reply
> benp
>
> >
> >Cheers
> >Bernard
> >
> >
> >Quoting benp <benp@(protected)>:
> >
> >
> >
> >>hello xsiList!
> >>I haven't tried to get operator objects before, so this may be a larger
> >>problem than just using GetValue ...
> >>in python and with a hair object selected:
> >>oTo =  Application.Selection(0)
> >>
> >>
> >>
>
>Application.GetValue(oTo.ActivePrimitive.ConstructionHistory.Find("hairGenOp")
).Parameters("EmitterMeshSubdlevel").Value
> >
> >
> >>= 0
> >>
> >>how can i avoid using GetValue to get the hairGenOp object properly?
> >>I often find i can't get objects without using GetValue.
> >>
> >>thanks list.
> >>
> >>
> >>---
> >>Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> >>unsubscribe xsi
> >>
> >>
> >>
> >
> >
> >
> >---
> >Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> >unsubscribe xsi
> >
> >
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> unsubscribe xsi
>



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