| 1 |
# <pep8 compliant> |
| 2 |
# This program is free software; you can redistribute it and/or |
| 3 |
# modify it under the terms of the GNU General Public License |
| 4 |
# as published by the Free Software Foundation; either version 2 |
| 5 |
# of the License, or (at your option) any later version. |
| 6 |
# |
| 7 |
# This program is distributed in the hope that it will be useful, |
| 8 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 |
# GNU General Public License for more details. |
| 11 |
# |
| 12 |
# You should have received a copy of the GNU General Public License |
| 13 |
# along with this program; if not, write to the Free Software Foundation, |
| 14 |
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 15 |
|
| 16 |
import bpy |
| 17 |
from . import crownmoldingpack |
| 18 |
|
| 19 |
# Inspired by Danny Mac 3D |
| 20 |
# https://www.youtube.com/channel/UC10BuhxlV7Y53R0l9RJimmA |
| 21 |
# https://www.youtube.com/watch?v=dnlPidRHs1Q&lc=Ugzjf6_XUGrXcsRDTA94AaABAg |
| 22 |
# Special thanks to p2or on |
| 23 |
# https://blender.stackexchange.com/questions/57306/how-to-create-a-custom-ui |
| 24 |
|
| 25 |
# CHANGELOG |
| 26 |
# v 0.0.0 October 2015 Crown Molding Pack |
| 27 |
# ☒ Initial 15 crown molding path pack, 1 trim path, 1 wall path, no Add-on |
| 28 |
# v 0.0.1 September 2019 Crown Molding Pack v2 |
| 29 |
# ☒ Inital Add-on, 29 more paths (46 unique paths, 71 total paths) |
| 30 |
# ☒ 15 Crown Molding Paths |
| 31 |
# ☒ 1 Wall Base Path |
| 32 |
# ☒ 25 Top Trim Paths (25 top and 25 bottom) |
| 33 |
# ☒ 5 Middle Trim Paths |
| 34 |
# ☒ 1 Trim Mesh Object |
| 35 |
# ☒ 46 Unique Paths |
| 36 |
# ☒ 71 Total Paths |
| 37 |
# ☒ 72 Total Objects |
| 38 |
# ☒ 13 Add-on features: |
| 39 |
# ☒ Convert to Crown Molding - Works with single or multipe faces and |
| 40 |
# edges. Converts mesh faces or edges to separate curves with the |
| 41 |
# proper rotation, and attempts to set the bevel object to a crown |
| 42 |
# molding path. |
| 43 |
# ☒ Tilt - - Works with single or multiple 3D curves. Rotates selected |
| 44 |
# 3D curves tilt by -90 degrees. |
| 45 |
# ☒ Tilt + - Works with single or multiple 3D curves. Rotates selected |
| 46 |
# 3D curves tilt by 90 degrees. |
| 47 |
# ☒ Tilt <> - Works with single or multiple 3D curves. Rotates selected |
| 48 |
# 3D curves tilt by 180 degrees. |
| 49 |
# ☒ Mirror X - Works with all objects. Mirrors objects on the Global |
| 50 |
# X Axis. |
| 51 |
# ☒ Mirror Y - Works with all objects. Mirrors objects on the Global |
| 52 |
# Y Axis. |
| 53 |
# ☒ Mirror Z - Works with all objects. Mirrors objects on the Global |
| 54 |
# Z Axis. |
| 55 |
# ☒ Scale - - Works with single or multiple curves. Decreases the scale |
| 56 |
# of curves without changing the path. |
| 57 |
# ☒ Scale + - Works with single or multiple curves. Increases the scale |
| 58 |
# of curves without changing the path. |
| 59 |
# ☒ <> Direction - Works with single or multiple curves. Switches the |
| 60 |
# direciton of the curve, which will change what side the bevel object |
| 61 |
# appears. |
| 62 |
# ☒ Curve 2D - Works with single or multiple curves. Converts selected |
| 63 |
# curves to 2D dimension. |
| 64 |
# ☒ Curve 3D - Works with single or multiple curves. Converts selected |
| 65 |
# curves to 3D dimension. |
| 66 |
# ☒ 2D/3D - Works with single or multiple curves. Converts selected |
| 67 |
# curves to 2D dimension if they are 3D, and vice versa. |
| 68 |
# v 0.0.2 January 2021 Crown Molding Pack v2.1 |
| 69 |
# ☒ Add-on updated for Blender 2.91 (bevel_mode = 'OBJECT') and 53 more |
| 70 |
# paths (99 unique paths, 124 total paths). Renamed path objects for |
| 71 |
# better organization. |
| 72 |
# ☒ 15 Crown Molding Paths - These objects are named Ceiling.CrownXX. |
| 73 |
# ☒ 26 Floor Base Paths - These objects are named Floor.SomethingXX. |
| 74 |
# ☒ 25 Window Paths - There are 2 versions of each path, |
| 75 |
# Window.TrimbottomXX and Window.TrimtopXX. |
| 76 |
# ☒ 14 Panel Trim Paths - These objects are named Panel.SomethingXX. |
| 77 |
# ☒ 10 Wall Trim Paths - These objects are named Wall.SomethingXX. |
| 78 |
# ☒ 4 Rail Paths - These objects are named Rail.SomethingXX. |
| 79 |
# ☒ 5 Miscellaneous Trim Paths - These objects are named |
| 80 |
# Misc.SomethingXX. |
| 81 |
# ☒ 1 Trim Mesh Object - This object is named Misc.Trimcap01. |
| 82 |
# v 0.0.3 October 2021 Crown Molding Pack v2.2 |
| 83 |
# ☒ Add-on updated to add new "Next" and "Previous" buttons to cycle |
| 84 |
# through provided curves. Can also be modified in python code. |
| 85 |
# ☒ Added 19 new ceiling crown molding paths, and 20 picture frame paths. |
| 86 |
# (138 unique paths, 163 total paths) |
| 87 |
# v 0.0.4 January 2022 Crown Molding Pack v2.3 |
| 88 |
# ☒ Fixed bug - faces with arbitrary rotation didn't convert to paths |
| 89 |
# properly. Added Auto-rotate Curve checkbox to control if add-on tries |
| 90 |
# to rotate the curve (legacy behavior, checkbox checked) or not (checkbox |
| 91 |
# not checked). Thanks for the report, Piero! |
| 92 |
# v 0.0.5 June 2022 Crown Molding Pack v2.4 |
| 93 |
# ☒ Fixed bug - Undo after crown molding creation might crash blender. |
| 94 |
# Added a undo step to the WM_OT_ConvertToCMP function to fix this. |
| 95 |
# Thanks for the report, Piero! |
| 96 |
# v 3.0.0 July 2023 Crown Molding Pack 3.0 |
| 97 |
# ☒ New UI for path selection |
| 98 |
# ☒ New version numbering for less confusion by Jeff. |
| 99 |
# v 3.1.0 October 2023 |
| 100 |
# ☒ Changed some variable names to avoid collision with other add-ons. |
| 101 |
# Thanks for the report, Trey! |
| 102 |
# v 3.1.1 November 2023 |
| 103 |
# ☒ Fixed an error with removing the add-on or uninstalling it. |
| 104 |
# ☒ Removed empty materials in the .blend from paths that were used in testing, which |
| 105 |
# also caused errors. |
| 106 |
# ☒ Cleaned up console logging to remove unnecessary logs. |
| 107 |
|
| 108 |
|
| 109 |
bl_info = { |
| 110 |
"name": "Crown Molding Pack Tools", |
| 111 |
"description": "Helper tools for creating and " |
| 112 |
"manipulating crown molding in the 3D Viewport.", |
| 113 |
"author": "Jeff Lange @jefftml", |
| 114 |
"version": (3, 1, 1), |
| 115 |
"blender": (2, 80, 0), |
| 116 |
"location": "3D View > Tools", |
| 117 |
"warning": "", |
| 118 |
"category": "Object" |
| 119 |
} |
| 120 |
|
| 121 |
|
| 122 |
def register(): |
| 123 |
crownmoldingpack.register() |
| 124 |
|
| 125 |
|
| 126 |
def unregister(): |
| 127 |
crownmoldingpack.unregister() |
| 128 |
|
| 129 |
|
| 130 |
if __name__ == "__main__": |
| 131 |
register() |
| 132 |
|