diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_action.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 30 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_image_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mask.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 26 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 80 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm_api.c | 18 |
17 files changed, 114 insertions, 92 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index c5b7c88d8fc..9146677eb5e 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -558,10 +558,10 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_Action_fcurve_new"); RNA_def_function_ui_description(func, "Add a keyframe to the F-Curve"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_string(func, "data_path", "", 0, "Data Path", "F-Curve data path to use"); + parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "F-Curve data path to use"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX); - RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this F-Curve into"); + RNA_def_string(func, "action_group", NULL, 0, "Action Group", "Acton group to add this F-Curve into"); parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve"); RNA_def_function_return(func, parm); @@ -590,7 +590,7 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_Action_pose_markers_new"); RNA_def_function_ui_description(func, "Add a pose marker to the action"); - parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)"); + parm = RNA_def_string(func, "name", "Marker", 0, NULL, "New name for the marker (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker"); diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 31fdd19f169..9c4f88d7bf9 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -738,7 +738,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_flag(parm, PROP_REQUIRED); /* rna-path */ /* XXX hopefully this is long enough */ - parm = RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property"); + parm = RNA_def_string(func, "data_path", NULL, 256, "Data-Path", "RNA-Path to destination property"); RNA_def_property_flag(parm, PROP_REQUIRED); /* index (defaults to -1 for entire array) */ RNA_def_int(func, "index", -1, -1, INT_MAX, "Index", @@ -747,7 +747,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) /* grouping */ RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use"); - RNA_def_string(func, "group_name", "", 64, "Group Name", + RNA_def_string(func, "group_name", NULL, 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name)"); diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 3a5a1d30cd8..044162f7b6e 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1655,6 +1655,20 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value) case PROP_STRING: { StringPropertyRNA *sprop = (StringPropertyRNA *)prop; + + if (value == NULL) { + fprintf(stderr, "%s: \"%s.%s\", NULL string passed (dont call in this case).\n", __func__, srna->identifier, prop->identifier); + DefRNA.error = 1; + break; + } + + if (!value[0]) { + fprintf(stderr, "%s: \"%s.%s\", empty string passed (dont call in this case).\n", __func__, srna->identifier, prop->identifier); + DefRNA.error = 1; + // BLI_assert(0); + break; + } + sprop->defaultvalue = value; break; } @@ -2635,7 +2649,9 @@ PropertyRNA *RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, { ContainerRNA *cont = cont_; PropertyRNA *prop; - + + BLI_assert(default_value == NULL || default_value[0]); + prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_NONE); if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen); if (default_value) RNA_def_property_string_default(prop, default_value); @@ -2649,7 +2665,9 @@ PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *id { ContainerRNA *cont = cont_; PropertyRNA *prop; - + + BLI_assert(default_value == NULL || default_value[0]); + prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_FILEPATH); if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen); if (default_value) RNA_def_property_string_default(prop, default_value); @@ -2663,7 +2681,9 @@ PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *ide { ContainerRNA *cont = cont_; PropertyRNA *prop; - + + BLI_assert(default_value == NULL || default_value[0]); + prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_DIRPATH); if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen); if (default_value) RNA_def_property_string_default(prop, default_value); @@ -2677,7 +2697,9 @@ PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *id { ContainerRNA *cont = cont_; PropertyRNA *prop; - + + BLI_assert(default_value == NULL || default_value[0]); + prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_FILENAME); if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen); if (default_value) RNA_def_property_string_default(prop, default_value); diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index bcf75df31ed..8b6849a879a 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -287,7 +287,7 @@ void RNA_api_image(StructRNA *srna) func = RNA_def_function(srna, "save_render", "rna_Image_save_render"); RNA_def_function_ui_description(func, "Save image to a specific path using a scenes render settings"); RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); - parm = RNA_def_string_file_path(func, "filepath", "", 0, "", "Save path"); + parm = RNA_def_string_file_path(func, "filepath", NULL, 0, "", "Save path"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from"); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 98cf419246a..5d0d7bf20df 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -954,7 +954,7 @@ void RNA_api_main(StructRNA *srna) * for now they are all in collections bpy.data.images.new(...) */ func = RNA_def_function(srna, "add_image", "rna_Main_add_image"); RNA_def_function_ui_description(func, "Add a new image"); - parm = RNA_def_string_file_path(func, "filepath", "", 0, "", "File path to load image from"); + parm = RNA_def_string_file_path(func, "filepath", NULL, 0, "", "File path to load image from"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "image", "Image", "", "New image"); RNA_def_function_return(func, parm); @@ -1946,7 +1946,7 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) /* new func */ func = RNA_def_function(srna, "new", "rna_Main_mask_new"); RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database"); - RNA_def_string_file_path(func, "name", "", MAX_ID_NAME - 2, "Mask", "Name of new mask datablock"); + RNA_def_string_file_path(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask datablock"); /* return type */ parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask datablock"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 670df017038..f47579cdb82 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -901,7 +901,7 @@ static void rna_def_masklayers(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_Mask_layers_new"); RNA_def_function_ui_description(func, "Add layer to this mask"); - RNA_def_string(func, "name", "", 0, "Name", "Name of new layer"); + RNA_def_string(func, "name", NULL, 0, "Name", "Name of new layer"); parm = RNA_def_pointer(func, "layer", "MaskLayer", "", "New mask layer"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index 76097b04c99..212859cfea4 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -175,7 +175,7 @@ void RNA_api_mesh(StructRNA *srna) "Compute tangents and bitangent signs, to be used together with the split normals " "to get a complete tangent space for normal mapping " "(split normals are also computed if not yet present)"); - parm = RNA_def_string(func, "uvmap", "", MAX_CUSTOMDATA_LAYER_NAME, "", + parm = RNA_def_string(func, "uvmap", NULL, MAX_CUSTOMDATA_LAYER_NAME, "", "Name of the UV map to use for tangent space computation"); func = RNA_def_function(srna, "free_tangents", "rna_Mesh_free_tangents"); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 869ecbb2ccd..08b86b574b0 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3822,7 +3822,7 @@ static void def_sh_script(StructRNA *srna) #if 0 /* XXX TODO use general node api for this */ func = RNA_def_function(srna, "find_socket", "rna_ShaderNodeScript_find_socket"); RNA_def_function_ui_description(func, "Find a socket by name"); - parm = RNA_def_string(func, "name", "", 0, "Socket name", ""); + parm = RNA_def_string(func, "name", NULL, 0, "Socket name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); /*parm =*/ RNA_def_boolean(func, "is_output", FALSE, "Output", "Whether the socket is an output"); parm = RNA_def_pointer(func, "result", "NodeSocket", "", ""); @@ -3831,7 +3831,7 @@ static void def_sh_script(StructRNA *srna) func = RNA_def_function(srna, "add_socket", "rna_ShaderNodeScript_add_socket"); RNA_def_function_ui_description(func, "Add a socket socket"); RNA_def_function_flag(func, FUNC_USE_SELF_ID); - parm = RNA_def_string(func, "name", "", 0, "Name", ""); + parm = RNA_def_string(func, "name", NULL, 0, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -4261,7 +4261,7 @@ static void rna_def_cmp_output_file_slots_api(BlenderRNA *brna, PropertyRNA *cpr func = RNA_def_function(srna, "new", "rna_NodeOutputFile_slots_new"); RNA_def_function_ui_description(func, "Add a file slot to this node"); RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS | FUNC_USE_CONTEXT); - parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", ""); + parm = RNA_def_string(func, "name", NULL, MAX_NAME, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); /* return value */ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket"); @@ -6321,7 +6321,7 @@ static void rna_def_node_socket(BlenderRNA *brna) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); parm = RNA_def_property(func, "text", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(parm, "Text", "Text label to draw alongside properties"); - RNA_def_property_string_default(parm, ""); + // RNA_def_property_string_default(parm, ""); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "draw_color", NULL); @@ -6410,7 +6410,7 @@ static void rna_def_node_socket_interface(BlenderRNA *brna) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); parm = RNA_def_pointer(func, "socket", "NodeSocket", "Socket", "Socket to initialize"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); - parm = RNA_def_string(func, "data_path", "", 0, "Data Path", "Path to specialized socket data"); + parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "Path to specialized socket data"); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "from_socket", NULL); @@ -6719,7 +6719,7 @@ static void rna_def_node_socket_standard_types(BlenderRNA *brna) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); parm = RNA_def_property(func, "text", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(parm, "Text", "Text label to draw alongside properties"); - RNA_def_property_string_default(parm, ""); + // RNA_def_property_string_default(parm, ""); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "draw_color", "rna_NodeSocketStandard_draw_color"); @@ -6897,11 +6897,11 @@ static void rna_def_node_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int i func = RNA_def_function(srna, "new", newfunc); RNA_def_function_ui_description(func, "Add a socket to this node"); RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); - parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type"); + parm = RNA_def_string(func, "type", NULL, MAX_NAME, "Type", "Data type"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", ""); + parm = RNA_def_string(func, "name", NULL, MAX_NAME, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_string(func, "identifier", "", MAX_NAME, "Identifier", "Unique socket identifier"); + RNA_def_string(func, "identifier", NULL, MAX_NAME, "Identifier", "Unique socket identifier"); /* return value */ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket"); RNA_def_function_return(func, parm); @@ -7195,7 +7195,7 @@ static void rna_def_node(BlenderRNA *brna) func = RNA_def_function(srna, "draw_label", NULL); RNA_def_function_ui_description(func, "Returns a dynamic label string"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); - parm = RNA_def_string(func, "label", "", MAX_NAME, "Label", ""); + parm = RNA_def_string(func, "label", NULL, MAX_NAME, "Label", ""); RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ RNA_def_function_output(func, parm); } @@ -7262,7 +7262,7 @@ static void rna_def_nodetree_nodes_api(BlenderRNA *brna, PropertyRNA *cprop) /* XXX warning note should eventually be removed, * added this here to avoid frequent confusion with API changes from "type" to "bl_idname" */ - parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add (Warning: should be same as node.bl_idname, not node.type!)"); + parm = RNA_def_string(func, "type", NULL, MAX_NAME, "Type", "Type of node to add (Warning: should be same as node.bl_idname, not node.type!)"); RNA_def_property_flag(parm, PROP_REQUIRED); /* return value */ parm = RNA_def_pointer(func, "node", "Node", "", "New node"); @@ -7341,9 +7341,9 @@ static void rna_def_node_tree_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, func = RNA_def_function(srna, "new", newfunc); RNA_def_function_ui_description(func, "Add a socket to this node tree"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type"); + parm = RNA_def_string(func, "type", NULL, MAX_NAME, "Type", "Data type"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", ""); + parm = RNA_def_string(func, "name", NULL, MAX_NAME, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); /* return value */ parm = RNA_def_pointer(func, "socket", "NodeSocketInterface", "", "New socket"); diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 85e0d91fc71..fc97a32f3a7 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -588,7 +588,7 @@ void RNA_api_object(StructRNA *srna) parm = RNA_def_enum(func, "type", mesh_dm_info_items, 0, "", "Modifier settings to apply"); RNA_def_property_flag(parm, PROP_REQUIRED); /* weak!, no way to return dynamic string type */ - parm = RNA_def_string(func, "result", "", 16384, "result", ""); + parm = RNA_def_string(func, "result", NULL, 16384, "result", ""); RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ RNA_def_function_output(func, parm); #endif /* NDEBUG */ diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 031c5bdc367..596f7d9cc1b 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -380,7 +380,7 @@ static void rna_def_render_engine(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_REQUIRED); prop = RNA_def_int(func, "h", 0, 0, INT_MAX, "Height", "", 0, INT_MAX); RNA_def_property_flag(prop, PROP_REQUIRED); - RNA_def_string(func, "layer", "", 0, "Layer", "Single layer to get render result for"); /* NULL ok here */ + RNA_def_string(func, "layer", NULL, 0, "Layer", "Single layer to get render result for"); /* NULL ok here */ prop = RNA_def_pointer(func, "result", "RenderResult", "Result", ""); RNA_def_function_return(func, prop); @@ -403,9 +403,9 @@ static void rna_def_render_engine(BlenderRNA *brna) func = RNA_def_function(srna, "update_stats", "RE_engine_update_stats"); RNA_def_function_ui_description(func, "Update and signal to redraw render status text"); - prop = RNA_def_string(func, "stats", "", 0, "Stats", ""); + prop = RNA_def_string(func, "stats", NULL, 0, "Stats", ""); RNA_def_property_flag(prop, PROP_REQUIRED); - prop = RNA_def_string(func, "info", "", 0, "Info", ""); + prop = RNA_def_string(func, "info", NULL, 0, "Info", ""); RNA_def_property_flag(prop, PROP_REQUIRED); func = RNA_def_function(srna, "update_progress", "RE_engine_update_progress"); @@ -423,7 +423,7 @@ static void rna_def_render_engine(BlenderRNA *brna) RNA_def_function_ui_description(func, "Report info, warning or error messages"); prop = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", ""); RNA_def_property_flag(prop, PROP_REQUIRED); - prop = RNA_def_string(func, "message", "", 0, "Report Message", ""); + prop = RNA_def_string(func, "message", NULL, 0, "Report Message", ""); RNA_def_property_flag(prop, PROP_REQUIRED); func = RNA_def_function(srna, "bind_display_space_shader", "engine_bind_display_space_shader"); @@ -520,7 +520,7 @@ static void rna_def_render_result(BlenderRNA *brna) func = RNA_def_function(srna, "load_from_file", "RE_result_load_from_file"); RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name", + parm = RNA_def_string_file_name(func, "filename", NULL, FILE_MAX, "File Name", "Filename to load into this render tile, must be no smaller than " "the render result"); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -556,7 +556,7 @@ static void rna_def_render_layer(BlenderRNA *brna) func = RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file"); RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - prop = RNA_def_string(func, "filename", "", 0, "Filename", + prop = RNA_def_string(func, "filename", NULL, 0, "Filename", "Filename to load into this render tile, must be no smaller than the renderlayer"); RNA_def_property_flag(prop, PROP_REQUIRED); RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X", diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index e7edf413f3a..0426d06e583 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5371,7 +5371,7 @@ void RNA_def_scene(BlenderRNA *brna) /* Statistics */ func = RNA_def_function(srna, "statistics", "ED_info_stats_string"); - prop = RNA_def_string(func, "statistics", "", 0, "Statistics", ""); + prop = RNA_def_string(func, "statistics", NULL, 0, "Statistics", ""); RNA_def_function_return(func, prop); /* Grease Pencil */ diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index a0a0ec96711..a4f1f84f94d 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -219,7 +219,7 @@ void RNA_api_scene(StructRNA *srna) #ifdef WITH_COLLADA /* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */ func = RNA_def_function(srna, "collada_export", "rna_Scene_collada_export"); - parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file"); + parm = RNA_def_string(func, "filepath", NULL, FILE_MAX, "File Path", "File path to write Collada file"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */ parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers"); @@ -258,7 +258,7 @@ void RNA_api_scene_render(StructRNA *srna) RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame"); RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used", MINAFRAME, MAXFRAME); - parm = RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path", + parm = RNA_def_string_file_path(func, "filepath", NULL, FILE_MAX, "File Path", "The resulting filepath from the scenes render settings"); RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ RNA_def_function_output(func, parm); diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c index 132faacbaac..3a91796a727 100644 --- a/source/blender/makesrna/intern/rna_texture_api.c +++ b/source/blender/makesrna/intern/rna_texture_api.c @@ -118,7 +118,7 @@ void RNA_api_environment_map(StructRNA *srna) RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings"); RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); - parm = RNA_def_string_file_name(func, "filepath", "", FILE_MAX, "File path", "Location of the output file"); + parm = RNA_def_string_file_name(func, "filepath", NULL, FILE_MAX, "File path", "Location of the output file"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken"); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 4aab1656f19..dd0f0af81e4 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1662,7 +1662,7 @@ static void rna_def_trackingTracks(BlenderRNA *brna) func = RNA_def_function(srna, "new", "rna_trackingTracks_new"); RNA_def_function_flag(func, FUNC_USE_SELF_ID); RNA_def_function_ui_description(func, "Create new motion track in this movie clip"); - RNA_def_string(func, "name", "", 0, "", "Name of new track"); + RNA_def_string(func, "name", NULL, 0, "", "Name of new track"); RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add track on", MINFRAME, MAXFRAME); parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "Newly created track"); RNA_def_function_return(func, parm); @@ -1709,7 +1709,7 @@ static void rna_def_trackingObjectTracks(BlenderRNA *brna) func = RNA_def_function(srna, "new", "rna_trackingObject_tracks_new"); RNA_def_function_flag(func, FUNC_USE_SELF_ID); RNA_def_function_ui_description(func, "create new motion track in this movie clip"); - RNA_def_string(func, "name", "", 0, "", "Name of new track"); + RNA_def_string(func, "name", NULL, 0, "", "Name of new track"); RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add tracks on", MINFRAME, MAXFRAME); parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "Newly created track"); RNA_def_function_return(func, parm); @@ -1824,7 +1824,7 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_trackingObject_new"); RNA_def_function_ui_description(func, "Add tracking object to this movie clip"); - parm = RNA_def_string(func, "name", "", 0, "", "Name of new object"); + parm = RNA_def_string(func, "name", NULL, 0, "", "Name of new object"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "object", "MovieTrackingObject", "", "New motion tracking object"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index a82763994f8..432c0503210 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -1086,7 +1086,7 @@ static void rna_def_uilist(BlenderRNA *brna) parm = RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); - parm = RNA_def_string(func, "active_property", "", 0, "", + parm = RNA_def_string(func, "active_property", NULL, 0, "", "Identifier of property in active_data, for the active element"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_int(func, "index", 0, 0, INT_MAX, "", "Index of the item in the collection", 0, INT_MAX); @@ -1113,7 +1113,7 @@ static void rna_def_uilist(BlenderRNA *brna) RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take Collection property"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); - parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data, for the collection"); + parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data, for the collection"); RNA_def_property_flag(parm, PROP_REQUIRED); prop = RNA_def_property(func, "filter_flags", PROP_INT, PROP_UNSIGNED); RNA_def_property_flag(prop, PROP_REQUIRED | PROP_DYNAMIC); 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 */ diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 923e7f98360..ea13cff442a 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -447,7 +447,7 @@ void RNA_api_wm(StructRNA *srna) /* wrap uiPupMenuBegin */ func = RNA_def_function(srna, "pupmenu_begin__internal", "rna_PupMenuBegin"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); - parm = RNA_def_string(func, "title", "", 0, "", ""); + parm = RNA_def_string(func, "title", NULL, 0, "", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(parm, icon_items); @@ -472,7 +472,7 @@ void RNA_api_operator(StructRNA *srna) func = RNA_def_function(srna, "report", "rna_Operator_report"); parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "message", "", 0, "Report Message", ""); + parm = RNA_def_string(func, "message", NULL, 0, "Report Message", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -556,7 +556,7 @@ void RNA_api_macro(StructRNA *srna) func = RNA_def_function(srna, "report", "rna_Operator_report"); parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_string(func, "message", "", 0, "Report Message", ""); + parm = RNA_def_string(func, "message", NULL, 0, "Report Message", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -622,7 +622,7 @@ void RNA_api_keymapitems(StructRNA *srna) func = RNA_def_function(srna, "new", "rna_KeyMap_item_new"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_string(func, "idname", "", 0, "Operator Identifier", ""); + parm = RNA_def_string(func, "idname", NULL, 0, "Operator Identifier", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -642,7 +642,7 @@ void RNA_api_keymapitems(StructRNA *srna) func = RNA_def_function(srna, "new_modal", "rna_KeyMap_item_new_modal"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_string(func, "propvalue", "", 0, "Property Value", ""); + parm = RNA_def_string(func, "propvalue", NULL, 0, "Property Value", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -677,7 +677,7 @@ void RNA_api_keymaps(StructRNA *srna) PropertyRNA *parm; func = RNA_def_function(srna, "new", "rna_keymap_new"); /* add_keymap */ - parm = RNA_def_string(func, "name", "", 0, "Name", ""); + parm = RNA_def_string(func, "name", NULL, 0, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", ""); RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", ""); @@ -692,7 +692,7 @@ void RNA_api_keymaps(StructRNA *srna) RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); func = RNA_def_function(srna, "find", "rna_keymap_find"); /* find_keymap */ - parm = RNA_def_string(func, "name", "", 0, "Name", ""); + parm = RNA_def_string(func, "name", NULL, 0, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", ""); RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", ""); @@ -700,7 +700,7 @@ void RNA_api_keymaps(StructRNA *srna) RNA_def_function_return(func, parm); func = RNA_def_function(srna, "find_modal", "rna_keymap_find_modal"); /* find_keymap_modal */ - parm = RNA_def_string(func, "name", "", 0, "Operator Name", ""); + parm = RNA_def_string(func, "name", NULL, 0, "Operator Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map"); RNA_def_function_return(func, parm); @@ -712,7 +712,7 @@ void RNA_api_keyconfigs(StructRNA *srna) PropertyRNA *parm; func = RNA_def_function(srna, "new", "WM_keyconfig_new_user"); /* add_keyconfig */ - parm = RNA_def_string(func, "name", "", 0, "Name", ""); + parm = RNA_def_string(func, "name", NULL, 0, "Name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration"); RNA_def_function_return(func, parm); |