From cb685c46bcac9477de54da0900a65652184f7472 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 9 Feb 2014 05:51:22 +1100 Subject: RNA API: remove unused PROP_NEVER_CLAMP flag --- source/blender/makesrna/RNA_types.h | 6 ------ source/blender/makesrna/intern/rna_animation.c | 4 ++-- source/blender/makesrna/intern/rna_nodetree.c | 8 ++++---- source/blender/makesrna/intern/rna_render.c | 2 +- source/blender/makesrna/intern/rna_ui.c | 8 ++++---- source/blender/makesrna/intern/rna_userdef.c | 2 +- source/blender/makesrna/intern/rna_wm.c | 4 ++-- 7 files changed, 14 insertions(+), 20 deletions(-) (limited to 'source') diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index a760d59b0e1..26b107bf610 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -218,12 +218,6 @@ typedef enum PropertyFlag { * most common case is functions that return arrays where the array */ PROP_THICK_WRAP = (1 << 23), - /* Reject values outside limits, use for python api only so far - * this is for use when silently clamping string length will give - * bad behavior later. Could also enforce this for INT's and other types. - * note: currently no support for function arguments or non utf8 paths (filepaths) */ - PROP_NEVER_CLAMP = (1 << 26), - /* internal flags */ PROP_BUILTIN = (1 << 7), PROP_EXPORT = (1 << 8), diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index e8be1bd3610..18c3f107876 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -595,7 +595,7 @@ static void rna_def_keyingset_info(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", KEYINGSET_IDNAME_DOC); prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); @@ -792,7 +792,7 @@ static void rna_def_keyingset(BlenderRNA *brna) /* Id/Label */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", KEYINGSET_IDNAME_DOC); /* RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_RENAME, NULL); */ /* NOTE: disabled, as ID name shouldn't be editable */ diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 08bb87fb18f..63a51071c56 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -6320,7 +6320,7 @@ static void rna_def_node_socket(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", ""); /* draw socket */ @@ -6394,7 +6394,7 @@ static void rna_def_node_socket_interface(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_socket_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", ""); func = RNA_def_function(srna, "draw", NULL); @@ -7096,7 +7096,7 @@ static void rna_def_node(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", ""); prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); @@ -7475,7 +7475,7 @@ static void rna_def_nodetree(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", ""); prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 596f7d9cc1b..1ec11c280cb 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -479,7 +479,7 @@ static void rna_def_render_engine(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->name"); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 6559c27c503..ed526d00741 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -965,7 +965,7 @@ static void rna_def_panel(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); 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 " @@ -1039,7 +1039,7 @@ static void rna_def_uilist(BlenderRNA *brna) /* Registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", "If this is set, the uilist gets a custom ID, otherwise it takes the " "name of the class used to define the uilist (for example, if the " @@ -1173,7 +1173,7 @@ static void rna_def_header(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); 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 " @@ -1228,7 +1228,7 @@ static void rna_def_menu(BlenderRNA *brna) /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); 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 menu (for example, if the " diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index da2c8017178..f73c285ada8 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2973,7 +2973,7 @@ static void rna_def_userdef_addon_pref(BlenderRNA *brna) RNA_define_verify_sdna(0); prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "module"); - RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_define_verify_sdna(1); } diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index b82dae1bf23..3cad1df83f4 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1378,7 +1378,7 @@ static void rna_def_operator(BlenderRNA *brna) RNA_def_property_string_maxlength(prop, OP_MAX_TYPENAME - 3); 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); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_struct_name_property(srna, prop); prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); @@ -1451,7 +1451,7 @@ static void rna_def_macro_operator(BlenderRNA *brna) 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); + RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_struct_name_property(srna, prop); prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); -- cgit v1.2.3