From f0191f5cd4eef32cab94b2aa6a6543ccf880a3ed Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jul 2011 04:38:19 +0000 Subject: fix [#27833] X3D Export incorrectly uses Collision node --- io_scene_x3d/export_x3d.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'io_scene_x3d') diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index a9e87587..ae385a5e 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -372,7 +372,7 @@ def export(file, texface_use_halo = 0 texface_use_billboard = 0 - texface_use_collision = 0 + # texface_use_collision = 0 use_halonode = False use_billnode = False @@ -382,9 +382,14 @@ def export(file, for face in mesh.uv_textures.active.data: # for face in mesh.faces: texface_use_halo |= face.use_halo texface_use_billboard |= face.use_billboard - texface_use_collision |= face.use_collision + # texface_use_collision |= face.use_collision # texface_use_object_color |= face.use_object_color + # use modifier instead + texface_use_collision = bool([mod for mod in obj.modifiers + if mod.type == 'COLLISION' + if mod.show_viewport]) + if texface_use_halo: fw('%s\n' % ident) use_halonode = True @@ -394,7 +399,7 @@ def export(file, use_billnode = True ident += '\t' elif texface_use_collision: - fw('%s\n' % ident) + fw('%s\n' % ident) use_collnode = True ident += '\t' -- cgit v1.2.3