Fix [#26474] double_sided wrong in COLLADA Export
authorNathan Letwory <nathan@letworyinteractive.com>
Wed, 23 Mar 2011 00:19:38 +0000 (00:19 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Wed, 23 Mar 2011 00:19:38 +0000 (00:19 +0000)
reported by Juan Linietsky

The export was not really wrong, but Maya expects their profile to be present inside <geometry>. Added this for mesh with ME_TWOSIDED flag set.

Ideally this will change in the future to be controllable through options to the exporter (like current Google Earth and 3DS Max extensions for <double_sided>).

source/blender/collada/GeometryExporter.cpp

index 332df0318e9bd4298c334e6ef7e16e3b006c47b1..5df5ab99b91bc02d550f040df5ea9a54a25720d6 100644 (file)
@@ -116,6 +116,11 @@ void GeometryExporter::operator()(Object *ob)
        }
        
        closeMesh();
+       
+       if (me->flag & ME_TWOSIDED) {
+               mSW->appendTextBlock("<extra><technique profile=\"MAYA\"><double_sided>1</double_sided></technique></extra>");
+       }
+       
        closeGeometry();
        
 #if 0