diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-27 15:41:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-06 21:06:09 +0300 |
commit | 74fd17e9d788394fa5bf781bb3e60bca7617b22c (patch) | |
tree | a27bcd7e67f74cd0abfeb06b6b9f13e049d736f2 /source/blender/makesrna/intern/rna_main_api.c | |
parent | 4ac048f4e4ef1945fe085c3c0ebf263eb51d8d1b (diff) |
UI/Python: rename Lamps to Lights, to follow more standard terminology.
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
Diffstat (limited to 'source/blender/makesrna/intern/rna_main_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 5fca91064b6..febe74f63c9 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -319,7 +319,7 @@ Mesh *rna_Main_meshes_new_from_object( return BKE_mesh_new_from_object(depsgraph, bmain, sce, ob, apply_modifiers, calc_tessface, calc_undeformed); } -static Lamp *rna_Main_lamps_new(Main *bmain, const char *name, int type) +static Lamp *rna_Main_lights_new(Main *bmain, const char *name, int type) { char safe_name[MAX_ID_NAME - 2]; rna_idname_validate(name, safe_name); @@ -603,7 +603,7 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(objects, object, ID_OB) RNA_MAIN_ID_TAG_FUNCS_DEF(materials, mat, ID_MA) RNA_MAIN_ID_TAG_FUNCS_DEF(node_groups, nodetree, ID_NT) RNA_MAIN_ID_TAG_FUNCS_DEF(meshes, mesh, ID_ME) -RNA_MAIN_ID_TAG_FUNCS_DEF(lamps, lamp, ID_LA) +RNA_MAIN_ID_TAG_FUNCS_DEF(lights, lamp, ID_LA) RNA_MAIN_ID_TAG_FUNCS_DEF(libraries, library, ID_LI) RNA_MAIN_ID_TAG_FUNCS_DEF(screens, screen, ID_SCR) RNA_MAIN_ID_TAG_FUNCS_DEF(window_managers, wm, ID_WM) @@ -894,42 +894,43 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_boolean(func, "value", 0, "Value", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); } -void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop) + +void RNA_def_main_lights(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; FunctionRNA *func; PropertyRNA *parm; - RNA_def_property_srna(cprop, "BlendDataLamps"); - srna = RNA_def_struct(brna, "BlendDataLamps", NULL); + RNA_def_property_srna(cprop, "BlendDataLights"); + srna = RNA_def_struct(brna, "BlendDataLights", NULL); RNA_def_struct_sdna(srna, "Main"); - RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps"); + RNA_def_struct_ui_text(srna, "Main Lights", "Collection of lights"); - func = RNA_def_function(srna, "new", "rna_Main_lamps_new"); - RNA_def_function_ui_description(func, "Add a new lamp to the main database"); - parm = RNA_def_string(func, "name", "Lamp", 0, "", "New name for the data-block"); + func = RNA_def_function(srna, "new", "rna_Main_lights_new"); + RNA_def_function_ui_description(func, "Add a new light to the main database"); + parm = RNA_def_string(func, "name", "Light", 0, "", "New name for the data-block"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); - parm = RNA_def_enum(func, "type", rna_enum_lamp_type_items, 0, "Type", "The type of texture to add"); + parm = RNA_def_enum(func, "type", rna_enum_light_type_items, 0, "Type", "The type of texture to add"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* return type */ - parm = RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp data-block"); + parm = RNA_def_pointer(func, "light", "Light", "", "New light data-block"); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile"); - parm = RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove"); + RNA_def_function_ui_description(func, "Remove a light from the current blendfile"); + parm = RNA_def_pointer(func, "light", "Light", "", "Light to remove"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); RNA_def_boolean(func, "do_unlink", true, "", - "Unlink all usages of this lamp before deleting it " - "(WARNING: will also delete objects instancing that lamp data)"); + "Unlink all usages of this Light before deleting it " + "(WARNING: will also delete objects instancing that light data)"); RNA_def_boolean(func, "do_id_user", true, "", - "Decrement user counter of all datablocks used by this lamp data"); + "Decrement user counter of all datablocks used by this light data"); RNA_def_boolean(func, "do_ui_user", true, "", - "Make sure interface does not reference this lamp data"); + "Make sure interface does not reference this light data"); - func = RNA_def_function(srna, "tag", "rna_Main_lamps_tag"); + func = RNA_def_function(srna, "tag", "rna_Main_lights_tag"); parm = RNA_def_boolean(func, "value", 0, "Value", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); } |