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]] On Behalf Of Matt Lind
Sent: Wednesday, September 19, 2012 4:12 PM
To: [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.p
rojtrsu

George.polymsh.cls.SampleCluster.Texture_Projection.Texture_Projection_Def.p
rojtrsv

George.polymsh.cls.SampleCluster.Texture_Projection.Texture_Projection_Def.p
rojtrsw

 

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_P
rojection_Def.projtrsu

George.polymsh.cls.sample.clslist.SampleCluster.Texture_Projection.Texture_P
rojection_Def.projtrsv

George.polymsh.cls.sample.clslist.SampleCluster.Texture_Projection.Texture_P
rojection_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

 

 

Reply via email to