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:
@@ -267,7 +267,7 @@ def write_pov(filename, scene=None, info_callback=None):
|
||||
|
||||
file.write('}\n')
|
||||
|
||||
def exportMeshs(sel):
|
||||
def exportMeshs(scene, sel):
|
||||
|
||||
ob_num = 0
|
||||
|
||||
@@ -280,7 +280,7 @@ def write_pov(filename, scene=None, info_callback=None):
|
||||
me = ob.data
|
||||
me_materials = me.materials
|
||||
|
||||
me = ob.create_mesh(True, 'RENDER')
|
||||
me = ob.create_mesh(scene, True, 'RENDER')
|
||||
|
||||
if not me:
|
||||
continue
|
||||
@@ -593,7 +593,7 @@ def write_pov(filename, scene=None, info_callback=None):
|
||||
sel = scene.objects
|
||||
exportLamps([l for l in sel if l.type == 'LAMP'])
|
||||
exportMeta([l for l in sel if l.type == 'META'])
|
||||
exportMeshs(sel)
|
||||
exportMeshs(scene, sel)
|
||||
exportWorld(scene.world)
|
||||
exportGlobalSettings(scene)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user