You are missing the obvious ;-) The problem is Parameter.FullName is not returning a valid path. If you use Dictionary.GetObject(), Selection.SetAsText(), XSICollection.items, etc.... Softimage throws an error claiming the value returned by Parameter.FullName is not valid.
However, if you manually click to select the parameter (or uvprojdef in this case) in the scene explorer or the selection text box on the MCP, the correct path will be output to the script log. The problem is I cannot find a way to extract this correct path using the SDK. Matt From: [email protected] [mailto:[email protected]] On Behalf Of Dave Sent: Wednesday, September 19, 2012 6:55 PM To: [email protected] Subject: RE: Getting consistent path to property in scene Hi Matt, What version of XSI are you using? Using XSI 2013 SP1 on Windows, with a sphere with a default texture, running the following Python import win32com.client from win32com.client import constants as c import types, string, sys, os xsi = win32com.client.Dispatch( 'XSI.Application' ).Application log = xsi.LogMessage log(xsi.Dictionary.GetObject("sphere.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection.Texture_Projection_Def.projtrsu").FullName) produces the following # INFO : sphere.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection.Texture_Projection_Def.projtrsu Which seems to work with the path obtained from Parameter.FullName, unless I'm missing the obvious Dave From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Matt Lind Sent: 20 September 2012 02:26 To: [email protected]<mailto:[email protected]> Subject: RE: Getting consistent path to property in scene That would be an alternate route to doing this: var ObjectID = oProjectItem.ObjectID; var oObject = Dictionary.GetObject( "Object<" + ObjectID + ">", false ); Which in itself is a shortcut to using XSIUtils.DataRepository.GetIdentifier(). Unfortunately it's only valid in the current session. Can't use that in an import/export environment. Matt From: [email protected]<mailto:[email protected]> [mailto:[email protected]]<mailto:[mailto:[email protected]]> On Behalf Of Eric Cosky Sent: Wednesday, September 19, 2012 6:12 PM To: [email protected]<mailto:[email protected]> Subject: RE: Getting consistent path to property in scene I just did a quick test and as it turns out, UniqueName is exposed to script despite not being mentioned on the doc page http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/SIObject.html,topicNumber=si_om_SIObject_html . I made a cube with a projection, ran this VBScript: SelectObj "cube.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection" logmessage selection(0).UniqueName It produced this output, which matches the unique name shown in the SDK explorer. ' INFO : Texture_Projection<338> I was able to select the object using this name in vbscript, SelectObj "Texture_Projection<338>" Again I don't know if that will help you but I figured I'd mention it since the docs don't show UniqueName as being available. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Matt Lind Sent: Wednesday, September 19, 2012 6:00 PM To: [email protected]<mailto:[email protected]> Subject: RE: Getting consistent path to property in scene I am having the issue with clusters and anything inside of them. So, yes, it is related. I reported a similar issue with paths for parameters used in ICE trees a few years back as the paths would be different depending how you obtained them, but that was eventually fixed. The specific items I'm having problems with the most are properties of type 'uvprojdef' which is the _Def property that resides directly under a texture projection (property of type 'uvspace'). If I select the _Def in the scene explorer, I get the correct paths. If I obtain the _Def through any means in scripting, I get the wrong path. Matt From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Alok Gandhi Sent: Wednesday, September 19, 2012 5:55 PM To: [email protected]<mailto:[email protected]> Subject: Re: Getting consistent path to property in scene Not sure if this is the case, but the other day I had an issue where I was not able to get path for cls uv properties. It was odd becuase it worked for a single object in a loop but not for others. The only solutions I found to use dynamic dispatch for the objects created. It totally solved the issue for me. But that is the case for python. On Wed, Sep 19, 2012 at 7:50 PM, Eric Cosky <[email protected]<mailto:[email protected]>> wrote: I assumed you were doing C++, which is what I was referring to. Sorry for not making that clear. I don't know if it's available to scripting. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Matt Lind Sent: Wednesday, September 19, 2012 4:44 PM To: [email protected]<mailto:[email protected]> Subject: RE: Getting consistent path to property in scene I don't see SIObject.GetUniqueName() in the scripting API. Matt From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Eric Cosky Sent: Wednesday, September 19, 2012 4:28 PM To: [email protected]<mailto:[email protected]> Subject: RE: Getting consistent path to property in scene I'm not sure if this is helpful but it sounds like you may be able to do what you need by their unique names (SIObject.GetUniqueName()) instead of the standard full path. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Matt Lind Sent: Wednesday, September 19, 2012 4:12 PM To: [email protected]<mailto:[email protected]> Subject: Getting consistent path to property in scene I am trying to write an export/importer toolset. One of the tasks is to dump the full path to animated parameters regardless of where they live in the scene so they can be found/modified directly upon importing the data. Example: If an object called "George" has an animated texture projection, the paths (via Parameter.FullName) to it's translation parameters may look something like this: George.polymsh.cls.SampleCluster.Texture_Projection.Texture_Projection_Def.projtrsu George.polymsh.cls.SampleCluster.Texture_Projection.Texture_Projection_Def.projtrsv George.polymsh.cls.SampleCluster.Texture_Projection.Texture_Projection_Def.projtrsw The problem is, if I use those strings with Dictionary.GetObject(), Selection.SetAsText(), or any other method, Softimage throws an error claiming the path is invalid. If I select the texture parameters directly in the explorer, the script log records the following as the paths: George.polymsh.cls.sample.clslist.SampleCluster.Texture_Projection.Texture_Projection_Def.projtrsu George.polymsh.cls.sample.clslist.SampleCluster.Texture_Projection.Texture_Projection_Def.projtrsv George.polymsh.cls.sample.clslist.SampleCluster.Texture_Projection.Texture_Projection_Def.projtrsw Notice the extra 'sample.clslist' inserted in the middle. Using these paths, I can get a reference to the parameters using Dictionary.GetObject(), Selection.SetAsText() and so on. The question is - how can I get those paths without requiring the user to select the parameters in the scene? Matt --

