[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34475] trunk/blender/source/blender: undo own last commit, have a fix which is less intrusive: svn merge .

Campbell Barton ideasman42 at gmail.com
Mon Jan 24 06:02:02 CET 2011


Revision: 34475
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34475
Author:   campbellbarton
Date:     2011-01-24 05:02:01 +0000 (Mon, 24 Jan 2011)
Log Message:
-----------
undo own last commit, have a fix which is less intrusive: svn merge .  -r34474:34473 

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

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_screen.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
    trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/blenkernel/BKE_screen.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_screen.h	2011-01-24 04:00:02 UTC (rev 34474)
+++ trunk/blender/source/blender/blenkernel/BKE_screen.h	2011-01-24 05:02:01 UTC (rev 34475)
@@ -48,7 +48,6 @@
 struct wmKeyConfig;
 struct uiLayout;
 struct uiMenuItem;
-struct View3D;
 
 #include "RNA_types.h"
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_animation.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_animation.c	2011-01-24 04:00:02 UTC (rev 34474)
+++ trunk/blender/source/blender/makesrna/intern/rna_animation.c	2011-01-24 05:02:01 UTC (rev 34475)
@@ -458,7 +458,6 @@
 		
 	prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "idname");
-	RNA_def_property_string_maxlength(prop, sizeof(((KeyingSetInfo *)NULL)->idname)); /* TODO, should be able to calculate this automatic! */
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 		
 	/* Name */

Modified: trunk/blender/source/blender/makesrna/intern/rna_render.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_render.c	2011-01-24 04:00:02 UTC (rev 34474)
+++ trunk/blender/source/blender/makesrna/intern/rna_render.c	2011-01-24 05:02:01 UTC (rev 34475)
@@ -271,7 +271,6 @@
 
 	prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->idname");
-	RNA_def_property_string_maxlength(prop, sizeof(((RenderEngineType *)NULL)->idname)); /* TODO, should be able to calculate this automatic! */
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 
 	prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui.c	2011-01-24 04:00:02 UTC (rev 34474)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c	2011-01-24 05:02:01 UTC (rev 34475)
@@ -26,8 +26,6 @@
 
 #include "DNA_screen_types.h"
 
-#include "BKE_screen.h"
-
 #include "RNA_define.h"
 
 #include "rna_internal.h"
@@ -648,7 +646,6 @@
 	/* registration */
 	prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->idname");
-	RNA_def_property_string_maxlength(prop, sizeof(((PanelType *)NULL)->idname)); /* TODO, should be able to calculate this automatic! */
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 	RNA_def_property_ui_text(prop, "ID Name", "If this is set, the panel gets a custom ID, otherwise it takes the 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\"");
 	
@@ -711,7 +708,6 @@
 	/* registration */
 	prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->idname");
-	RNA_def_property_string_maxlength(prop, sizeof(((HeaderType *)NULL)->idname)); /* TODO, should be able to calculate this automatic! */
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 	RNA_def_property_ui_text(prop, "ID Name", "If this is set, the header gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is \"OBJECT_HT_hello\", and bl_idname is not set by the script, then bl_idname = \"OBJECT_HT_hello\"");
 
@@ -762,7 +758,6 @@
 	/* registration */
 	prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->idname");
-	RNA_def_property_string_maxlength(prop, sizeof(((MenuType *)NULL)->idname)); /* TODO, should be able to calculate this automatic! */
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
 	RNA_def_property_ui_text(prop, "ID Name", "If this is set, the menu gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is \"OBJECT_MT_hello\", and bl_idname is not set by the script, then bl_idname = \"OBJECT_MT_hello\"");
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c	2011-01-24 04:00:02 UTC (rev 34474)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c	2011-01-24 05:02:01 UTC (rev 34475)
@@ -1190,7 +1190,7 @@
 	/* Registration */
 	prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "type->idname");
-	RNA_def_property_string_maxlength(prop, OP_MAX_TYPENAME-3); /* else it uses the pointer size! */
+	RNA_def_property_string_maxlength(prop, OP_MAX_TYPENAME); /* else it uses the pointer size! */
 	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_idname_set");
 	// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2011-01-24 04:00:02 UTC (rev 34474)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2011-01-24 05:02:01 UTC (rev 34475)
@@ -1096,7 +1096,7 @@
 					if(RNA_property_flag(prop) & PROP_NEVER_CLAMP) {
 						int param_size_max= RNA_property_string_maxlength(prop);
 						if(param_size > param_size_max) {
-							PyErr_Format(PyExc_TypeError, "%.200s %.200s.%.200s only supports a string of length %d, found %d", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), param_size_max, param_size);
+							PyErr_Format(PyExc_TypeError, "%.200s %.200s.%.200s only supports a string of length %d, found %d", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), param_size, param_size_max);
 							return -1;
 						}
 #ifdef USE_STRING_COERCE




More information about the Bf-blender-cvs mailing list