What steps will reproduce the problem?
1. In Maya, load a cgfx shader that has a float4 parameter
2. Set some elements of the parameter to 0
3. export.
What is the expected output? What do you see instead?
<setparam ref="PlanarReflection_planeDir">
<float4>1</float4>
</setparam>
<setparam ref="PlanarReflection_planePos">
<float4>1</float4>
</setparam>
^^ those float4s should be (0,0,1,0) and (0,0,0,1), respectively.
What version of the product are you using? On what operating system?
openColladaMaya
Please provide any additional information below.
You can fix this by not checking for 0 after the NULL check in
colladamayamaterialexporter.cpp, in the setSetParam function, for switch cases:
case cgfxAttrDef::kAttrTypeFloat:
case cgfxAttrDef::kAttrTypeVector2:
case cgfxAttrDef::kAttrTypeVector3:
case cgfxAttrDef::kAttrTypeColor3:
case cgfxAttrDef::kAttrTypeVector4:
case cgfxAttrDef::kAttrTypeColor4:
eg:
if ( attribute->fNumericDef!=NULL /*&& attribute->fNumericDef[0]!=0*/ )
Original issue reported on code.google.com by martin.b...@gmail.com on 19 Nov 2010 at 7:43
Original issue reported on code.google.com by
martin.b...@gmail.com
on 19 Nov 2010 at 7:43