[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44156] trunk/blender/source/blender/ makesrna/intern: Reverting changes in commit r43458.

Sergey Sharybin sergey.vfx at gmail.com
Thu Feb 16 16:53:31 CET 2012


Revision: 44156
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44156
Author:   nazgul
Date:     2012-02-16 15:53:30 +0000 (Thu, 16 Feb 2012)
Log Message:
-----------
Reverting changes in commit r43458.

That was intended change to clear PROP_TRANSLATE flag from bl_label property of
operators, panels and menus (see rev40570)

If this flag leads to another issues it should be fixed in another way.

This fixes #30210: International Font Problem

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43458
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40570

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

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui.c	2012-02-16 15:53:13 UTC (rev 44155)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c	2012-02-16 15:53:30 UTC (rev 44156)
@@ -698,7 +698,10 @@
 	                         "name of the class used to define the panel. For example, if the "
 	                         "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
 	                         "script, then bl_idname = \"OBJECT_PT_hello\"");
-	
+
+	/* panel's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
+	 * when drawing panel and having this flag set will make runtime switching of language much more tricky
+	 * because label will be stored translated */
 	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->label");
 	RNA_def_property_flag(prop, PROP_REGISTER);
@@ -823,7 +826,10 @@
 	                         "class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
 	                         "script, then bl_idname = \"OBJECT_MT_hello\")");
 
-	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
+	/* menu's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
+	 * when drawing panel and having this flag set will make runtime switching of language much more tricky
+	 * because label will be stored translated */
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->label");
 	RNA_def_property_flag(prop, PROP_REGISTER);
 	RNA_def_property_ui_text(prop, "Label", "The menu label");

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c	2012-02-16 15:53:13 UTC (rev 44155)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c	2012-02-16 15:53:30 UTC (rev 44156)
@@ -1245,6 +1245,9 @@
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 	RNA_def_struct_name_property(srna, prop);
 
+	/* operator's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
+	 * when drawing panel and having this flag set will make runtime switching of language much more tricky
+	 * because label will be stored translated */
 	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->name");
 	RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */




More information about the Bf-blender-cvs mailing list