Tricky problem I'm trying to solve.
I know I can find all the custom operators in the scene with FindObjects() and
traverse operator output ports to find out where the operator is connected, but
in this particular case I need to go the opposite direction.
The problem I need to solve is:
Given an arbitrary object in the scene, determine if it has a custom operator
applied to it.
In my test cases I have used FindObjects() to locate the custom operators and
print out their output port connections. In nearly all instances the custom
operator doesn't show up in the scene explorer where the output port claims it
should be.
Example:
A custom operator which drives the translation U and V
(projtrsu, projtrsv) parameters of a texture projection Def property. When I
query those parameters for their sources, they return a reference to the custom
operator driving them. When I query the custom operator's output ports, they
say the operator lives on the texture projection def property. Yet when I open
the scene explorer and navigate to the texture projection def property, no
operator is found. Instead an instance is nested below each parameter
connected to the output ports. Illustration from scene explorer:
PolygonMesh
Primitive
Clusters
SampleCluster
Texture_Projection
Texture_Projection_Def
(CustomOperator.FullName points here)
Projscl
Projrot
Projtrs
Projtrsu
CustomOperator (actual location)
Projtrsv
CustomOperator (actual location)
When I query the Texture Projection Def's various collections (Properties,
NestedObjects, ...), the custom operator is nowhere to be found.
So given an arbitrary scene object, how do I determine if it has a custom
operator other than resorting to FindObjects()?
Matt