[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55307] trunk/blender/source/blender/ makesrna/intern/rna_wm.c: Small fix to previous commit: temp buffer for translation context needs to be initialized to relevant default value for operators ...
Bastien Montagne
montagne29 at wanadoo.fr
Fri Mar 15 16:12:47 CET 2013
Revision: 55307
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55307
Author: mont29
Date: 2013-03-15 15:12:46 +0000 (Fri, 15 Mar 2013)
Log Message:
-----------
Small fix to previous commit: temp buffer for translation context needs to be initialized to relevant default value for operators... Also fixed not initializing those buffers in macro register function.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_wm.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c 2013-03-15 14:43:09 UTC (rev 55306)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c 2013-03-15 15:12:46 UTC (rev 55307)
@@ -1070,7 +1070,9 @@
RNA_pointer_create(NULL, &RNA_Operator, &dummyop, &dummyotr);
/* clear in case they are left unset */
- _operator_idname[0] = _operator_name[0] = _operator_descr[0] = _operator_ctxt[0] = '\0';
+ _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0';
+ /* We have to set default op context! */
+ strcpy(_operator_ctxt, BLF_I18NCONTEXT_OPERATOR_DEFAULT);
/* validate the python class */
if (validate(&dummyotr, data, have_function) != 0)
@@ -1194,6 +1196,11 @@
dummyot.translation_context = _operator_ctxt; /* only assigne the pointer, string is NULL'd */
RNA_pointer_create(NULL, &RNA_Macro, &dummyop, &dummyotr);
+ /* clear in case they are left unset */
+ _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0';
+ /* We have to set default op context! */
+ strcpy(_operator_ctxt, BLF_I18NCONTEXT_OPERATOR_DEFAULT);
+
/* validate the python class */
if (validate(&dummyotr, data, have_function) != 0)
return NULL;
More information about the Bf-blender-cvs
mailing list