Re: [scripting] Is it possible to access certain parameters of operators in the FxTree via the OM?

Date : Thu, 27 Sep 2007 10:30:20 -0400
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : Re: [scripting] Is it possible to access certain parameters of operators in the FxTree via the OM?
Not quintessentially OM, but this works on my end:

import win32com
xsi = Application
xsifactory = win32com.client.Dispatch( 'XSI.Factory' )

for oProp in xsi.activesceneroot.properties:
	if oProp.type == 'FxTree':
		for oOp in oProp.fxoperators:
			if oOp.type == 'Tracker':
				oColl = xsifactory.createobject( 'XSI.Collection' )
				oColl.items = '%s.TrackFullPos1.posx' % oOp.fullname
				oParameter = oColl(0)
				xsi.logmessage( oParameter.fullname )

Cheers
Bernard

On 9/27/07, Julian Johnson <julian(at)exch.demon.co.uk> wrote:
> I'm trying to access a parameter of a Tracker operator via the OM
> (Python in 5.11):
>
> t = Application.GetValue("FxTree.Tracking")
> for x in t.Parameters:
>     Application.LogMessage(x)
> Application.LogMessage(t.Parameters("TrackFullPos1.posx").Value) #
> returns None
>
> But it seems that the '.' in "TrackFullPos1.posx" is causing some kind
> of problem (non-compound  parameter names work fine). The actual index
> of the parameter (81) actually does work....
>
> Is there some trick to accessing this parameter via the OM using the
> actual parameter name?
>
> Cheers,
> 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.