[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54941] trunk/blender/source/blender/ makesrna/intern/rna_render.c: Fix #34414: python error with frame_change callback and Cycles motion blur.

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Feb 28 16:33:26 CET 2013


Revision: 54941
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54941
Author:   blendix
Date:     2013-02-28 15:33:26 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_render.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_render.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_render.c	2013-02-28 15:31:20 UTC (rev 54940)
+++ trunk/blender/source/blender/makesrna/intern/rna_render.c	2013-02-28 15:33:26 UTC (rev 54941)
@@ -299,19 +299,19 @@
 	/* 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);




More information about the Bf-blender-cvs mailing list