[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40428] trunk/blender/source/blender/ makesrna: add missing define for last commit and tag bl_label & bl_descriptions for translating too

Campbell Barton ideasman42 at gmail.com
Wed Sep 21 16:10:27 CEST 2011


Revision: 40428
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40428
Author:   campbellbarton
Date:     2011-09-21 14:10:26 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
add missing define for last commit and tag bl_label & bl_descriptions for translating too

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/RNA_define.h
    trunk/blender/source/blender/makesrna/intern/rna_animation.c
    trunk/blender/source/blender/makesrna/intern/rna_render.c
    trunk/blender/source/blender/makesrna/intern/rna_ui.c
    trunk/blender/source/blender/makesrna/intern/rna_wm.c

Modified: trunk/blender/source/blender/makesrna/RNA_define.h
===================================================================
--- trunk/blender/source/blender/makesrna/RNA_define.h	2011-09-21 13:53:35 UTC (rev 40427)
+++ trunk/blender/source/blender/makesrna/RNA_define.h	2011-09-21 14:10:26 UTC (rev 40428)
@@ -86,6 +86,7 @@
 PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
 PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
 PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
+PropertyRNA *RNA_def_string_translate(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
 
 PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description);
 PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description);

Modified: trunk/blender/source/blender/makesrna/intern/rna_animation.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_animation.c	2011-09-21 13:53:35 UTC (rev 40427)
+++ trunk/blender/source/blender/makesrna/intern/rna_animation.c	2011-09-21 14:10:26 UTC (rev 40428)
@@ -489,7 +489,7 @@
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 		
 	/* Name */
-	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "name");
 	RNA_def_property_ui_text(prop, "Name", "");
 	RNA_def_struct_name_property(srna, prop);

Modified: trunk/blender/source/blender/makesrna/intern/rna_render.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_render.c	2011-09-21 13:53:35 UTC (rev 40427)
+++ trunk/blender/source/blender/makesrna/intern/rna_render.c	2011-09-21 14:10:26 UTC (rev 40428)
@@ -286,7 +286,7 @@
 	RNA_def_property_string_sdna(prop, NULL, "type->idname");
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 
-	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "type->name");
 	RNA_def_property_flag(prop, PROP_REGISTER);
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui.c	2011-09-21 13:53:35 UTC (rev 40427)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c	2011-09-21 14:10:26 UTC (rev 40428)
@@ -661,7 +661,7 @@
 	                         "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
 	                         "script, then bl_idname = \"OBJECT_PT_hello\"");
 	
-	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "type->label");
 	RNA_def_property_flag(prop, PROP_REGISTER);
 	RNA_def_property_ui_text(prop, "Label",
@@ -785,7 +785,7 @@
 	                         "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_NONE);
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
 	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	2011-09-21 13:53:35 UTC (rev 40427)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c	2011-09-21 14:10:26 UTC (rev 40428)
@@ -1188,14 +1188,14 @@
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 	RNA_def_struct_name_property(srna, prop);
 
-	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "type->name");
 	RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set");
 	// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_flag(prop, PROP_REGISTER);
 
-	prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "type->description");
 	RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set");
@@ -1249,14 +1249,14 @@
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 	RNA_def_struct_name_property(srna, prop);
 
-	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "type->name");
 	RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set");
 	// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_flag(prop, PROP_REGISTER);
 
-	prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
+	prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
 	RNA_def_property_string_sdna(prop, NULL, "type->description");
 	RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set");




More information about the Bf-blender-cvs mailing list