Skip to content

Commit 0133583

Browse files
committed
Merge branch 'release-v0.7.0'
2 parents c6b39f4 + a3b79df commit 0133583

13 files changed

+860
-69
lines changed

mesh_mesh_align_plus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"based on geometry and measurements from your scene."
3434
),
3535
"author": "Eric Gentry",
36-
"version": (0, 6, 1),
36+
"version": (0, 7, 0),
3737
"blender": (2, 80, 0),
3838
"location": (
3939
"3D View > N Panel > Mesh Align Plus tab, and"

mesh_mesh_align_plus/advanced_tools.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def draw_item(self,
2929
if item.kind == 'POINT':
3030
layout.label(text=item.name, icon="LAYER_ACTIVE")
3131
elif item.kind == 'LINE':
32-
layout.label(text=item.name, icon="LIGHT_SUN")
32+
layout.label(text=item.name, icon="CURVE_PATH")
3333
elif item.kind == 'PLANE':
3434
layout.label(text=item.name, icon="OUTLINER_OB_MESH")
3535
elif item.kind == 'CALCULATION':
@@ -617,7 +617,7 @@ def draw(self, context):
617617
)
618618
add_new_items.operator(
619619
"maplus.addnewline",
620-
icon='LIGHT_SUN',
620+
icon='CURVE_PATH',
621621
text=""
622622
)
623623
add_new_items.operator(
@@ -1053,7 +1053,7 @@ def draw(self, context):
10531053
if calc_target.kind == 'POINT':
10541054
item_info_col.operator(
10551055
"maplus.composenewlinefrompoint",
1056-
icon='LIGHT_SUN',
1056+
icon='CURVE_PATH',
10571057
text="New Line from Point"
10581058
)
10591059
elif calc_target.kind == 'LINE':
@@ -1063,13 +1063,13 @@ def draw(self, context):
10631063
)
10641064
item_info_col.operator(
10651065
"maplus.composenewlinefromorigin",
1066-
icon='LIGHT_SUN',
1066+
icon='CURVE_PATH',
10671067
text="New Line from Origin"
10681068
)
10691069
elif calc_target.kind == 'PLANE':
10701070
item_info_col.operator(
10711071
"maplus.composenormalfromplane",
1072-
icon='LIGHT_SUN',
1072+
icon='CURVE_PATH',
10731073
text="Get Plane Normal (Normalized)"
10741074
)
10751075
elif active_item.calc_type == 'MULTIITEM':
@@ -1129,7 +1129,7 @@ def draw(self, context):
11291129
calc_target_two.kind == 'POINT'):
11301130
item_info_col.operator(
11311131
"maplus.composenewlinefrompoints",
1132-
icon='LIGHT_SUN',
1132+
icon='CURVE_PATH',
11331133
text="New Line from Points"
11341134
)
11351135
item_info_col.operator(
@@ -1144,18 +1144,18 @@ def draw(self, context):
11441144
)
11451145
item_info_col.operator(
11461146
"maplus.composenewlinevectoraddition",
1147-
icon='LIGHT_SUN',
1147+
icon='CURVE_PATH',
11481148
text="Add Lines"
11491149
)
11501150
item_info_col.operator(
11511151
"maplus.composenewlinevectorsubtraction",
1152-
icon='LIGHT_SUN',
1152+
icon='CURVE_PATH',
11531153
text="Subtract Lines"
11541154
)
11551155
elif 'POINT' in type_combo and 'LINE' in type_combo:
11561156
item_info_col.operator(
11571157
"maplus.composenewlineatpointlocation",
1158-
icon='LIGHT_SUN',
1158+
icon='CURVE_PATH',
11591159
text="New Line at Point"
11601160
)
11611161
elif 'LINE' in type_combo and 'PLANE' in type_combo:
@@ -1180,7 +1180,7 @@ def draw(self, context):
11801180
)
11811181
transf_types.operator(
11821182
"maplus.changetransftoalignplanes",
1183-
icon='MOD_ARRAY',
1183+
icon='FACESEL',
11841184
text="Align Planes"
11851185
)
11861186
transf_types.operator(

mesh_mesh_align_plus/align_lines.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def draw(self, context):
417417
preserve_button_roundedge = aln_src_geom_top.row()
418418
preserve_button_roundedge.operator(
419419
"maplus.quickalignlinesgrabsrc",
420-
icon='LIGHT_SUN',
420+
icon='CURVE_PATH',
421421
text="Grab Source"
422422
)
423423
preserve_button_roundedge.operator(
@@ -434,7 +434,7 @@ def draw(self, context):
434434
)
435435
aln_src_geom_top.label(
436436
text="Source Coordinates",
437-
icon="LIGHT_SUN"
437+
icon="CURVE_PATH"
438438
)
439439

440440
aln_src_geom_editor = aln_grab_col.box()
@@ -557,7 +557,7 @@ def draw(self, context):
557557
preserve_button_roundedge = aln_dest_geom_top.row()
558558
preserve_button_roundedge.operator(
559559
"maplus.quickalignlinesgrabdest",
560-
icon='LIGHT_SUN',
560+
icon='CURVE_PATH',
561561
text="Grab Destination"
562562
)
563563
preserve_button_roundedge.operator(
@@ -574,7 +574,7 @@ def draw(self, context):
574574
)
575575
aln_dest_geom_top.label(
576576
text="Destination Coordinates",
577-
icon="LIGHT_SUN"
577+
icon="CURVE_PATH"
578578
)
579579

580580
aln_dest_geom_editor = aln_grab_col.box()

mesh_mesh_align_plus/align_objects.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class MAPLUS_PT_QuickAlignObjectsGUI(bpy.types.Panel):
6161
bl_space_type = "VIEW_3D"
6262
bl_region_type = "UI"
6363
bl_category = "Mesh Align Plus"
64-
bl_category = "Mesh Align Plus"
6564
bl_options = {"DEFAULT_CLOSED"}
6665

6766
def draw(self, context):

mesh_mesh_align_plus/align_planes.py

Lines changed: 61 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Align Planes tool, internals & UI."""
22

33

4+
import traceback
5+
46
import bmesh
57
import bpy
68
import mathutils
@@ -181,42 +183,58 @@ def execute(self, context):
181183
dest_pln_ln_BA
182184
)
183185

184-
# Create custom transform orientation, for sliding the user's
185-
# target along the destination face after it has been aligned.
186-
# We do this by making a basis matrix out of the dest plane
187-
# leading edge vector, the dest normal vector, and the cross
188-
# of those two (each vector is normalized first)
189-
vdest = dest_pln_ln_BA.copy()
190-
vdest.normalize()
191-
vnorm = dest_normal.copy()
192-
vnorm.normalize()
193-
# vnorm.negate()
194-
vcross = vdest.cross(vnorm)
195-
vcross.normalize()
196-
vcross.negate()
197-
orthonormal_basis_matrix = mathutils.Matrix(
198-
[
199-
[vcross[0], vnorm[0], vdest[0]],
200-
[vcross[1], vnorm[1], vdest[1]],
201-
[vcross[2], vnorm[2], vdest[2]]
202-
]
203-
)
204-
bpy.ops.transform.create_orientation(
205-
name='MAPlus',
206-
use=active_item.apl_use_custom_orientation,
207-
overwrite=True
208-
)
209-
bpy.context.view_layer.update()
210-
orient_slot = [
211-
slot for slot in
212-
bpy.context.scene.transform_orientation_slots
213-
if slot.custom_orientation
214-
and slot.custom_orientation.name == 'MAPlus'
215-
]
216-
if orient_slot:
217-
orient_slot[0].custom_orientation.matrix = orthonormal_basis_matrix
218-
else:
219-
print('Error: Could not find MAPlus transform orientation...')
186+
# # ############################################################
187+
# # TODO: Create custom transform orientation for destination
188+
# # plane. This is disabled until a solution can be found.
189+
# # ############################################################
190+
# # Create custom transform orientation, for sliding the user's
191+
# # target along the destination face after it has been aligned.
192+
# # We do this by making a basis matrix out of the dest plane
193+
# # leading edge vector, the dest normal vector, and the cross
194+
# # of those two (each vector is normalized first)
195+
# vdest = dest_pln_ln_BA.copy()
196+
# vdest.normalize()
197+
# vnorm = dest_normal.copy()
198+
# vnorm.normalize()
199+
# # vnorm.negate()
200+
# vcross = vdest.cross(vnorm)
201+
# vcross.normalize()
202+
# vcross.negate()
203+
# orthonormal_basis_matrix = mathutils.Matrix(
204+
# [
205+
# [vcross[0], vnorm[0], vdest[0]],
206+
# [vcross[1], vnorm[1], vdest[1]],
207+
# [vcross[2], vnorm[2], vdest[2]]
208+
# ]
209+
# )
210+
# try:
211+
# bpy.ops.transform.create_orientation(
212+
# name='MAPlus',
213+
# use=active_item.apl_use_custom_orientation,
214+
# overwrite=True
215+
# )
216+
# bpy.context.view_layer.update()
217+
# orient_slot = [
218+
# slot for slot in
219+
# bpy.context.scene.transform_orientation_slots
220+
# if slot.custom_orientation
221+
# and slot.custom_orientation.name == 'MAPlus'
222+
# ]
223+
# if orient_slot:
224+
# orient_slot[0].custom_orientation.matrix = orthonormal_basis_matrix
225+
# else:
226+
# print('Error: Could not find MAPlus transform orientation...')
227+
# self.report(
228+
# {'WARNING'},
229+
# ('Warning: Failed to create orientation for destination plane!')
230+
# )
231+
# except RuntimeError:
232+
# traceback.print_exc()
233+
# print('\nError: Runtime error creating transform orientation (see above)...')
234+
# self.report(
235+
# {'WARNING'},
236+
# ('Warning: Failed to create orientation for destination plane!')
237+
# )
220238

221239
if hasattr(self, 'quick_op_target') and addon_data.quick_align_planes_set_origin_mode:
222240
# TODO: Refactor this feature or possibly make it a new full operator
@@ -703,7 +721,7 @@ def draw(self, context):
703721
apl_gui = layout.box()
704722
apl_top.label(
705723
text="Align Planes",
706-
icon="MOD_ARRAY"
724+
icon="FACESEL",
707725
)
708726
apl_grab_col = apl_gui.column()
709727
apl_grab_col.prop(
@@ -1004,11 +1022,16 @@ def draw(self, context):
10041022
'apl_flip_normal',
10051023
text='Flip Normal'
10061024
)
1007-
apl_mods_row1.prop(
1025+
# Pop the trans. orientation checkbox into its
1026+
# own sublayout and disable it (either fix and
1027+
# re-enable or remove this if no longer supported)
1028+
transf_orientation_area = apl_mods_row1.row()
1029+
transf_orientation_area.prop(
10081030
addon_data.quick_align_planes_transf,
10091031
'apl_use_custom_orientation',
10101032
text='Use Transf. Orientation'
10111033
)
1034+
transf_orientation_area.enabled = False
10121035
apl_mods_row2 = apl_mods.row()
10131036
apl_mods_row2.prop(
10141037
addon_data.quick_align_planes_transf,

mesh_mesh_align_plus/axis_rotate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def draw(self, context):
399399
preserve_button_roundedge = axr_src_geom_top.row()
400400
preserve_button_roundedge.operator(
401401
"maplus.quickaxisrotategrabsrc",
402-
icon='LIGHT_SUN',
402+
icon='CURVE_PATH',
403403
text="Grab Axis"
404404
)
405405
preserve_button_roundedge.operator(
@@ -416,7 +416,7 @@ def draw(self, context):
416416
)
417417
axr_src_geom_top.label(
418418
text="Source Coordinates",
419-
icon="LIGHT_SUN"
419+
icon="CURVE_PATH"
420420
)
421421

422422
axr_src_geom_editor = axr_grab_col.box()

mesh_mesh_align_plus/calculate_compose.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,17 +2068,17 @@ def draw(self, context):
20682068
)
20692069
calc_gui.operator(
20702070
"maplus.quickcomposenewlinefromorigin",
2071-
icon='LIGHT_SUN',
2071+
icon='CURVE_PATH',
20722072
text="New Line from Origin"
20732073
)
20742074
calc_gui.operator(
20752075
"maplus.quickcomposenormalfromplane",
2076-
icon='LIGHT_SUN',
2076+
icon='CURVE_PATH',
20772077
text="Get Plane Normal (Normalized)"
20782078
)
20792079
calc_gui.operator(
20802080
"maplus.quickcomposenewlinefrompoint",
2081-
icon='LIGHT_SUN',
2081+
icon='CURVE_PATH',
20822082
text="New Line from Point"
20832083
)
20842084
calc_gui.operator(
@@ -2087,22 +2087,22 @@ def draw(self, context):
20872087
)
20882088
calc_gui.operator(
20892089
"maplus.quickcomposenewlineatpointlocation",
2090-
icon='LIGHT_SUN',
2090+
icon='CURVE_PATH',
20912091
text="New Line at Point"
20922092
)
20932093
calc_gui.operator(
20942094
"maplus.quickcomposenewlinefrompoints",
2095-
icon='LIGHT_SUN',
2095+
icon='CURVE_PATH',
20962096
text="New Line from Points"
20972097
)
20982098
calc_gui.operator(
20992099
"maplus.quickcomposenewlinevectoraddition",
2100-
icon='LIGHT_SUN',
2100+
icon='CURVE_PATH',
21012101
text="Add Lines"
21022102
)
21032103
calc_gui.operator(
21042104
"maplus.quickcomposenewlinevectorsubtraction",
2105-
icon='LIGHT_SUN',
2105+
icon='CURVE_PATH',
21062106
text="Subtract Lines"
21072107
)
21082108
calc_gui.operator(

mesh_mesh_align_plus/directional_slide.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def draw(self, context):
357357
preserve_button_roundedge = ds_src_geom_top.row()
358358
preserve_button_roundedge.operator(
359359
"maplus.quickdirectionalslidegrabsrc",
360-
icon='LIGHT_SUN',
360+
icon='CURVE_PATH',
361361
text="Grab Source"
362362
)
363363
preserve_button_roundedge.operator(
@@ -375,7 +375,7 @@ def draw(self, context):
375375
)
376376
ds_src_geom_top.label(
377377
text="Source Coordinates",
378-
icon="LIGHT_SUN"
378+
icon="CURVE_PATH"
379379
)
380380

381381
ds_src_geom_editor = ds_grab_col.box()

0 commit comments

Comments
 (0)