1 # SPDX-FileCopyrightText: 2010-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 # Contributed to by: Chichiri, Jace Priester #
6 # codemanx, blender dev team, Lijenstina, Spivak Vladimir (cwolf3d) #
7 # Originally by Evan J. Rosky (syrux)
10 "name": "Discombobulator",
11 "author": "Evan J. Rosky (syrux)",
13 "blender": (2, 80, 0),
14 "location": "View3D > Add > Mesh",
15 "description": "Add Discombobulator",
17 "doc_url": "{BLENDER_MANUAL_URL}/addons/add_mesh/discombobulator.html",
18 "category": "Add Mesh",
21 # Note: Blocks has to be loaded before the WallFactory or the script
22 # will not work properly after (F8) reload
26 importlib
.reload(mesh_discombobulator
)
28 from . import mesh_discombobulator
31 from bpy
.types
import (
35 from bpy
.props
import (
39 # Register all operators and panels
41 # Define "Extras" menu
42 def menu_func(self
, context
):
44 layout
.operator_context
= 'INVOKE_REGION_WIN'
47 layout
.operator("discombobulate.ops",
48 text
="Discombobulator", icon
="MOD_BUILD")
52 class DISCProps(PropertyGroup
):
57 mesh_discombobulator
.discombobulator
,
58 mesh_discombobulator
.discombobulator_dodads_list
,
59 mesh_discombobulator
.discombob_help
,
60 mesh_discombobulator
.VIEW3D_OT_tools_discombobulate
,
61 mesh_discombobulator
.chooseDoodad
,
62 mesh_discombobulator
.unchooseDoodad
,
67 from bpy
.utils
import register_class
71 bpy
.types
.Scene
.discombobulator
= PointerProperty(type=DISCProps
)
72 # Add "Extras" menu to the "Add Mesh" menu
73 bpy
.types
.VIEW3D_MT_mesh_add
.append(menu_func
)
77 # Remove "Extras" menu from the "Add Mesh" menu.
78 bpy
.types
.VIEW3D_MT_mesh_add
.remove(menu_func
)
80 from bpy
.utils
import unregister_class
81 for cls
in reversed(classes
):
84 del bpy
.types
.Scene
.discombobulator
86 if __name__
== "__main__":