Autodesk Softimage Services & Support

Adding connection icons to shader compound PPGs

Issue

You want to display the connection icon beside parameters on a shader compound PPG.

Connection icon

Solution

You need to use scripting to define the PPG layout, because you need to set the GUID_LayoutControls attribute on a PPGItem (a UI control). The Particle Renderer node is an example of this (in the render tree, right-click Particle Renderer, click Compound Properties, and click PPG Logic: that will show you the PPG layout code).

Here is how to add a connection icon in VBScript:

set oItem = in_oLayout.AddColor( "diffuse", "Diffuse", false )

' This is how to add the Connection Divot
' Same as Commands = "{F5C75F11-2F05-11d3-AA95-00AA0068D2C0}";
' in the Defaults section of a spdl file
GUID_Layout_Controls = "{C3C4B168-8A13-11d2-BF43-00A0C982CE5D}"
CLSID_3DMapButtonDivot = "{F5C75F11-2F05-11d3-AA95-00AA0068D2C0}"
oItem.SetAttribute GUID_Layout_Controls, Array(CLSID_3DMapButtonDivot)

In JScript it is a little more complicated, because you need a VBScript-style safearray to pass to SetAttribute. You can use ExecuteScriptCode to execute a VBScript subroutine that returns CLSID_3DMapButtonDivot in a safearray, and then  pass that to SetAttribute.

GUID_Layout_Controls = "{C3C4B168-8A13-11d2-BF43-00A0C982CE5D}"
CLSID_3DMapButtonDivot = "{F5C75F11-2F05-11d3-AA95-00AA0068D2C0}";

var s = "function a( sGuid )\n" +
   "a = Array( sGuid )\n" +
   "end function";

var aArrayValue = Application.ExecuteScriptCode( s, "VBScript", "a", [CLSID_3DMapButtonDivot] );

var oItem = oLayout.AddColor("diffuse","Diffuse", false);
oItem.SetAttribute( GUID_Layout_Controls, aArrayValue );


Support – Terms of Use
  • Did this page resolve your issue?
  • Translate This Page (Beta)

    Learn More about this translation beta.Page is machine translated. Learn More.

    Was this translation useful?

  • Document Information

    Published date: 2009-Oct-23
    ID: TS14068523

     

    Applies to:
    Autodesk® Softimage® 2014
    Autodesk® Softimage® 2013
    Autodesk® Softimage® 2012
    Autodesk® Softimage® 2011
    Autodesk® Softimage® 2010
    Autodesk® Softimage® 7.5
    Autodesk Softimage Advanced 2010
    Autodesk Softimage Advanced 7.5