Commit Graph

147 Commits

Author SHA1 Message Date
Campbell Barton
b347c4e9ca Cleanup: remove redundant struct declarations 2020-12-16 16:25:56 +11:00
Germano Cavalcante
f7829787da Fix T80704: bpy.ops.transform.rotate() ignores orient_type
Remove the condition preventing orientation from being obtained out of
the 3d View context.

Also pass the `ob` and `obedit` arguments obtained from the caller.
2020-09-14 15:55:40 -03:00
Germano Cavalcante
273bf53e80 Cleanup: Use 'r_' prefix for return value
Make it obvious which values are written to.
2020-09-14 15:55:40 -03:00
Sebastian Parborg
2115232a16 Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix
No functional changes
2020-09-04 21:04:16 +02:00
Jacques Lucke
91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Germano Cavalcante
0439094105 Cleanup: make the sculpt convert type follow transform convention 2020-06-10 16:36:16 -03:00
Germano Cavalcante
515e8e4f7c Fix T77166: Transforming bone with constraint does not follow mouse position
Bug introduced in rBc75a665c442e
2020-05-30 12:12:36 -03:00
Germano Cavalcante
3bced3b306 Fix flag conflict in transform operators
This added some redundant properties
2020-05-19 18:54:57 -03:00
Bastien Montagne
67593a41dd Merge branch 'blender-v2.83-release' 2020-04-20 11:20:38 +02:00
Campbell Barton
bc71074d0a Fix T75922: Removing custom orientation doesn't update gizmo 2020-04-20 19:12:46 +10:00
Germano Cavalcante
8f86da71fe Operator: Add 'use_automerge_and_split' option for Translate 2020-04-15 12:01:54 -03:00
Jacques Lucke
680b70f093 Cleanup: make remaining editor include headers work in C++ 2020-03-02 15:09:10 +01:00
Germano Cavalcante
91abb70006 Transform: Remove 'mouse_coordinate_override' property
This property depends on the view that can change when redoing.
2020-02-27 16:42:43 -03:00
Germano Cavalcante
a33b261473 Fix T71455, T73852, T73860: Transform, Redo doesn't work properly in time editors
The redo panel does not consider the position of the mouse.
So it is not possible to know the direction to redo the operator.

The solution is to add a new `direction` parameter that can be
saved and used for redo.

Differential Revision: https://developer.blender.org/D6852
2020-02-17 13:33:29 -03:00
Campbell Barton
ac4057b95a Gizmo: use pivot center for UV gizmos 2020-01-09 16:42:24 +11:00
Campbell Barton
1ef6be3686 Cleanup: redundant struct declarations 2019-12-17 10:15:22 +11:00
Campbell Barton
82755f5137 Gizmo: add gizmos for UV transform translate/rotate/scale 2019-12-13 22:43:48 +11:00
Campbell Barton
f5ebe8395d Cleanup: correct argument type mismatch
Add transform_snap.h header which includes DNA enum.
2019-10-29 00:45:05 +11:00
mano-wii
ce0db668ec Fix T50148: Header: Wrong rounding when moving frames
Deduplicate the code and use the same logic used to
calculate individual elements in `t->values_final[0]`.

Differential revision: https://developer.blender.org/D6135
2019-10-28 09:51:53 -03:00
Pablo Dobarro
309cd047ef Sculpt: Transform tool
The sculpt mode transform tool applies the sculpt pivot transformation to all vertices, taking XYZ symmetry into account.
This commit also includes an operator to set the pivot point initial position.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5717
2019-09-11 13:07:19 +02:00
Campbell Barton
69a966aca0 Transform: option to transform parent objects without children
Supports parent/child chains with mixed selections.

Currently accessible from the pivot popover
(may be moved along with the other options here).
2019-08-29 01:53:07 +10:00
Campbell Barton
f88022b96f Cleanup: make transform data in object mode flag public
This fits better with intended flag usage.
2019-08-28 13:44:21 +10:00
Campbell Barton
6eadd40597 Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
mano-wii
777ca2dcdb Snapping System: Improve drawing indicating Perpendicular snap
Since pependicular snap depends on `snapTarget` it is important to indicate where this target is so as not to confuse users.
So draw a pivot where the target is and a dotted line toward the perpendicular snap point.

Reviewers: campbellbarton, brecht, billreynish

Differential Revision: https://developer.blender.org/D5557
2019-08-23 15:20:37 -03: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
14884cda1f Gizmo: move transform to a persistent option
Based on feedback from animators, this is useful to keep as a view
option (as in 2.7x).

Now the transform gizmos can be enabled from the popover,
the tools still work for location/scale/rotation.
The transform tool has been removed.

See T63518
2019-04-13 20:58:25 +02:00
Antonioya
789d242fa7 GPencil: Implement Opacity transform
Add Shift+F to transform points opacity in Edit mode
2019-04-13 11:19:03 +02:00
Campbell Barton
80ef7fbeb1 Transform: refactor orientation naming and usasge
Transform orientation was previously related to constraints,
recent changes meant it was used even when not constraining to an axis.

Now transform orientation is separate from axis constraints.
2019-02-27 17:30:51 +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
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
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
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
Campbell Barton
7493848008 3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
2018-11-26 14:02:09 +11:00
Campbell Barton
6aa7cea3c2 Cleanup: rename extrude gizmo 2018-11-21 09:25:55 +11:00
Campbell Barton
d3a75c48fd Cleanup: move extrude gizmo to transform module
Since this is no longer mesh only, move out of mesh,
rename next.
2018-11-21 09:20:19 +11:00
Brecht Van Lommel
3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00
Campbell Barton
48034f0eb3 Tool System: add gizmo for shear tool 2018-10-16 22:06:23 +11:00
Campbell Barton
5b9ab20fe4 Transform: axis support for shear tool 2018-10-16 22:06:23 +11:00
mano-wii
dfce96dbf7 Dial3d Gizmo: Add the Incremental Angle option to snap. 2018-10-03 17:45:55 -03:00
Campbell Barton
3c8e4e4180 Cursor Tool: add transform orientation type
Support using the current transform orientation when placing the cursor.

See: T55036
2018-08-16 16:15:16 +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
Rohan Rathi
842245ac55 Merge branch 'blender2.8' into soc-2018-bevel 2018-05-29 11:10:54 +05:30
Campbell Barton
a3a069f493 Tool System: cursor tool now transforms on drag 2018-05-25 19:43:23 +02:00
Rohan Rathi
5d2d36b068 Applied soc-2017-normal-tools 2018-05-25 22:24:24 +05:30
Campbell Barton
eefaec4114 Extrude Widget: Add orientation to topbar
Add extrude operator that's intended to work on the current selection
and be activated as a tool.
2018-05-07 21:40:51 +02:00
Campbell Barton
170223804b Extrude Widget: orient correctly w/ rotated object 2018-05-07 21:40:51 +02:00