RE: [scripting] OM inside SCOP doesnt work but command does?!

Date : Fri, 2 Nov 2007 17:23:44 -0000
To : <XSI(at)Softimage.COM>
From : "kim aldis" <xsi(at)kim-aldis.co.uk>
Subject : RE: [scripting] OM inside SCOP doesnt work but command does?!

In fact, changing the value even using the OM is bad. No changes to anything that isn’t plugged into a port is the rule. Since the mute parameter isn’t animatable you can’t  plug it into a port.

 

From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Luc-Eric Rousseau
Sent: 02 November 2007 16:43
To: XSI(at)Softimage.COM
Subject: RE: [scripting] OM inside SCOP doesnt work but command does?!

 

the system may allow you to do this without fialing, but calling the setvalue command during the evaluation

of an operator is very bad.  Not only does it screwup the undo stack, but it dirties the graph while it's trying to clean itself.

 

if you need to animate the mute of your operator, why don't you just add your own 'mute' parameter to

your SCOP, and implement it by checking it and skip most of the code in your evaluate?  That's all that the mute is doing.

 

 


From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Philipp Oeser
Posted At: Friday, November 02, 2007 7:52 AM
Posted To: xsi
Conversation: [scripting] OM inside SCOP doesnt work but command does?!
Subject: [scripting] OM inside SCOP doesnt work but command does?!

Hi there,
As you cannot link a SCOPs "mute" parameter or put an _expression_ on it, I made another SCOP that itself should control the "mute" parameter of the first SCOP. And I was learning my lessons with SCOPs I tried to use the Object Model rather than using a command [somewhere in the docs it says: "You must never try and call a command from inside an operator, unless that command does not affect scene data at all..."]

So I went with ( I hope this counts as OM):
Out.Value.Parameters("mute").Value = InMuting.Value.Parameters("MuteIt").Value
This correctly toggles the the checkbox for the SCOPs "mute", however it doesnt mute it at all - the yellow "m" on the SCOP is also missing

On the other hand (if you use the command - which you are not supposed to do!):
SetValue Out.Value & ".mute", InMuting.Value.Parameters("MuteIt").Value
This does everything want: checkbock, yellow "m" and correct muting of the SCOP...


Might be someting stupid from my side, but this doesnt make sense, does it? And if it does, please let me know...
Thanx in advance

Philipp


-- 
 
 
LIGA_01 COMPUTERFILM GmbH
Philipp Oeser
 
MUNICH
Landwehrstrasse 60-62
80336 Munich, Germany
fon: +49 - (0)89 - 51 555 8-88
fax: +49 - (0)89 - 51 555 8-77
 
www.liga01.com
 
Diese Nachricht enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese Nachricht irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen diese Nachricht. Das unerlaubte Kopieren und die unbefugte Weiterleitung dieser Nachricht sind nicht gestattet.
 
This message may contain confidential and/or privileged information. If you are not the intended recipient or if you have received this message in error, please notify the sender and delete this message. Any unauthorised copying, disclosure or distribution of this message is strictly forbidden.

--- 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.