Added 'align selected face with buildplate' feature.

Alt-click to select a face. See the (identically named) 'feature_bottom_face' branch in Uranium for more indepth information.
This commit is contained in:
Remco Burema 2019-09-02 00:17:14 +02:00
parent 243d51eb23
commit b97015a354
5 changed files with 55 additions and 2 deletions

View file

@ -139,6 +139,10 @@ class SolidView(View):
shade_factor * int(material_color[5:7], 16) / 255,
1.0
]
# Color the currently selected face-id, 0x10001 is certain to be greater than the largest ID.
face = Selection.getSelectedFace()
uniforms["selected_face"] = 0x10001 if not face or node != face[0] else face[1]
except ValueError:
pass