  | | | avoiding using get value with python | avoiding using get value with python 2005-03-17 - By Robert Moodie
Back Did you try filter?
ConstructionHistory.Filter (HairGenOp, , )
_rob
-- -- Original Message -- -- From: benp To: XSI@(protected) Sent: Thursday, March 17, 2005 11:17 AM Subject: Re: avoiding using get value with python
softimage@(protected) wrote:
>You may use Application.dictionary.getobject() > > orright, will attempt this.
>You may also iterate the ConstructionHistory and check each operators >individually. The docs have a good example about this. Once you have found the >operator you can simly access its parameters: >iValue = oOperator.parameters( 'EmitterMeshSubdlevel' ).value > > 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Tahoma size=2>Did you try filter?</FONT></DIV> <DIV><FONT face=Tahoma size=2></FONT> </DIV> <DIV><!--StartFragment --><FONT face="Courier New" size=2>ConstructionHistory.Filter (HairGenOp, , )</FONT></DIV> <DIV><FONT face=Tahoma size=2></FONT> </DIV> <DIV><FONT face=Tahoma size=2>_rob</FONT></DIV> <DIV><FONT face=Tahoma size=2></FONT> </DIV> <DIV><FONT face=Tahoma size=2></FONT><A name=wp412821></A> </DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=benp@(protected) href="mailto:benp@(protected)">benp</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=XSI@(protected) href="mailto:XSI@(protected)">XSI@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, March 17, 2005 11:17 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: avoiding using get value with python</DIV> <DIV><BR></DIV><BR><BR><A href="mailto:softimage@(protected)">softimage@(protected)</A> wrote:<BR><BR>>You may use Application.dictionary.getobject()<BR>>  ; <BR>><BR>orright, will attempt this.<BR><BR>>You may also iterate the ConstructionHistory and check each operators<BR>>individually. The docs have a good example about this. Once you have found the<BR>>operator you can simly access its parameters:<BR>>iValue = oOperator.parameters( 'EmitterMeshSubdlevel' ).value<BR>> <BR>><BR>mmm, exactly what i thought - xsi complainns that the com instance has <BR>no attribute "Parameters" ! In the example in my first post, i must <BR>surround<BR><BR>oTo.ActivePrimitive.ConstructionHistory.Find("hairGenOp") <BR><BR><BR>with GetValue to get it to work. The above line returns an object <BR>Operator (according to ClassName()), but i cannot get to the <BR>Parameters.Or am i just very tired?<BR>Thanks heaps for the reply<BR>benp<BR><BR>><BR>>Cheers<BR>>Bernard<BR>><BR>><BR>> ;Quoting benp <<A href="mailto:benp@(protected)">benp@(protected)</A>>:<BR>><BR>> <BR>><BR>>>hello xsiList!<BR>>>I haven't tried to get operator objects before, so this may be a larger<BR>>>problem than just using GetValue ...<BR>>>in python and with a hair object selected:<BR>>>oTo = Application.Selection(0)<BR>>><BR>>> <BR>>><BR>>Application.GetValue(oTo.ActivePrimitive .ConstructionHistory.Find("hairGenOp")).Parameters("EmitterMeshSubdlevel").Value <BR>> <BR>><BR>>>= 0<BR>>><BR>>>how can i avoid using GetValue to get the hairGenOp object properly?<BR>>>I often find i can't get objects without using GetValue.<BR>>><BR>>>thanks list.<BR>>><BR>>><BR>>>---<BR>>>Unsubscribe? Mail <A href="mailto:Majordomo@(protected)">Majordomo@(protected)</A> with the following text in body:<BR>>>unsubscribe xsi<BR>>><BR>>> <BR>>><BR>><BR>><BR>><BR>>---<BR>>Unsubscribe? Mail <A href="mailto:Majordomo@(protected)">Majordomo@(protected)</A> with the following text in body:<BR>>unsubscribe xsi<BR>> <BR>><BR><BR>---<BR>Unsubscribe? Mail <A href="mailto:Majordomo@(protected)">Majordomo@(protected)</A> with the following text in body:<BR>unsubscribe xsi<BR></BLOCKQUOTE></BODY></HTML>
|
|
 |