Add a parameter to an override as a checkbox rather than a connection button

Article needs peer review


When a parameter is added to an override using the AddParameters button it will appear in the override as a connection button but sometimes you may want to add a parameter and have it appear as a checkbox. This would be useful for controlling on/off parameters, eg 'specular_inuse'.

It is possible to create parameters within an override in the form of a checkbox, but you need to add the parameter by hand using the script editor.


Here is a simple example of how to identify what needs to be written in the script editor and how to edit the command to create the checkbox entry:

  • Get a primitive sphere and give it a default phong material.
  • Create an override for the sphere and use the AddParameters button to add the Material > Surface > Phong > Specular_inuse parameter.
  • Open the Script Editor to see how this is written - you should see an entry that looks like this:
 SIAddEntryToOverride "sphere.Override", "sphere.Material.Phong.specular_inuse"
  • Copy this entry into the panel at the bottom of the Script Editor and add ' , 2 ' to the end of the command - the finished command should look like this:
 SIAddEntryToOverride "sphere.Override", "sphere.Material.Phong.specular_inuse", 2
  • Delete the override you previously created and create a fresh one - then add the specular_inuse parameter by running the script in the Script Editor instead of using the AddParameters button. This should create the parameter within the override as a checkbox, rather than as a connection button.

Applies To: XSI 2.0,XSI 2.0.1,XSI 3.0,XSI 3.0.1 on NT,Win2K,Irix,Linux

Posted: 3/3/2003

This page was last modified 17:23, 6 Dec 2010.
This page has been accessed 5861 times.

© Copyright 2009 Autodesk Inc. All Rights Reserved. Privacy Policy | Legal Notices and Trademarks | Report Piracy