diff options
Diffstat (limited to 'archimesh')
-rw-r--r-- | archimesh/__init__.py | 24 | ||||
-rw-r--r-- | archimesh/achm_door_maker.py | 4 | ||||
-rw-r--r-- | archimesh/achm_lamp_maker.py | 26 | ||||
-rw-r--r-- | archimesh/achm_main_panel.py | 4 | ||||
-rw-r--r-- | archimesh/achm_window_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_window_panel.py | 2 |
6 files changed, 31 insertions, 31 deletions
diff --git a/archimesh/__init__.py b/archimesh/__init__.py index cb22e157..07049ff2 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 @@ -92,7 +92,7 @@ from bpy.types import ( AddonPreferences, Menu, Scene, - INFO_MT_mesh_add, + VIEW3D_MT_mesh_add, WindowManager, ) @@ -102,13 +102,13 @@ from bpy.types import ( class AchmInfoMtMeshDecorationAdd(Menu): - bl_idname = "INFO_MT_mesh_decoration_add" + bl_idname = "VIEW3D_MT_mesh_decoration_add" bl_label = "Decoration assets" # 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") @@ -119,7 +119,7 @@ class AchmInfoMtMeshDecorationAdd(Menu): class AchmInfoMtMeshCustomMenuAdd(Menu): - bl_idname = "INFO_MT_mesh_custom_menu_add" + bl_idname = "VIEW3D_MT_mesh_custom_menu_add" bl_label = "Archimesh" # noinspection PyUnusedLocal @@ -134,7 +134,7 @@ class AchmInfoMtMeshCustomMenuAdd(Menu): self.layout.operator("mesh.archimesh_column", text="Add Column") self.layout.operator("mesh.archimesh_stairs", text="Add Stairs") self.layout.operator("mesh.archimesh_roof", text="Add Roof") - self.layout.menu("INFO_MT_mesh_decoration_add", text="Decoration props", icon="GROUP") + self.layout.menu("VIEW3D_MT_mesh_decoration_add", text="Decoration props", icon="GROUP") # -------------------------------------------------------------- # Register all operators and panels @@ -189,7 +189,7 @@ class Archi_Pref(AddonPreferences): # Define menu # noinspection PyUnusedLocal def AchmMenu_func(self, context): - self.layout.menu("INFO_MT_mesh_custom_menu_add", icon="GROUP") + self.layout.menu("VIEW3D_MT_mesh_custom_menu_add", icon="GROUP") def register(): @@ -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) @@ -222,7 +222,7 @@ def register(): bpy.utils.register_class(achm_window_panel.AchmWinPanel) bpy.utils.register_class(achm_window_panel.AchmWindowEditPanel) bpy.utils.register_class(Archi_Pref) - INFO_MT_mesh_add.append(AchmMenu_func) + VIEW3D_MT_mesh_add.append(AchmMenu_func) update_panel(None, bpy.context) # Define properties Scene.archimesh_select_only = BoolProperty( @@ -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) @@ -333,7 +333,7 @@ def unregister(): bpy.utils.unregister_class(achm_window_panel.AchmWinPanel) bpy.utils.unregister_class(achm_window_panel.AchmWindowEditPanel) bpy.utils.unregister_class(Archi_Pref) - INFO_MT_mesh_add.remove(AchmMenu_func) + VIEW3D_MT_mesh_add.remove(AchmMenu_func) # Remove properties del Scene.archimesh_select_only diff --git a/archimesh/achm_door_maker.py b/archimesh/achm_door_maker.py index 6d048bfd..4ef99373 100644 --- a/archimesh/achm_door_maker.py +++ b/archimesh/achm_door_maker.py @@ -233,7 +233,7 @@ def shape_children(mainobject, update=False): myctrl.location.x = 0 myctrl.location.y = -((mp.frame_thick * 3) / 2) myctrl.location.z = -gap - myctrl.draw_type = 'BOUNDS' + myctrl.display_type = 'BOUNDS' myctrl.hide = False myctrl.hide_render = True if bpy.context.scene.render.engine == 'CYCLES': @@ -256,7 +256,7 @@ def shape_children(mainobject, update=False): myctrlbase.location.x = 0 myctrlbase.location.y = -0.15 - (mp.frame_thick / 3) myctrlbase.location.z = -0.10 - myctrlbase.draw_type = 'BOUNDS' + myctrlbase.display_type = 'BOUNDS' myctrlbase.hide = False myctrlbase.hide_render = True if bpy.context.scene.render.engine == 'CYCLES': 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 = 'Archimesh' @@ -375,7 +375,7 @@ class AchmLamp(Operator): self.oldpreset = self.preset # Create lamp - create_lamp_mesh(self) + create_light_mesh(self) return {'FINISHED'} else: self.report({'WARNING'}, "Archimesh: Option only valid in Object mode") @@ -386,13 +386,13 @@ class AchmLamp(Operator): # Generate mesh data # All custom values are passed using self container (self.myvariable) # ------------------------------------------------------------------------------ -def create_lamp_mesh(self): +def create_light_mesh(self): # deactivate others for o in bpy.data.objects: if o.select is True: o.select = False bpy.ops.object.select_all(False) - generate_lamp(self) + generate_light(self) return @@ -401,13 +401,13 @@ def create_lamp_mesh(self): # Generate lamps # All custom values are passed using self container (self.myvariable) # ------------------------------------------------------------------------------ -def generate_lamp(self): +def generate_light(self): location = bpy.context.scene.cursor_location myloc = copy(location) # copy location to keep 3D cursor position # --------------------- # Lamp base # --------------------- - mydata = create_lamp_base("Lamp_base", self.base_height, + mydata = create_light_base("Lamp_base", self.base_height, myloc.x, myloc.y, myloc.z, self.base_segments, self.base_rings, [self.br01, self.br02, self.br03, self.br04, self.br05, self.br06, @@ -429,7 +429,7 @@ def generate_lamp(self): # --------------------- # Lampholder # --------------------- - myholder = create_lampholder("Lampholder", self.holder, + myholder = create_lightholder("Lampholder", self.holder, myloc.x, myloc.y, myloc.z, self.crt_mat) # refine @@ -444,7 +444,7 @@ def generate_lamp(self): # --------------------- # Lamp strings # --------------------- - mystrings = create_lampholder_strings("Lampstrings", self.holder, + mystrings = create_lightholder_strings("Lampstrings", self.holder, myloc.x, myloc.y, myloc.z, self.tr02, self.top_height, @@ -460,7 +460,7 @@ def generate_lamp(self): # --------------------- # Lampshade # --------------------- - mytop = create_lampshade("Lampshade", self.top_height, + mytop = create_lightshade("Lampshade", self.top_height, myloc.x, myloc.y, myloc.z, self.top_segments, self.tr01, self.tr02, @@ -517,7 +517,7 @@ def generate_lamp(self): # mat: Flag for creating materials # objcol: Color # ------------------------------------------------------------------------------ -def create_lamp_base(objname, height, px, py, pz, segments, rings, radios, ratios, subdivide, mat, objcol): +def create_light_base(objname, height, px, py, pz, segments, rings, radios, ratios, subdivide, mat, objcol): # Calculate heights h = height / (rings - 1) listheight = [] @@ -562,7 +562,7 @@ def create_lamp_base(objname, height, px, py, pz, segments, rings, radios, ratio # pZ: position Z axis # mat: Flag for creating materials # ------------------------------------------------------------------------------ -def create_lampholder(objname, height, px, py, pz, mat): +def create_lightholder(objname, height, px, py, pz, mat): mydata = create_cylinder_data(16, [0, height, height + 0.005, height + 0.008, height + 0.05], [0.005, 0.005, 0.010, 0.018, 0.018], False, False, False, 0, False) @@ -600,7 +600,7 @@ def create_lampholder(objname, height, px, py, pz, mat): # shadeh: height of lampshader # mat: Flag for creating materials # ------------------------------------------------------------------------------ -def create_lampholder_strings(objname, height, px, py, pz, radio, shadeh, mat): +def create_lightholder_strings(objname, height, px, py, pz, radio, shadeh, mat): mydata = create_cylinder_data(32, [height + 0.005, height + 0.005, height + 0.006, height + 0.006], [0.018, 0.025, 0.025, 0.018], False, False, False, 0, False) @@ -652,7 +652,7 @@ def create_lampholder_strings(objname, height, px, py, pz, radio, shadeh, mat): # opacity: opacity factor # mat: Flag for creating materials # ------------------------------------------------------------------------------ -def create_lampshade(objname, height, px, py, pz, segments, radio1, radio2, pleats, pleatsize, opacity, mat): +def create_lightshade(objname, height, px, py, pz, segments, radio1, radio2, pleats, pleatsize, opacity, mat): gap = 0.002 radios = [radio1 - gap, radio1 - gap, radio1, radio2, radio2 - gap, radio2 - gap] heights = [gap * 2, 0, 0, height, height, height - (gap * 2)] diff --git a/archimesh/achm_main_panel.py b/archimesh/achm_main_panel.py index 70312ac3..eb3d7748 100644 --- a/archimesh/achm_main_panel.py +++ b/archimesh/achm_main_panel.py @@ -462,10 +462,10 @@ class ArchimeshMainPanel(Panel): # Prop Buttons # ------------------------------ box = layout.box() - box.label("Props", icon='LAMP_DATA') + box.label("Props", icon='LIGHT_DATA') row = box.row() row.operator("mesh.archimesh_books") - row.operator("mesh.archimesh_lamp") + row.operator("mesh.archimesh_light") row = box.row() row.operator("mesh.archimesh_venetian") row.operator("mesh.archimesh_roller") diff --git a/archimesh/achm_window_maker.py b/archimesh/achm_window_maker.py index b7eb8235..1e43c792 100644 --- a/archimesh/achm_window_maker.py +++ b/archimesh/achm_window_maker.py @@ -216,7 +216,7 @@ def shape_mesh_and_create_children(mainobject, tmp_mesh, update=False): myctrl.location.x = 0 myctrl.location.y = -mp.depth * 3 / 2 myctrl.location.z = 0 - myctrl.draw_type = 'BOUNDS' + myctrl.display_type = 'BOUNDS' myctrl.hide = False myctrl.hide_render = True if bpy.context.scene.render.engine == 'CYCLES': diff --git a/archimesh/achm_window_panel.py b/archimesh/achm_window_panel.py index dbeed892..16c9209b 100644 --- a/archimesh/achm_window_panel.py +++ b/archimesh/achm_window_panel.py @@ -394,7 +394,7 @@ def do_ctrl_box(myobject): myctrl.location.x = 0 myctrl.location.y = 0 myctrl.location.z = 0 - myctrl.draw_type = 'WIRE' + myctrl.display_type = 'WIRE' myctrl.hide = False myctrl.hide_render = True if bpy.context.scene.render.engine == 'CYCLES': |