[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33545] trunk/blender/source/blender/ python/intern/bpy_rna.c: fix for own change r33524, at the moment the context always has to be valid, noted with XXX.

Campbell Barton ideasman42 at gmail.com
Wed Dec 8 04:25:32 CET 2010


Revision: 33545
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33545
Author:   campbellbarton
Date:     2010-12-08 04:25:31 +0100 (Wed, 08 Dec 2010)

Log Message:
-----------
fix for own change r33524, at the moment the context always has to be valid, noted with XXX.
reported by Doug Hammond.

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2010-12-08 03:05:46 UTC (rev 33544)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2010-12-08 03:25:31 UTC (rev 33545)
@@ -5154,6 +5154,11 @@
 		return -1;
 	}
 
+	/* XXX, this is needed because render engine calls without a context
+	 * this should be supported at some point but at the moment its not! */
+	if(C==NULL)
+		C= BPy_GetContext();
+
 	bpy_context_set(C, &gilstate);
 
 	if (!is_static) {





More information about the Bf-blender-cvs mailing list