I don't know if this is the same problem we ran into many years ago, but it 
goes something like this:

To the best as I could figure out, the problem mostly appears when you have 
defined more than one RGBA color parameter (4 parameters of type siFloat) into 
a RGBA color widget.  Any parameters defined in the custom property after that 
point will not respond to multi-selection behaviors.  My workaround was to put 
the color parameters last in the custom property's _Definition() callback.

The 2nd part of the workaround is how you read parameters inside of a callback. 
 Softimage does have a few bugs here or there that I found many years ago and 
reported, but as far as I could tell they were fixed in 2012 SP1.  Anyway, how 
you pull parameters inside the callback is important.

Example:  The typical syntax to get access to a custom property and it's 
parameters from inside an _OnClicked() or _OnChanged() parameter callback is 
something like this (Jscript):

Parameter_OnChanged()
{
                var oCustomProperty = PPG.Inspected.Item(0);
                var oParameters = oCustomProperty.Parameters;

                var ParameterValue = oParameters( "parametername" ).value;
                ...
}

The key part of the whole equation is the first line.  In this example it pulls 
the first custom property in the inspected list.  If you want to consider all 
custom properties being inspected, you must iterate through the InspectItems 
collection and treat them one at a time.


Matt



From: [email protected] 
[mailto:[email protected]] On Behalf Of Bradley Gabe
Sent: Thursday, May 10, 2012 12:03 PM
To: [email protected]
Subject: Custom PPG's do not work with Multi Selection?

I've noticed this before, and now it's happening with a custom tool kit I've 
been developing.

I have a simple Custom PPG defined in a self installing plugin and am applying 
it to multiple objects in the scene. However, if I multi-select the objects, 
the PPG doesn't show up at the top of the selection explorer.

If I open the PPG on one of the objects, then multi select other objects with 
the same custom property, the title bar of the PPG reads "[multi]", but none of 
the multi selection features work... if I edit a parameter, it only affects the 
first item in the selection.

What gives? Is there a way to construct the PPG in order to avoid this 
behavior? I really need them to work in multi-selection mode!

-B

Reply via email to