1 # SPDX-FileCopyrightText: 2010-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 # Contributed to by PKHG, Meta Androcto, Noctumsolis, Lijenstina,
6 # Spivak Vladimir (cwolf3d)
7 # Origunally an addon by Andy Houston
10 "name": "Geodesic Domes",
11 "author": "Andy Houston",
13 "blender": (2, 80, 0),
14 "location": "View3D > Add > Mesh",
15 "description": "Create geodesic dome type objects.",
17 "doc_url": "{BLENDER_MANUAL_URL}/addons/add_mesh/geodesic_domes.html",
18 "category": "Add Mesh",
23 importlib
.reload(add_shape_geodesic
)
24 importlib
.reload(forms_271
)
25 importlib
.reload(geodesic_classes_271
)
26 importlib
.reload(third_domes_panel_271
)
27 importlib
.reload(vefm_271
)
30 from . import add_shape_geodesic
31 from . import forms_271
32 from . import geodesic_classes_271
33 from . import third_domes_panel_271
34 from . import vefm_271
38 def Geodesic_contex_menu(self
, context
):
44 if obj
.data
is not None and 'GeodesicDome' in obj
.data
.keys():
45 props
= layout
.operator("mesh.generate_geodesic_dome", text
="Change Geodesic Dome")
47 for prm
in third_domes_panel_271
.GeodesicDomeParameters():
48 setattr(props
, prm
, obj
.data
[prm
])
51 # Define "Extras" menu
52 def menu_func(self
, context
):
54 lay_out
.operator_context
= 'INVOKE_REGION_WIN'
57 oper
= lay_out
.operator("mesh.generate_geodesic_dome",
58 text
="Geodesic Dome", icon
="MESH_ICOSPHERE")
63 add_shape_geodesic
.add_pose_shape_fast
,
64 third_domes_panel_271
.GenerateGeodesicDome
,
65 third_domes_panel_271
.DialogOperator
,
69 from bpy
.utils
import register_class
73 # Add "Extras" menu to the "Add Mesh" menu
74 bpy
.types
.VIEW3D_MT_mesh_add
.append(menu_func
)
75 bpy
.types
.VIEW3D_MT_object_context_menu
.prepend(Geodesic_contex_menu
)
79 # Remove "Extras" menu from the "Add Mesh" menu.
80 bpy
.types
.VIEW3D_MT_object_context_menu
.remove(Geodesic_contex_menu
)
81 bpy
.types
.VIEW3D_MT_mesh_add
.remove(menu_func
)
83 from bpy
.utils
import unregister_class
84 for cls
in reversed(classes
):
87 if __name__
== "__main__":