diff options
author | Rune Morling <ermo.blender.org@spammesenseless.net> | 2019-12-27 17:51:56 +0300 |
---|---|---|
committer | Rune Morling <ermo.blender.org@spammesenseless.net> | 2019-12-27 17:51:56 +0300 |
commit | 39b2f0c3c8f0569167b0c26275aac511070087bd (patch) | |
tree | 0f969cc5478d1dd46db8c3a971b66e5f0572654a /precision_drawing_tools/pdt_functions.py | |
parent | 0c2d39adf6e7ceb95b8f7acb3ddb4de5e7846fb5 (diff) |
PDT: Fix Pivot Point graphics, revise PDT Design UI
Pivot Point Graphics Fix:
Prior to this commit, Pivot Point Graphics showed at inconsistent sizes in
rotated and orthographic views.
This commit now checks the status of the view and scales the graphics
accordingly.
PDT Design UI panel changes:
Attempt to group related input fields and buttons via boxes. Feedback
most welcome.
Diffstat (limited to 'precision_drawing_tools/pdt_functions.py')
-rw-r--r-- | precision_drawing_tools/pdt_functions.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/precision_drawing_tools/pdt_functions.py b/precision_drawing_tools/pdt_functions.py index d9573ac8..f766cf31 100644 --- a/precision_drawing_tools/pdt_functions.py +++ b/precision_drawing_tools/pdt_functions.py @@ -608,7 +608,11 @@ def drawCallback3D(self, context): areas = [a for a in context.screen.areas if a.type == "VIEW_3D"] if len(areas) > 0: sf = abs(areas[0].spaces.active.region_3d.window_matrix.decompose()[2][1]) - a = w / sf / 10000 * pg.pivot_size + # Check for orhtographic view and resize + if areas[0].spaces.active.region_3d.is_orthographic_side_view: + a = w / sf / 60000 * pg.pivot_size + else: + a = w / sf / 5000 * pg.pivot_size b = a * 0.65 c = a * 0.05 + (pg.pivot_width * a * 0.02) o = c / 3 |