diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-16 14:43:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-16 15:00:29 +0400 |
commit | 348cf17448624c66711465d373fc0c46fa000863 (patch) | |
tree | 6b4152ed944218550f6966271f9e7a95fe523b9b /source/blender/makesrna/intern/rna_ui_api.c | |
parent | 9f167908402dae589f8e230115f0439faa4a086c (diff) |
Code Cleanup: no need to pass empty strings as default values
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 1bc70a76614..f3f31b5dd66 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -371,8 +371,8 @@ static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propna static void api_ui_item_common_text(FunctionRNA *func) { - RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item"); - RNA_def_string(func, "text_ctxt", "", 0, "", "Override automatic translation context of the given text"); + RNA_def_string(func, "text", NULL, 0, "", "Override automatic text of the item"); + RNA_def_string(func, "text_ctxt", NULL, 0, "", "Override automatic translation context of the given text"); RNA_def_boolean(func, "translate", true, "", "Translate the given text, when UI translation is enabled"); } @@ -390,7 +390,7 @@ static void api_ui_item_common(FunctionRNA *func) static void api_ui_item_op(FunctionRNA *func) { PropertyRNA *parm; - parm = RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator"); + parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); RNA_def_property_flag(parm, PROP_REQUIRED); } @@ -406,7 +406,7 @@ static void api_ui_item_rna_common(FunctionRNA *func) parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); RNA_def_property_flag(parm, PROP_REQUIRED); } @@ -474,20 +474,20 @@ void RNA_api_ui_layout(StructRNA *srna) /* UI name, description and icon of an enum item */ func = RNA_def_function(srna, "enum_item_name", "rna_ui_get_enum_name"); - parm = RNA_def_string(func, "name", "", 0, "", "UI name of the enum item"); + parm = RNA_def_string(func, "name", NULL, 0, "", "UI name of the enum item"); RNA_def_function_return(func, parm); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); api_ui_item_rna_common(func); - parm = RNA_def_string(func, "identifier", "", 0, "", "Identifier of the enum item"); + parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Return the UI name for this enum item"); func = RNA_def_function(srna, "enum_item_description", "rna_ui_get_enum_description"); - parm = RNA_def_string(func, "description", "", 0, "", "UI description of the enum item"); + parm = RNA_def_string(func, "description", NULL, 0, "", "UI description of the enum item"); RNA_def_function_return(func, parm); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); api_ui_item_rna_common(func); - parm = RNA_def_string(func, "identifier", "", 0, "", "Identifier of the enum item"); + parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Return the UI description for this enum item"); @@ -496,7 +496,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_return(func, parm); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); api_ui_item_rna_common(func); - parm = RNA_def_string(func, "identifier", "", 0, "", "Identifier of the enum item"); + parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Return the icon for this enum item"); @@ -529,7 +529,7 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "prop_enum", "rna_uiItemEnumR_string"); api_ui_item_rna_common(func); - parm = RNA_def_string(func, "value", "", 0, "", "Enum property value"); + parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value"); RNA_def_property_flag(parm, PROP_REQUIRED); api_ui_item_common(func); @@ -537,7 +537,7 @@ void RNA_api_ui_layout(StructRNA *srna) api_ui_item_rna_common(func); parm = RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); - parm = RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property"); + parm = RNA_def_string(func, "search_property", NULL, 0, "", "Identifier of search collection property"); RNA_def_property_flag(parm, PROP_REQUIRED); api_ui_item_common(func); @@ -551,15 +551,15 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator"); func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); - parm = RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator"); + parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "operator_menu_enum", "rna_uiItemMenuEnumO"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */ - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); api_ui_item_common(func); @@ -568,21 +568,21 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string"); api_ui_item_op_common(func); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "value", "", 0, "", "Enum property value"); + parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value"); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "operator_boolean", "uiItemBooleanO"); api_ui_item_op_common(func); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_boolean(func, "value", false, "", "Value of the property to call the operator with"); RNA_def_property_flag(parm, PROP_REQUIRED); */ func = RNA_def_function(srna, "operator_int", "uiItemIntO"); api_ui_item_op_common(func); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", "Value of the property to call the operator with", INT_MIN, INT_MAX); @@ -590,7 +590,7 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "operator_float", "uiItemFloatO"); api_ui_item_op_common(func); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", "Value of the property to call the operator with", -FLT_MAX, FLT_MAX); @@ -598,9 +598,9 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "operator_string", "uiItemStringO"); api_ui_item_op_common(func); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with"); + parm = RNA_def_string(func, "value", NULL, 0, "", "Value of the property to call the operator with"); RNA_def_property_flag(parm, PROP_REQUIRED); #endif @@ -614,7 +614,7 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "menu", "rna_uiItemM"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); - parm = RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu"); + parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu"); api_ui_item_common(func); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -623,7 +623,7 @@ void RNA_api_ui_layout(StructRNA *srna) /* context */ func = RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer"); - parm = RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context"); + parm = RNA_def_string(func, "name", NULL, 0, "Name", "Name of entry in the context"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); @@ -636,25 +636,25 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "template_ID", "uiTemplateID"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); api_ui_item_rna_common(func); - RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block"); - RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block"); - RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block"); + RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); + RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); + RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); api_ui_item_rna_common(func); - RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block"); - RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block"); - RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block"); + RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); + RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); + RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX); RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID"); parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "type_property", "", 0, "", + parm = RNA_def_string(func, "type_property", NULL, 0, "", "Identifier of property in data giving the type of the ID-blocks to use"); RNA_def_property_flag(parm, PROP_REQUIRED); api_ui_item_common_text(func); @@ -662,7 +662,7 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "template_path_builder", "rna_uiTemplatePathBuilder"); parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); @@ -723,7 +723,7 @@ void RNA_api_ui_layout(StructRNA *srna) api_ui_item_rna_common(func); parm = RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); - parm = RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data"); + parm = RNA_def_string(func, "used_layers_property", NULL, 0, "", "Identifier of property in data"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -785,9 +785,9 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "template_list", "uiTemplateList"); RNA_def_function_ui_description(func, "Item. A list widget to display data, e.g. vertexgroups."); RNA_def_function_flag(func, FUNC_USE_CONTEXT); - parm = RNA_def_string(func, "listtype_name", "", 0, "", "Identifier of the list type to use"); + parm = RNA_def_string(func, "listtype_name", NULL, 0, "", "Identifier of the list type to use"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "list_id", "", 0, "", + parm = RNA_def_string(func, "list_id", NULL, 0, "", "Identifier of this list widget (mandatory when using default \"" UI_UL_DEFAULT_CLASS_NAME "\" class). " "If this is set, the uilist gets a custom ID, otherwise it takes the " @@ -796,12 +796,12 @@ void RNA_api_ui_layout(StructRNA *srna) "script, then bl_idname = \"OBJECT_UL_vgroups\")"); parm = RNA_def_pointer(func, "dataptr", "AnyType", "", "Data from which to take the Collection property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); - parm = RNA_def_string(func, "propname", "", 0, "", "Identifier of the Collection property in data"); + parm = RNA_def_string(func, "propname", NULL, 0, "", "Identifier of the Collection property in data"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "active_dataptr", "AnyType", "", "Data from which to take the integer property, index of the active item"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); - parm = RNA_def_string(func, "active_propname", "", 0, "", + parm = RNA_def_string(func, "active_propname", NULL, 0, "", "Identifier of the integer property in active_data, index of the active item"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Default and minimum number of rows to display", 0, INT_MAX); @@ -851,12 +851,12 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_ui_description(func, "Item. Display expanded property in a popup menu"); parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_string(func, "name", "", 0, "", ""); + RNA_def_string(func, "name", NULL, 0, "", ""); func = RNA_def_function(srna, "introspect", "uiLayoutIntrospect"); - parm = RNA_def_string(func, "string", "", 1024 * 1024, "Descr", "DESCR"); + parm = RNA_def_string(func, "string", NULL, 1024 * 1024, "Descr", "DESCR"); RNA_def_function_return(func, parm); /* color management templates */ |