Operators should not create the Cluster or ClusterProperty.  Both need to 
exist before the operator is applied and connected.

The Cluster should be defined as 'always complete' during creation, not 
marked as such after the fact because the latter doesn't work.  The 
ClusterProperty should then be created and applied to the cluster.  NOTE: 
Most ClusterProperties of type sample can only be applied to Sample Clusters 
defined as always complete.

1) Create sample cluster defining it as 'always complete' .  This should be 
done as the defining argument, not marked after the 
fact.(PolygonMesh.AddCluster( <type>, [name], -1 ) for example).
2) Create ClusterProperty and apply it to the cluster.  example: 
Cluster.AddProperty( "vertex color property", false, [name] ) to do this.
3) Connect operator to the ClusterProperty.  Define separate input and 
output ports on your operator to connect to the property (one to read, the 
other to write), or define a combined input/output port.  The latter is more 
convenient, but the former is more stable.

think modular. Every element should be it's own discrete entity logically 
and physically.  When you try to merge things together or cut corners, 
you'll likely run into issues.


Matt



Date: Wed, 9 Nov 2016 20:08:33 +0300
From: Andrew Prostrelov <prostre...@gmail.com>
Subject: Re: Preserve UV methods after PolygonMesh.Set()
To: softimage@listproc.autodesk.com

Thanks Matt now the structure and dependencies is more obvious for me.
But still i confused about behaviour of "Sample" cluster attached to
CustomOperator.

That's how i connected in & out ports of CustomOperator:
http://take.ms/saEYZ
After i change geometry (add one additional edge) this cluster wasn't
expanded. It consist of the same number of elements.
I check 'always complete' property of this cluster and the value is "true".
After all new samples elements appear in this cluster but only after i
freez modelling stack.
Also it seams that if i didn't have new samples in my "Sample" cluster i
can't reach UV values of new component from CClusterPropertyElementArray.
And since i connect Cluster object to the out port i can't use
OutputPort.PutValue() (this method works only with Parameters).

So maybe there's a way to force my "sample" cluster to update its elements ?
Or maybe to create and overwrite cluster connected to out port with new
instance of cluster.

The only method i know is to use Geometry.AddCluster(). But i guess it's
not appropriate to create such objects from Operator. 


------
Softimage Mailing List.
To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to