diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-04-06 05:28:39 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-04-06 05:28:39 +0400 |
commit | 9498121463cd6837620b33d7c367f446cf34049a (patch) | |
tree | 95f7a88e74131aa4583e1b81aa456931cb4ecbde /release/scripts/io/export_fbx.py | |
parent | b1e556890d80c7e899e386ee470dec4fbf4ffe95 (diff) |
Object API changes so these functions now require a scene as first argument:
create_mesh, create_dupli_list, make_display_list and is_visible.
This is done in order to make these context independent as the RNA API should
be as much as possible, and to fix #21297 and #21719, where there was an
assumption from these functions that there is a scene in the context, which
does not work for external render engines exporting in a separate thread.
Also avoided using context in a number of other functions, ideally only UI/WM
type functions should use context.
I've updated the scripts in trunk, but the addons and external ones in
development will need updates too.
Diffstat (limited to 'release/scripts/io/export_fbx.py')
-rw-r--r-- | release/scripts/io/export_fbx.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/io/export_fbx.py b/release/scripts/io/export_fbx.py index 9dd3a68f4da..08d142d80e8 100644 --- a/release/scripts/io/export_fbx.py +++ b/release/scripts/io/export_fbx.py @@ -2038,7 +2038,7 @@ def write(filename, batch_objects = None, \ if ob_arms_orig_rest: for ob_base in bpy.data.objects: #if ob_base.type == 'Armature': - ob_base.make_display_list() + ob_base.make_display_list(scene) # ob_base.makeDisplayList() # This causes the makeDisplayList command to effect the mesh @@ -2054,7 +2054,7 @@ def write(filename, batch_objects = None, \ obs = [(ob_base, ob_base.matrix)] if ob_base.dupli_type != 'NONE': - ob_base.create_dupli_list() + ob_base.create_dupli_list(scene) obs = [(dob.object, dob.matrix) for dob in ob_base.dupli_list] for ob, mtx in obs: @@ -2083,7 +2083,7 @@ def write(filename, batch_objects = None, \ if tmp_ob_type != 'MESH': # if tmp_ob_type != 'Mesh': # me = bpy.data.meshes.new() - try: me = ob.create_mesh(True, 'PREVIEW') + try: me = ob.create_mesh(scene, True, 'PREVIEW') # try: me.getFromObject(ob) except: me = None if me: @@ -2094,7 +2094,7 @@ def write(filename, batch_objects = None, \ # Mesh Type! if EXP_MESH_APPLY_MOD: # me = bpy.data.meshes.new() - me = ob.create_mesh(True, 'PREVIEW') + me = ob.create_mesh(scene, True, 'PREVIEW') # me.getFromObject(ob) # so we keep the vert groups @@ -2214,7 +2214,7 @@ def write(filename, batch_objects = None, \ for ob_base in bpy.data.objects: if ob_base.type == 'ARMATURE': # if ob_base.type == 'Armature': - ob_base.make_display_list() + ob_base.make_display_list(scene) # ob_base.makeDisplayList() # This causes the makeDisplayList command to effect the mesh scene.set_frame(scene.frame_current) |