Re: Scripting PPG Inspection...

Date : Wed, 9 May 2007 18:40:53 -0700
To : XSI(at)Softimage.COM
From : "Steven Caron" <carons(at)gmail.com>
Subject : Re: Scripting PPG Inspection...
i think i will use the iteration and locking method you suggest. modal is no good cause i want to continually use the opened ppgs

thanks nick!
steven

On 5/9/07, Nick <nick.petit(at)gmail.com> wrote:
If you want to open up a PPG per constraint, iterate through the constraints and inspect each one one by one (don't forget to set the mode to locked)? or, if you want them to be in the same PPG one after the other, set the mode to modal? (the script execution will pause until the user either hits OK or cancel, it's up to you to deal with either case...)


On 5/10/07, Steven Caron < carons(at)gmail.com> wrote:
hey

so i want to inspect constraints on an object, all of them.

###
#imports
import win32com.client
from win32com.client import constants

#globals
xsi    = win32com.client.Dispatch( " XSI.Application " ).Application
xsiPrint = xsi.LogMessage

obj = xsi.Selection(0)

if obj.Kinematics.Constraints.Count > 0:
    cnsList = obj.Kinematics.Constraints.GetAsText()
    xsiPrint(cnsList)
    xsi.InspectObj (cnsList)
###

this code works fine but if the constraints are the same type they show in "multi" edit mode. i would prefer them to be in the same ppg one after another. if there is at least one constraint that is different i get what i want. the arguments for InspectObj() doesn't seem to contain an option to do this.... anyone know how i can disable the "multi" mode and force it to show each property one after another?

thanks
steven



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.