[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53586] trunk/blender/source/blender/ makesrna/intern: Remove some uneeded/irrelevant "PROP_TRANSLATE".

Bastien Montagne montagne29 at wanadoo.fr
Sat Jan 5 14:52:42 CET 2013


Revision: 53586
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53586
Author:   mont29
Date:     2013-01-05 13:52:41 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Remove some uneeded/irrelevant "PROP_TRANSLATE".

This sub-type is actually *only* needed for the "text" property of UI rna api (maybe we should rename it to "PROP_PY_TRANSLATE", as it is anyway only 'active' during conversion from py string to RNA string property...). In fact, I think it should only be used in RNA func properties anyway, as it stores the translated string into the property, it should only be used with "one time" RNA stuff...

Modified Paths:
--------------
    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/intern/rna_animation.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_animation.c	2013-01-05 13:51:07 UTC (rev 53585)
+++ trunk/blender/source/blender/makesrna/intern/rna_animation.c	2013-01-05 13:52:41 UTC (rev 53586)
@@ -577,7 +577,7 @@
 	RNA_def_struct_name_property(srna, prop);
 	RNA_def_property_flag(prop, PROP_REGISTER);
 	
-	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
+	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "description");
 	RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
 	RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
@@ -777,7 +777,7 @@
 	RNA_def_struct_name_property(srna, prop);
 	RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_RENAME, NULL);
 	
-	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
+	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "description");
 	RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
 	RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);

Modified: trunk/blender/source/blender/makesrna/intern/rna_render.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_render.c	2013-01-05 13:51:07 UTC (rev 53585)
+++ trunk/blender/source/blender/makesrna/intern/rna_render.c	2013-01-05 13:52:41 UTC (rev 53586)
@@ -415,7 +415,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_TRANSLATE);
+	prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
 	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	2013-01-05 13:51:07 UTC (rev 53585)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c	2013-01-05 13:52:41 UTC (rev 53586)
@@ -1000,7 +1000,7 @@
 	RNA_def_property_flag(prop, PROP_REGISTER);
 	RNA_def_property_ui_text(prop, "Label", "The menu label");
 
-	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
+	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->description");
 	RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Menu_bl_description_set");

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c	2013-01-05 13:51:07 UTC (rev 53585)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c	2013-01-05 13:52:41 UTC (rev 53586)
@@ -1340,7 +1340,7 @@
 	/* 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_TRANSLATE);
+	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->description");
 	RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set");
@@ -1407,7 +1407,7 @@
 	/* 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_TRANSLATE);
+	prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->description");
 	RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* 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