Cluster properties won't update when altering geometry in a C++ operator

Date : Thu, 25 Jan 2007 15:21:30 -0500
To : XSI(at)Softimage.COM
From : "Etienne Pellerin" <epelleri(at)gmail.com>
Subject : Cluster properties won't update when altering geometry in a C++ operator
Hi,
I'm still working on a realflow importer that I will open source if I ever manage to finish it :) But I have a big problem with the texture coords cluster and I need some help.

The geometry generator works correctly, but in the uv operator, the cluster property doesn't have the correct number of elements in the OutputTarget or the InputPorts. Here's a simple test I did : connected the geometry generator, created a projection with the default op frozen (it becomes an ExplicitUVW) and connected the uv operator this way:

Output Port : the uv ClusterProperty
Input Port : the parent Primitive
Input Port : the same uv Cluster Property
Input Port : the parent Cluster

In the update  function, I traced the elements count of all input port objects :
- Primitive.GetGeometry.GetSamples.GetCount is the correct value
- Cluster.GetElements.GetCount is the old value
- ClusterProperty.GetElements.GetCount is the old value

output target:
- ClusterProperty.GetElements.GetCount of the OutputTarget is also the old value so I cannot write the updated UVs.

I also checked the Cluster flag IsAlwaysComplete and it is true, so I concluded that the clusters are out of sync with the geometry when I receive them in the operator. I assume it means the clusters are not updating at all if I change the geometry with an operator.

Any idea ? I there a way to force the clusters to sync their sizes ?

Thanks,
Etienne Pellerin


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.