Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-07-21 08:38:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-21 08:38:19 +0400
commitf0191f5cd4eef32cab94b2aa6a6543ccf880a3ed (patch)
treea2f6dbf231aaa87ca74ebb17636f87476e9876f0 /io_scene_x3d
parent78dfd37f5c6a6c7de28e071c299675a0a58d1990 (diff)
fix [#27833] X3D Export incorrectly uses Collision node
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/export_x3d.py11
1 files changed, 8 insertions, 3 deletions
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<Billboard axisOfRotation="0 0 0">\n' % ident)
use_halonode = True
@@ -394,7 +399,7 @@ def export(file,
use_billnode = True
ident += '\t'
elif texface_use_collision:
- fw('%s<Collision enabled="false">\n' % ident)
+ fw('%s<Collision enabled="true">\n' % ident)
use_collnode = True
ident += '\t'