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>2013-03-21 18:55:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-21 18:55:28 +0400
commitc75f170adb9ab2195aaa98122ed02d9332b1b72a (patch)
tree6785899cb32f0a7a195cb7ea17a15771f18b3cb3 /io_scene_x3d/export_x3d.py
parent08e558d60f30781a2c92044e98bcd0e61633f92a (diff)
use object.update_from_editmode() for scripts which read object data.
Diffstat (limited to 'io_scene_x3d/export_x3d.py')
-rw-r--r--io_scene_x3d/export_x3d.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 0b325044..8e2c62db 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -1582,8 +1582,10 @@ def save(operator, context, filepath="",
bpy.path.ensure_ext(filepath, '.x3dz' if use_compress else '.x3d')
- if bpy.ops.object.mode_set.poll():
- bpy.ops.object.mode_set(mode='OBJECT')
+ edit_object = context.edit_object
+ if edit_object:
+ edit_object.update_from_editmode()
+ del edit_object
if use_compress:
file = gzip_open_utf8(filepath, 'w')