[Bf-extensions-cvs] [6aa8e130] blender2.8: Update for renaming lamp to light.

Brecht Van Lommel noreply at git.blender.org
Fri Jul 6 20:25:24 CEST 2018


Commit: 6aa8e130eff59059886e203ff95221609f63b222
Author: Brecht Van Lommel
Date:   Fri Jul 6 19:59:17 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBA6aa8e130eff59059886e203ff95221609f63b222

Update for renaming lamp to light.

===================================================================

M	add_advanced_objects_menu/__init__.py
M	add_advanced_objects_menu/add_light_template.py
M	add_advanced_objects_menu/copy2.py
M	add_advanced_objects_menu/scene_objects_bi.py
M	add_advanced_objects_menu/scene_objects_cycles.py
M	add_advanced_objects_menu/trilighting.py
M	archimesh/__init__.py
M	archimesh/achm_lamp_maker.py
M	archimesh/achm_main_panel.py
M	archipack/archipack_floor.py
M	archipack/archipack_roof.py
M	archipack/archipack_thumbs.py
M	archipack/archipack_window.py
M	archipack/bmesh_utils.py
M	io_export_after_effects.py
M	io_export_dxf/export_dxf.py
M	io_export_dxf/operator.py
M	io_export_dxf/primitive_exporters/lamp_exporter.py
M	io_export_unreal_psk_psa.py
M	io_import_dxf/dxfimport/do.py
M	io_mesh_pdb/__init__.py
M	io_mesh_pdb/import_pdb.py
M	io_online_sketchfab/__init__.py
M	io_online_sketchfab/pack_for_export.py
M	io_scene_3ds/import_3ds.py
M	io_scene_fbx/__init__.py
M	io_scene_fbx/export_fbx.py
M	io_scene_fbx/export_fbx_bin.py
M	io_scene_fbx/fbx_utils.py
M	io_scene_fbx/import_fbx.py
M	io_scene_ms3d/ms3d_ui.py
M	io_scene_obj/__init__.py
M	io_scene_obj/import_obj.py
M	io_scene_x3d/export_x3d.py
M	io_scene_x3d/import_x3d.py
M	light_field_tools/light_field_tools.py
M	measureit/measureit_main.py
M	mesh_carver.py
M	modules/rna_manual_reference.py
M	node_wrangler.py
M	render_povray/__init__.py
M	render_povray/nodes.py
M	render_povray/primitives.py
M	render_povray/render.py
M	render_povray/ui.py
M	space_view3d_display_tools/select_tools.py
M	space_view3d_display_tools/selection_restrictor.py
M	space_view3d_display_tools/useless_tools.py
M	space_view3d_pie_menus/pie_modes_menu.py
M	space_view3d_spacebar_menu.py
M	system_blend_info.py
M	uv_texture_atlas.py

===================================================================

diff --git a/add_advanced_objects_menu/__init__.py b/add_advanced_objects_menu/__init__.py
index 42a33445..e0388bf7 100644
--- a/add_advanced_objects_menu/__init__.py
+++ b/add_advanced_objects_menu/__init__.py
@@ -108,8 +108,8 @@ class INFO_MT_scene_elements_add(Menu):
 
 
 # Define the "Lights" menu
-class INFO_MT_mesh_lamps_add(Menu):
-    bl_idname = "INFO_MT_scene_lamps"
+class INFO_MT_mesh_lights_add(Menu):
+    bl_idname = "INFO_MT_scene_lights"
     bl_label = "Lighting Sets"
 
     def draw(self, context):
@@ -191,7 +191,7 @@ def menu(self, context):
     layout.operator_context = 'INVOKE_REGION_WIN'
     self.layout.separator()
     self.layout.menu("INFO_MT_scene_elements", icon="SCENE_DATA")
-    self.layout.menu("INFO_MT_scene_lamps", icon="LAMP_SPOT")
+    self.layout.menu("INFO_MT_scene_lights", icon="LIGHT_SPOT")
     self.layout.separator()
     self.layout.menu("INFO_MT_array_mods", icon="MOD_ARRAY")
     self.layout.menu("INFO_MT_quick_tools", icon="MOD_BUILD")
diff --git a/add_advanced_objects_menu/add_light_template.py b/add_advanced_objects_menu/add_light_template.py
index 9e2c139f..5b4fbc86 100644
--- a/add_advanced_objects_menu/add_light_template.py
+++ b/add_advanced_objects_menu/add_light_template.py
@@ -5,10 +5,10 @@ from bpy.types import Operator
 from bpy.props import BoolProperty
 
 
-def add_lamps(self, context):
+def add_lights(self, context):
 
     if self.bKeyLight:
-        keyLight = bpy.data.lamps.new(name="Key_Light", type="SPOT")
+        keyLight = bpy.data.lights.new(name="Key_Light", type="SPOT")
         ob = bpy.data.objects.new("Key_Light", keyLight)
         constraint = ob.constraints.new(type='COPY_LOCATION')
         constraint.use_offset = True
@@ -23,7 +23,7 @@ def add_lamps(self, context):
         ob.rotation_euler[2] = -0.785398
 
     if self.bFillLight:
-        fillLight = bpy.data.lamps.new(name="Fill_Light", type="SPOT")
+        fillLight = bpy.data.lights.new(name="Fill_Light", type="SPOT")
         ob = bpy.data.objects.new("Fill_Light", fillLight)
         constraint = ob.constraints.new(type='COPY_LOCATION')
         constraint.use_offset = True
@@ -39,7 +39,7 @@ def add_lamps(self, context):
         ob.data.energy = 0.3
 
     if self.bBackLight:
-        backLight = bpy.data.lamps.new(name="Back_Light", type="SPOT")
+        backLight = bpy.data.lights.new(name="Back_Light", type="SPOT")
         ob = bpy.data.objects.new("Back_Light", backLight)
         constraint = ob.constraints.new(type='COPY_LOCATION')
         constraint.use_offset = True
@@ -121,7 +121,7 @@ class OBJECT_OT_add_light_template(Operator):
                 self.target = context.active_object
                 self.camera = context.scene.camera
 
-            add_lamps(self, context)
+            add_lights(self, context)
 
         except Exception as e:
             self.report({'WARNING'},
diff --git a/add_advanced_objects_menu/copy2.py b/add_advanced_objects_menu/copy2.py
index 489f6dee..9a94ac1d 100644
--- a/add_advanced_objects_menu/copy2.py
+++ b/add_advanced_objects_menu/copy2.py
@@ -168,7 +168,7 @@ def copy_to_from(scene, to_obj, from_obj, copymode, axes, edgescale, scale):
 
     if copymode == 'E':
         # don't pass edgescalling to object types that cannot be scaled
-        if from_obj.type in ["CAMERA", "LAMP", "EMPTY", "ARMATURE", "SPEAKER", "META"]:
+        if from_obj.type in ["CAMERA", "LIGHT", "EMPTY", "ARMATURE", "SPEAKER", "META"]:
             edgescale = False
         edge_copy(scene, to_obj, from_obj, axes, edgescale, scale)
 
diff --git a/add_advanced_objects_menu/scene_objects_bi.py b/add_advanced_objects_menu/scene_objects_bi.py
index f189bb11..f8afd906 100644
--- a/add_advanced_objects_menu/scene_objects_bi.py
+++ b/add_advanced_objects_menu/scene_objects_bi.py
@@ -47,7 +47,7 @@ class add_BI_scene(Operator):
             bpy.ops.view3d.viewnumpad(type='CAMERA')
 
             # add point lamp
-            bpy.ops.object.lamp_add(
+            bpy.ops.object.light_add(
                     type="POINT", location=(4.07625, 1.00545, 5.90386),
                     rotation=(0.650328, 0.055217, 1.866391)
                     )
@@ -59,7 +59,7 @@ class add_BI_scene(Operator):
             lamp1.use_sphere = True
 
             # add point lamp2
-            bpy.ops.object.lamp_add(
+            bpy.ops.object.light_add(
                     type="POINT", location=(-0.57101, -4.24586, 5.53674),
                     rotation=(1.571, 0, 0.785)
                     )
diff --git a/add_advanced_objects_menu/scene_objects_cycles.py b/add_advanced_objects_menu/scene_objects_cycles.py
index 85e85867..b6831791 100644
--- a/add_advanced_objects_menu/scene_objects_cycles.py
+++ b/add_advanced_objects_menu/scene_objects_cycles.py
@@ -47,7 +47,7 @@ class add_cycles_scene(Operator):
             bpy.ops.view3d.viewnumpad(type='CAMERA')
 
             # add point lamp
-            bpy.ops.object.lamp_add(
+            bpy.ops.object.light_add(
                     type="POINT", location=(4.07625, 1.00545, 5.90386),
                     rotation=(0.650328, 0.055217, 1.866391)
                     )
@@ -59,7 +59,7 @@ class add_cycles_scene(Operator):
             lamp1.use_sphere = True
 
             # add point lamp2
-            bpy.ops.object.lamp_add(
+            bpy.ops.object.light_add(
                     type="POINT", location=(-0.57101, -4.24586, 5.53674),
                     rotation=(1.571, 0, 0.785)
                     )
diff --git a/add_advanced_objects_menu/trilighting.py b/add_advanced_objects_menu/trilighting.py
index e0068e66..c163a894 100644
--- a/add_advanced_objects_menu/trilighting.py
+++ b/add_advanced_objects_menu/trilighting.py
@@ -173,7 +173,7 @@ class TriLighting(Operator):
             backx = obj_position.x + self.distance * singleback_vector.x
             backy = obj_position.y + self.distance * singleback_vector.y
 
-            backData = bpy.data.lamps.new(name="TriLamp-Back", type=self.secondarytype)
+            backData = bpy.data.lights.new(name="TriLamp-Back", type=self.secondarytype)
             backData.energy = backEnergy
 
             backLamp = bpy.data.objects.new(name="TriLamp-Back", object_data=backData)
@@ -196,7 +196,7 @@ class TriLighting(Operator):
             rightx = obj_position.x + self.distance * singleright_vector.x
             righty = obj_position.y + self.distance * singleright_vector.y
 
-            rightData = bpy.data.lamps.new(name="TriLamp-Fill", type=self.secondarytype)
+            rightData = bpy.data.lights.new(name="TriLamp-Fill", type=self.secondarytype)
             rightData.energy = fillEnergy
             rightLamp = bpy.data.objects.new(name="TriLamp-Fill", object_data=rightData)
             scene.objects.link(rightLamp)
@@ -215,7 +215,7 @@ class TriLighting(Operator):
             leftx = obj_position.x + self.distance * singleleft_vector.x
             lefty = obj_position.y + self.distance * singleleft_vector.y
 
-            leftData = bpy.data.lamps.new(name="TriLamp-Key", type=self.primarytype)
+            leftData = bpy.data.lights.new(name="TriLamp-Key", type=self.primarytype)
             leftData.energy = keyEnergy
 
             leftLamp = bpy.data.objects.new(name="TriLamp-Key", object_data=leftData)
diff --git a/archimesh/__init__.py b/archimesh/__init__.py
index cb22e157..b1a70a3a 100644
--- a/archimesh/__init__.py
+++ b/archimesh/__init__.py
@@ -53,7 +53,7 @@ if "bpy" in locals():
     importlib.reload(achm_kitchen_maker)
     importlib.reload(achm_shelves_maker)
     importlib.reload(achm_books_maker)
-    importlib.reload(achm_lamp_maker)
+    importlib.reload(achm_light_maker)
     importlib.reload(achm_curtain_maker)
     importlib.reload(achm_venetian_maker)
     importlib.reload(achm_main_panel)
@@ -66,7 +66,7 @@ else:
     from . import achm_venetian_maker
     from . import achm_door_maker
     from . import achm_kitchen_maker
-    from . import achm_lamp_maker
+    from . import achm_light_maker
     from . import achm_main_panel
     from . import achm_roof_maker
     from . import achm_room_maker
@@ -108,7 +108,7 @@ class AchmInfoMtMeshDecorationAdd(Menu):
     # noinspection PyUnusedLocal
     def draw(self, context):
         self.layout.operator("mesh.archimesh_books", text="Add Books")
-        self.layout.operator("mesh.archimesh_lamp", text="Add Lamp")
+        self.layout.operator("mesh.archimesh_light", text="Add Lamp")
         self.layout.operator("mesh.archimesh_roller", text="Add Roller curtains")
         self.layout.operator("mesh.archimesh_venetian", text="Add Venetian blind")
         self.layout.operator("mesh.archimesh_japan", text="Add Japanese curtains")
@@ -210,7 +210,7 @@ def register():
     bpy.utils.register_class(achm_kitchen_maker.AchmExportInventory)
     bpy.utils.register_class(achm_shelves_maker.AchmShelves)
     bpy.utils.register_class(achm_books_maker.AchmBooks)
-    bpy.utils.register_class(achm_lamp_maker.AchmLamp)
+    bpy.utils.register_class(achm_light_maker.AchmLamp)
     bpy.utils.register_class(achm_curtain_maker.AchmRoller)
     bpy.utils.register_class(achm_curtain_maker.AchmJapan)
     bpy.utils.register_class(achm_venetian_maker.AchmVenetian)
@@ -321,7 +321,7 @@ def unregister():
     bpy.utils.unregister_class(achm_kitchen_maker.AchmExportInventory)
     bpy.utils.unregister_class(achm_shelves_maker.AchmShelves)
     bpy.utils.unregister_class(achm_books_maker.AchmBooks)
-    bpy.utils.unregister_class(achm_lamp_maker.AchmLamp)
+    bpy.utils.unregister_class(achm_light_maker.AchmLamp)
     bpy.utils.unregister_class(achm_curtain_maker.AchmRoller)
     bpy.utils.unregister_class(achm_curtain_maker.AchmJapan)
     bpy.utils.unregister_class(achm_venetian_maker.AchmVenetian)
diff --git a/archimesh/achm_lamp_maker.py b/archimesh/achm_lamp_maker.py
index a6b15435..67fbfc1e 100644
--- a/archimesh/achm_lamp_maker.py
+++ b/archimesh/achm_lamp_maker.py
@@ -130,7 +130,7 @@ def set_preset(self):
 # Lamps
 # ------------------------------------------------------------------
 class AchmLamp(Operator):
-    bl_idname = "mesh.archimesh_lamp"
+    bl_idname = "mesh.archimesh_light"
     bl_label = "Lamp"
     bl_description = "Lamp Generator"
     bl_category

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list