I'm using Python to output a description of a scene to a game specific format.
Almost everything works fine, except Vector3 and Vector4 values.
For instance, I need to output a color value as a float array. To iterate all of a node's parameters, I'm using:
for p in n.parms():
But when iterating, my “ColorFactor” parameter appears as for distinct float values, like in this printout:
ColorFactorr = 1 ColorFactorg = 0 ColorFactorb = 0 ColorFactora = 1
Instead of what I expected…
ColorFactor = (1,0,0,1)
Before I come up with a complicated solution (like iterating twice, the first time only to manually group related parameters), its there a simple way to ‘group’ each vector component into a single tuple or something like that?
Thanks!