Commit: 74fd17e9d788394fa5bf781bb3e60bca7617b22c Author: Brecht Van Lommel Date: Wed Jun 27 14:41:53 2018 +0200 Branches: blender2.8 https://developer.blender.org/rB74fd17e9d788394fa5bf781bb3e60bca7617b22c
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. =================================================================== M intern/cycles/blender/addon/properties.py M intern/cycles/blender/addon/ui.py M intern/cycles/blender/addon/version_update.py M intern/cycles/blender/blender_camera.cpp M intern/cycles/blender/blender_object.cpp M intern/cycles/blender/blender_shader.cpp M intern/cycles/blender/blender_sync.cpp M intern/cycles/blender/blender_sync.h M release/scripts/modules/bl_i18n_utils/bl_extract_messages.py M release/scripts/modules/bl_previews_utils/bl_previews_render.py M release/scripts/modules/bpy_types.py M release/scripts/presets/interface_theme/24x_blues.xml M release/scripts/presets/interface_theme/back_to_black.xml M release/scripts/presets/interface_theme/blender_24x.xml M release/scripts/presets/interface_theme/blender_27x.xml M release/scripts/presets/interface_theme/dark_blue_gradient.xml M release/scripts/presets/interface_theme/default++.xml M release/scripts/presets/interface_theme/elsyiun.xml M release/scripts/presets/interface_theme/flatty_light.xml M release/scripts/presets/interface_theme/graph.xml M release/scripts/presets/interface_theme/hexagon.xml M release/scripts/presets/interface_theme/modern_minimalist.xml M release/scripts/presets/interface_theme/north.xml M release/scripts/presets/interface_theme/rtheme.xml M release/scripts/presets/interface_theme/sandyslate.xml M release/scripts/presets/interface_theme/science_lab.xml M release/scripts/presets/interface_theme/softblend.xml M release/scripts/presets/interface_theme/true_blue_menu.xml D release/scripts/presets/sunsky/classic.py D release/scripts/presets/sunsky/desert.py D release/scripts/presets/sunsky/mountain.py M release/scripts/startup/bl_operators/anim.py M release/scripts/startup/bl_operators/clip.py M release/scripts/startup/bl_ui/__init__.py D release/scripts/startup/bl_ui/properties_data_lamp.py A release/scripts/startup/bl_ui/properties_data_light.py M release/scripts/startup/bl_ui/space_dopesheet.py M release/scripts/startup/bl_ui/space_node.py M release/scripts/startup/bl_ui/space_outliner.py M release/scripts/startup/bl_ui/space_userpref.py M release/scripts/startup/bl_ui/space_view3d.py M release/scripts/startup/nodeitems_builtins.py M release/scripts/templates_py/background_job.py M release/scripts/templates_py/manipulator_custom_geometry.py M release/scripts/templates_py/manipulator_simple.py M source/blender/blenkernel/BKE_node.h M source/blender/blenkernel/intern/idcode.c M source/blender/blenkernel/intern/ipo.c M source/blender/blenkernel/intern/object.c M source/blender/collada/DocumentImporter.cpp M source/blender/depsgraph/intern/builder/deg_builder_relations.cc M source/blender/draw/engines/eevee/eevee_lights.c M source/blender/editors/animation/anim_channels_defines.c M source/blender/editors/include/UI_icons.h M source/blender/editors/interface/interface_icons.c M source/blender/editors/interface/interface_templates.c M source/blender/editors/object/object_add.c M source/blender/editors/object/object_intern.h M source/blender/editors/object/object_ops.c M source/blender/editors/object/object_select.c M source/blender/editors/object/object_transform.c M source/blender/editors/render/render_internal.c M source/blender/editors/render/render_shading.c M source/blender/editors/space_buttons/buttons_context.c M source/blender/editors/space_file/filelist.c M source/blender/editors/space_node/drawnode.c M source/blender/editors/space_node/node_edit.c M source/blender/editors/space_outliner/outliner_draw.c M source/blender/editors/space_view3d/space_view3d.c M source/blender/editors/space_view3d/view3d_manipulator_empty.c M source/blender/editors/space_view3d/view3d_manipulator_lamp.c M source/blender/makesrna/RNA_access.h M source/blender/makesrna/RNA_enum_types.h M source/blender/makesrna/intern/makesrna.c M source/blender/makesrna/intern/rna_ID.c M source/blender/makesrna/intern/rna_access.c M source/blender/makesrna/intern/rna_action.c M source/blender/makesrna/intern/rna_internal.h M source/blender/makesrna/intern/rna_lamp.c M source/blender/makesrna/intern/rna_main.c M source/blender/makesrna/intern/rna_main_api.c M source/blender/makesrna/intern/rna_modifier.c M source/blender/makesrna/intern/rna_object.c M source/blender/makesrna/intern/rna_object_api.c M source/blender/makesrna/intern/rna_scene.c M source/blender/makesrna/intern/rna_space.c M source/blender/makesrna/intern/rna_texture.c M source/blender/makesrna/intern/rna_ui_api.c M source/blender/makesrna/intern/rna_userdef.c M source/blender/nodes/NOD_static_types.h M source/blender/nodes/shader/node_shader_tree.c M source/blender/nodes/shader/nodes/node_shader_output_lamp.c M source/blender/windowmanager/intern/wm_operators.c M tests/python/bl_mesh_modifiers.py M tests/python/bl_pyapi_idprop_datablock.py M tests/python/bl_rna_defaults.py =================================================================== diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index df6949f2095..85947b4bd28 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -887,17 +887,17 @@ class CyclesMaterialSettings(bpy.types.PropertyGroup): del bpy.types.Material.cycles -class CyclesLampSettings(bpy.types.PropertyGroup): +class CyclesLightSettings(bpy.types.PropertyGroup): @classmethod def register(cls): - bpy.types.Lamp.cycles = PointerProperty( - name="Cycles Lamp Settings", - description="Cycles lamp settings", + bpy.types.Light.cycles = PointerProperty( + name="Cycles Light Settings", + description="Cycles light settings", type=cls, ) cls.cast_shadow = BoolProperty( name="Cast Shadow", - description="Lamp casts shadows", + description="Light casts shadows", default=True, ) cls.samples = IntProperty( @@ -914,20 +914,20 @@ class CyclesLampSettings(bpy.types.PropertyGroup): ) cls.use_multiple_importance_sampling = BoolProperty( name="Multiple Importance Sample", - description="Use multiple importance sampling for the lamp, " - "reduces noise for area lamps and sharp glossy materials", + description="Use multiple importance sampling for the light, " + "reduces noise for area lights and sharp glossy materials", default=True, ) cls.is_portal = BoolProperty( name="Is Portal", - description="Use this area lamp to guide sampling of the background, " - "note that this will make the lamp invisible", + description="Use this area light to guide sampling of the background, " + "note that this will make the light invisible", default=False, ) @classmethod def unregister(cls): - del bpy.types.Lamp.cycles + del bpy.types.Light.cycles class CyclesWorldSettings(bpy.types.PropertyGroup): @@ -1460,7 +1460,7 @@ def register(): bpy.utils.register_class(CyclesRenderSettings) bpy.utils.register_class(CyclesCameraSettings) bpy.utils.register_class(CyclesMaterialSettings) - bpy.utils.register_class(CyclesLampSettings) + bpy.utils.register_class(CyclesLightSettings) bpy.utils.register_class(CyclesWorldSettings) bpy.utils.register_class(CyclesVisibilitySettings) bpy.utils.register_class(CyclesMeshSettings) @@ -1475,7 +1475,7 @@ def unregister(): bpy.utils.unregister_class(CyclesRenderSettings) bpy.utils.unregister_class(CyclesCameraSettings) bpy.utils.unregister_class(CyclesMaterialSettings) - bpy.utils.unregister_class(CyclesLampSettings) + bpy.utils.unregister_class(CyclesLightSettings) bpy.utils.unregister_class(CyclesWorldSettings) bpy.utils.unregister_class(CyclesMeshSettings) bpy.utils.unregister_class(CyclesObjectSettings) diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 7a4ed4fbdaf..6688874de49 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1008,7 +1008,7 @@ class CYCLES_OBJECT_PT_cycles_settings(CyclesButtonsPanel, Panel): def poll(cls, context): ob = context.object return (CyclesButtonsPanel.poll(context) and - ob and ((ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'}) or + ob and ((ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'LIGHT'}) or (ob.dupli_type == 'COLLECTION' and ob.dupli_group))) def draw(self, context): @@ -1029,7 +1029,7 @@ class CYCLES_OBJECT_PT_cycles_settings(CyclesButtonsPanel, Panel): flow.prop(visibility, "transmission") flow.prop(visibility, "scatter") - if ob.type != 'LAMP': + if ob.type != 'LIGHT': flow.prop(visibility, "shadow") row = layout.row() @@ -1049,7 +1049,7 @@ class CYCLES_OBJECT_PT_cycles_settings(CyclesButtonsPanel, Panel): class CYCLES_OT_use_shading_nodes(Operator): - """Enable nodes on a material, world or lamp""" + """Enable nodes on a material, world or light""" bl_idname = "cycles.use_shading_nodes" bl_label = "Use Nodes" @@ -1063,8 +1063,8 @@ class CYCLES_OT_use_shading_nodes(Operator): context.material.use_nodes = True elif context.world: context.world.use_nodes = True - elif context.lamp: - context.lamp.use_nodes = True + elif context.light: + context.light.use_nodes = True return {'FINISHED'} @@ -1089,7 +1089,7 @@ def panel_node_draw(layout, id_data, output_type, input_name): return True -class CYCLES_LAMP_PT_preview(CyclesButtonsPanel, Panel): +class CYCLES_LIGHT_PT_preview(CyclesButtonsPanel, Panel): bl_label = "Preview" bl_context = "data" bl_options = {'DEFAULT_CLOSED'} @@ -1097,52 +1097,52 @@ class CYCLES_LAMP_PT_preview(CyclesButtonsPanel, Panel): @classmethod def poll(cls, context): return ( - context.lamp and + context.light and not ( - context.lamp.type == 'AREA' and - context.lamp.cycles.is_portal + context.light.type == 'AREA' and + context.light.cycles.is_portal ) and CyclesButtonsPanel.poll(context) ) def draw(self, context): - self.layout.template_preview(context.lamp) + self.layout.template_preview(context.light) -class CYCLES_LAMP_PT_lamp(CyclesButtonsPanel, Panel): - bl_label = "Lamp" +class CYCLES_LIGHT_PT_light(CyclesButtonsPanel, Panel): + bl_label = "Light" bl_context = "data" @classmethod def poll(cls, context): - return context.lamp and CyclesButtonsPanel.poll(context) + return context.light and CyclesButtonsPanel.poll(context) def draw(self, context): layout = self.layout - lamp = context.lamp - clamp = lamp.cycles + light = context.light + clamp = light.cycles # cscene = context.scene.cycles - layout.prop(lamp, "type", expand=True) + layout.prop(light, "type", expand=True) layout.use_property_split = True col = layout.column() - if lamp.type in {'POINT', 'SUN', 'SPOT'}: - col.prop(lamp, "shadow_soft_size", text="Size") - elif lamp.type == 'AREA': - col.prop(lamp, "shape", text="Shape") + if light.type in {'POINT', 'SUN', 'SPOT'}: + col.prop(light, "shadow_soft_size", text="Size") + elif light.type == 'AREA': + col.prop(light, "shape", text="Shape") sub = col.column(align=True) - if lamp.shape in {'SQUARE', 'DISK'}: - sub.prop(lamp, "size") - elif lamp.shape in {'RECTANGLE', 'ELLIPSE'}: - sub.prop(lamp, "size", text="Size X") - sub.prop(lamp, "size_y", text="Y") + if light.shape in {'SQUARE', 'DISK'}: + sub.prop(light, "size") + elif light.shape in {'RECTANGLE', 'ELLIPSE'}: + sub.prop(light, "size", text="Size X") + sub.prop(light, "size_y", text="Y") - if not (lamp.type == 'AREA' and clamp.is_portal): + if not (light.type == 'AREA' and clamp.is_portal): sub = col.column() if use_branched_path(context): subsub = sub.row(align=True) @@ -1151,53 +1151,53 @@ class CYCLES_LAMP_PT_lamp(CyclesButtonsPanel, Panel): sub.prop(clamp, "max_bounces") sub = col.column(align=True) - sub.active = not (lamp.type == 'AREA' and clamp.is_portal) + sub.active = not (light.type == 'AREA' and clamp.is_portal) sub.prop(clamp, "cast_shadow") sub.prop(clamp, "use_multiple_importance_sampling", text="Multiple Importance") - if lamp.type == 'AREA': + if light.type == 'AREA': col.prop(clamp, "is_portal", text="Portal") - if lamp.type == 'HEMI': - layout.label(text="Not supported, interpreted as sun lamp") + if light.type == 'HEMI': + layout.label(text="Not supported, interpreted as sun light") -class CYCLES_LAMP_PT_nodes(CyclesButtonsPanel, Panel): +class CYCLES_LIGHT_PT_nodes(CyclesButtonsPanel, Panel): bl_label = "Nodes" bl_context = "data" @classmethod def poll(cls, context): - return context.lamp and not (context.lamp.type == 'AREA' and - context.lamp.cycles.is_portal) and \ + return context.light and not (context.light.type == 'AREA' and + context.light.cycles.is_portal) and \ CyclesButtonsPanel.poll(context) def draw(self, context): layout = self.layout - lamp = context.lamp - if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'): - layout.prop(lamp, "color") + light = context.light + if not panel_node_draw(layout, light, 'OUTPUT_LIGHT', 'Surface'): + layout.prop(light, "color") -class CYCLES_LAMP_PT_spot(CyclesButtonsPanel, Panel): +class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel): bl_label = "Spot Shape" bl_context = "data" @classmethod def poll(cls, context): - lamp = context.lamp - return (lamp and lamp.type == 'SPOT') and CyclesButtonsPanel.poll(context) + light = context.light + return (light and light.type == 'SPOT') and CyclesButtonsPanel.poll(context) def draw(self, context): layout = self.layout - lamp = context.lamp + light = context.light layout.use_property_split = True col = layout.column() - col.prop(lamp, "spot_size", tex @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs