Re: Reading out operator defaults

Date : Tue, 06 Feb 2007 18:03:53 +0100
To : XSI(at)Softimage.COM
From : André Adam <a_adam(at)49games.de>
Subject : Re: Reading out operator defaults
Thanks for clearification, cheers!

   -André


Luc-Eric Rousseau wrote:
The "default" value in spdl is never used for operators,
it is only used for shaders, which have their presets generated
from the spdl and have no other means to specify default. Many softimage developers have put default
values in spdls by habbit, but they are never looked at.


Pretty much all objects in XSI are created by loading them from presets files, and therefore the only best way to get the default is to create a new one.

-----Original Message-----
From:André Adam

In general it is supposed to work like this:

var oOp = Selection(0);
var eParams = new Enumerator(oOp.Parameters);
while(!eParams.atEnd()){
  var oName = eParams.item().Name;
  var oDefault = eParams.item().Default;
  LogMessage(oName + ": " + oDefault);
  eParams.moveNext();
}

However, surprisingly for many of the operators the SPDL does not seem to define the default values we see when applying the operator. This seems to happen through the command invoked to create the operator, which is not accessable on this level, I think. Hope this helps a bit...

    -André


Matthias Worch wrote:
How do I read out the default values of various operators?
I don't mean applying an operator to a specific object and doing a getValue on that operator (that might be a workaround, though...) Each operator comes with default values that XSI uses automatically, is there a way to access those?

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