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.
This commit is contained in:
2010-04-06 01:28:39 +00:00
parent b1e556890d
commit 9498121463
14 changed files with 56 additions and 59 deletions

View File

@@ -84,7 +84,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
orig_frame = sce.frame_current
sce.set_frame(PREF_STARTFRAME)
me = ob.create_mesh(True, 'PREVIEW')
me = ob.create_mesh(sce, True, 'PREVIEW')
#Flip y and z
mat_flip = Mathutils.Matrix(\
@@ -123,7 +123,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
"""
sce.set_frame(frame)
me = ob.create_mesh(True, 'PREVIEW')
me = ob.create_mesh(sce, True, 'PREVIEW')
check_vertcount(me, numverts)
me.transform(mat_flip * ob.matrix)