Really? I have to create an event? I've not even created a custom
property for that since the parameters are so simple. Why can you call a
ppg in that way from the interface, but you can't call it from a script
without going into a complicated event set-up? I can't believe there's
no easy way to do that. I guess I'll just let the users do it the old
fashion way by selecting it manually using the right tab's selection menu.
Matt Lind wrote:
It's a two pronged problem.
First, you need to inspect the objects en masse in a multi-PPG.
InspectObj( Selection.GetAsText() );
Second, you need to extract the inspected objects in your custom property PPG
Event code. Here's a snippet from a Parameter_OnChanged() event in a scripted
custom property:
var oInspectedItems = PPG.Inspected;
for ( var i = 0; i < oInspectedItems.Count; i++ ) {
var oInspectedItem = oInspectedItems(i);
oInspectedItem.Parameters( <parameterName> ).value =
<some_value>;
}
Note: there is a bug in some versions of Softimage where multi-selections are
not recognized.
Matt
-----Original Message-----
From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Mathieu Leclaire
Sent: Monday, July 30, 2012 2:45 PM
To: softimage@listproc.autodesk.com
Subject: inspect multiple objects as one by script
When I select multiple objects that contains the same custom parameters and I click on selection on the right tab and open the ppg of one of them and change a value, that value gets changed for all selected objects... I want my script to select multiple objects and launch the ppg with the same logic, i.e. have one parameter that will change all the values of the selection. I can't figure out how to inspect that ppg in that specific way. It always opens a list of the various objects parameters instead of just opening one that will affect all selection.
What do I need to do in my script to make it inspect all as one like it does when I use the right tab selection menu.
-Mathieu