Commit Graph

334 Commits

Author SHA1 Message Date
Campbell Barton
223f931095 Cleanup: comment length in transform 2019-04-17 08:44:58 +02:00
Campbell Barton
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
eb8e656b2b Cleanup: spelling 2019-03-08 17:48:49 +11:00
Campbell Barton
805f8f8230 Comments: add comments for new transform struct members. 2019-03-01 10:56:46 +11:00
Campbell Barton
c18289da93 Cleanup: minor improvements to transform comments. 2019-03-01 10:56:46 +11:00
Campbell Barton
117bc1477e Cleanup: remove redundant property assignment
Also cleanup comments
2019-02-28 01:04:32 +11:00
Campbell Barton
6ebad22091 Transform: fix rotate redo behavior
- Add XYZ option.
- Orientation now works as expected.

Now a redo for rotation works logically,
setting the axis to Z & the orientation to view.

Resolves T57205
2019-02-26 21:17:17 +11:00
Campbell Barton
0a87bf6784 Transform: don't set the user constraint when it's not set
The orientation for the redo panel would be set even when not used,
add an 'unset' orientation which defaults to global.
2019-02-26 21:15:45 +11:00
Campbell Barton
1bfbfa2810 Transform: remove constraints from the redo panel
Constraint options had confusing behavior:

- When non were pressed, the orientation was ignored.
- When any were pressed, the orientation was used,
  but only unconstrained axed could be adjusted.

Now constraining is only used for modal execution
so there is no need to show these in the interface.

When an orientation is selected, the XYZ values always transform
using that space.

Note, transform system should be refactored to support different
orientations w/o having to use constraints.

Addresses T57204
2019-02-21 21:59:15 +11:00
Campbell Barton
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
46ac288a93 Cleanup: rename V3D_MANIP_* -> V3D_ORIENT_*
Wasn't obvious it's related to orientation,
also term manipulator is no longer in use.
2019-02-08 15:22:15 +11:00
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton
c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Campbell Barton
88a80fcec8 Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
Campbell Barton
65b82e09d9 Fix T57852: Mesh X Mirror option not working
D3869 by @lichtwerk w/ own edits
2019-01-14 15:14:39 +11:00
Campbell Barton
8a2d48d928 Cleanup: move comments above definitions
For clang-format not to wrap definitions.
2019-01-14 12:43:19 +11:00
Campbell Barton
91a155833e Cleanup: comments causing bad clang-format output 2019-01-08 10:37:43 +11:00
Philipp Oeser
25fcb44d2d Merge branch 'master' into blender2.8 2018-12-19 12:38:31 +01:00
Philipp Oeser
684898cfbf Fix Proportional Edit Projected 2D method skiped center calculation
rBa520e7c85c83 defined T_OVERRIDE_CENTER(1 << 25)
which was already in use T_PROP_PROJECTED(1 << 25)
thus skipping center calculation

Fixes T58882, T59518

Reviewers: campbellbarton, brecht

Maniphest Tasks: T58882, T59518

Differential Revision: https://developer.blender.org/D4100
2018-12-19 12:33:11 +01:00
Campbell Barton
f7dc6a63fb Gizmo: optional custom orientations for transform
This aims to resolve a conflict where some users want to keep keyboard
axis setting global, even when the orientation is set to something else.

Move/rotate/scale can optionally each have a separate orientation.

Some UI changes will be made next.
2018-12-19 20:57:51 +11:00
Brecht Van Lommel
a3e4c333b9 Transform: when snap affect is off for a transform mode, ignore snap settings entirely.
Ref D4022.
2018-12-18 12:14:38 +01:00
Campbell Barton
9888374f4b Transform: re-revert new user-axis-first behavior
This restores old behavior but leaves in new code
which is more flexible.

See: 6491d50d02 for feedback on why this isn't ideal.
2018-11-29 21:52:38 +11:00
Campbell Barton
535984a848 Cleanup: simplify transform orientation cycling
Remove dummy first index, store a pointer to the user orientation
instead of having it store twice (which could get out of sync).
2018-11-29 12:49:02 +11:00
Campbell Barton
6491d50d02 Transform: default to user-defined orientation
Previously we tried this but reverted (see 64d40c82c3)
because there wasn't a predictable set of keys to use global-space.

Now the keys are swapped:

- 'GX' always transforms in the user defined orientation.
- 'GXX' always transforms in global space.

As before 'GXXX' cycles back to disabling constraints.

This does have a down side that GXX won't be used for local-space
when the user has global space set.
Also, when global is the user-orientation, pressing GX and GXX
does the same thing.

Note: examples here use GX but could be any transform-mode/axis.
2018-11-28 10:15:02 +11:00
Campbell Barton
80fb943e4f Transform: map mouse input to shear direction 2018-10-17 17:18:30 +11:00
Campbell Barton
9273b91eef Transform: show arrows for 'custom' ratio input
Arrows are now shown for vertex/edge slide.
2018-10-17 17:14:36 +11:00
Campbell Barton
5b9ab20fe4 Transform: axis support for shear tool 2018-10-16 22:06:23 +11:00
mano-wii
c52485c16a Editor Transform: use the dial3d drawing in the rotation operation 2018-10-03 17:45:56 -03:00
Brecht Van Lommel
58adc58661 Merge branch 'master' into blender2.8 2018-09-27 15:49:59 +02:00
Brecht Van Lommel
a247b53084 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3732
2018-09-27 15:36:35 +02:00
Brecht Van Lommel
d5f94b49bd Fix part of T56865: wrong center with orbit around selection in weight paint. 2018-09-21 20:21:40 +02:00
Alan
a1a58c8d0a Fix T54685: EditMesh UV's transform snapping only checks active object
Reviewers: dfelinto
https://developer.blender.org/D3653
2018-09-18 16:26:22 -03:00
Brecht Van Lommel
fe6a6dee0b Motion Paths: only update once when transforming multiple bones or objects. 2018-09-14 17:42:58 +02:00
Campbell Barton
5940ea11ce Merge branch 'master' into blender2.8 2018-09-07 11:27:18 +10:00
Campbell Barton
7be3378d16 Fix normal transform orientation calculation
When using the 'normal' orientation, the normal would be ignored
if the plane couldn't be calculated.

Now use only the normal if the plane is zero length,
this was already done, just not in all cases.
2018-09-07 11:25:54 +10:00
Rohan Rathi
4e6bcd10e5 Merge branch 'blender2.8' into soc-2018-bevel 2018-07-21 19:29:15 +05:30
Campbell Barton
b457cae397 Cleanup: use variable names based on term gizmo 2018-07-15 14:35:33 +02:00
Campbell Barton
5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
Campbell Barton
c17611af95 Manipulator: changes for overlay options
There are now 3 categories in the overlay popover:

- Navigation
- Active (camera, lamp... etc)
- Tool (manipulator)

The user preference for mini axis now controls if the mini axis
displays minimal or a full-interactive widget.

Part of design: T55863
2018-07-11 10:49:18 +02:00
Campbell Barton
12d4ebcaa3 Merge branch 'master' into blender2.8 2018-07-09 17:57:37 +02:00
Campbell Barton
8c528a4f0a Cleanup: use const transform args 2018-07-09 17:57:05 +02:00
Rohan Rathi
31e43d021f Merge branch 'blender2.8' into soc-2018-bevel 2018-07-02 23:31:19 +05:30
Campbell Barton
ea6fef9385 Merge branch 'master' into blender2.8 2018-06-30 10:32:55 +02:00
Campbell Barton
b26e9f0000 Cleanup: rename bmesh_queries -> bmesh_query
Other files with the same purpose already used 'query'.
2018-06-30 10:32:21 +02:00
Rohan Rathi
c73a6b0d42 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-20 22:29:44 +05:30
Bastien Montagne
a9cfd8c910 Cleanup: get rid of global RNG usage in transform code. 2018-06-12 17:00:31 +02:00
Rohan Rathi
1255129932 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-11 21:03:07 +05:30
Rohan Rathi
18a8bb5c16 Fix compilation error due to different params
in freeCustomNormalArray declaration and definition
2018-06-05 23:21:08 +05:30
Campbell Barton
5d628c519b Transform: improve pose trans/rot/scale guessing
Switching the mode was being done per object,
where it should first check all pose bones from all objects.

This also removes code that changes the transform mode
from within the counting function.
This was only needed on transform initialization.
2018-06-05 11:04:12 +02:00