Browse Source

disable modifiers in render

Jason0214 7 years ago
parent
commit
6776c4bf49
1 changed files with 6 additions and 1 deletions
  1. 6 1
      io_scene_godot/converters/mesh.py

+ 6 - 1
io_scene_godot/converters/mesh.py

@@ -126,8 +126,13 @@ def make_arrays(escn_file, export_settings, skeleton_node, node):
         armature_data.pose_position = 'REST'
         bpy.context.scene.update()
 
+    if not export_settings['use_mesh_modifiers']:
+        for modifier in node.modifiers:
+            if not isinstance(modifier, bpy.types.ArmatureModifier):
+                modifier.show_render = False
+
     mesh = node.to_mesh(bpy.context.scene,
-                        export_settings['use_mesh_modifiers'],
+                        True,
                         "RENDER")
 
     # Prepare the mesh for export