From 537c18a9ce7fa8614f02f3268794b45f697e3f62 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Feb 2013 15:33:26 +0000 Subject: Fix #34414: python error with frame_change callback and Cycles motion blur. Now the RenderEngine.render callback allows writing blender data again, it should not be allowed but in practice the API and render threading code is too limited to make this work at the moment. --- source/blender/makesrna/intern/rna_render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_render.c') diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 5931440b422..e2e373d8beb 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -299,19 +299,19 @@ static void rna_def_render_engine(BlenderRNA *brna) /* final render callbacks */ func = RNA_def_function(srna, "update", NULL); RNA_def_function_ui_description(func, "Export scene data for render"); - RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); RNA_def_pointer(func, "data", "BlendData", "", ""); RNA_def_pointer(func, "scene", "Scene", "", ""); func = RNA_def_function(srna, "render", NULL); RNA_def_function_ui_description(func, "Render scene into an image"); - RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); RNA_def_pointer(func, "scene", "Scene", "", ""); /* viewport render callbacks */ func = RNA_def_function(srna, "view_update", NULL); RNA_def_function_ui_description(func, "Update on data changes for viewport render"); - RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); RNA_def_pointer(func, "context", "Context", "", ""); func = RNA_def_function(srna, "view_draw", NULL); -- cgit v1.2.3