Thanks Steven -

Yeah, I'd like something a little more robust than relying on the default
DataType since this is easily changeable.
I thought of looking for the "Tangent" property or the TangentOp2 operator,
but these can be deleted/frozen away while still leaving behind valid
tangents.



On Tue, Mar 5, 2013 at 6:03 PM, Steven Caron <[email protected]> wrote:

> this assumes no one goes out of there way to change the default datatype
> for tangents and vertex colors. ;(
>
>
> On Tue, Mar 5, 2013 at 6:01 PM, Steven Caron <[email protected]> wrote:
>
>> i believe they are both still 'vertexcolor', hence nicolas' question...
>>
>> i would say, by name or 'DataType' parameter on the property?
>>
>> from siutils import si
>> si = si() # win32com.client.Dispatch('XSI.Application')
>> from siutils import log # LogMessage
>> from siutils import disp # win32com.client.Dispatch
>> from siutils import C # win32com.client.constants
>>
>> for item in si.Selection:
>>     sampleClusters =
>> item.ActivePrimitive.Geometry.Clusters.Filter(C.siSampledPointCluster)
>>     if sampleClusters.Count:
>>         for cluster in sampleClusters:
>>             for prop in cluster.LocalProperties:
>>                 if prop.Parameters("datatype"):
>>                     log("%s > %s > %s" % (prop.Name,prop.Type,
>> prop.Parameters("datatype").Value))
>>
>> # INFO : Vertex_Color > vertexcolor > 0
>> # INFO : Tangents > vertexcolor > 1
>>
>>
>> On Tue, Mar 5, 2013 at 5:54 PM, Matt Lind <[email protected]>wrote:
>>
>>> Check the cluster property type.****
>>>
>>> ** **
>>>
>>> Matt****
>>>
>>> ** **
>>>
>>> *From:* [email protected] [mailto:
>>> [email protected]] *On Behalf Of *Nicolas Burtnyk
>>> *Sent:* Tuesday, March 05, 2013 5:53 PM
>>> *To:* [email protected]
>>> *Subject:* Any way to distinguish between tangents and colors?****
>>>
>>> ** **
>>>
>>> Hello list,****
>>>
>>> ** **
>>>
>>> Does anyone know a way to tell whether a cluster contains tangents as
>>> opposed to vertex colors?****
>>>
>>> ** **
>>>
>>> Thanks!****
>>>
>>> ** **
>>>
>>> -Nicolas****
>>>
>>
>>
>

Reply via email to