Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-07Remove workaround for drawing the rotation gizmoGermano Cavalcante
Since [0], transform gizmos are no longer hidden during transform. The same can be observed for rotation gizmos. However, as a workaround for these rotation gizmos, there was already a drawing utility running. With the gizmo and the utility this drawing is now being done twice. So remove the utility/workaround and update the gizmo accordingly. [0] {648350e456490f8d6258e7de9bf94d3a6a34dbb2} Differential Revision: https://developer.blender.org/D9542
2022-06-06Refactor: Snap-related. Clarified attribute names and refactored #defines ↵jon denning
into enums The transformation snapping code contains a bunch of `#define`s, some ambiguously or incorrectly named attributes. This patch contains refactored code to improve this. This patch does (should) not change functionality of snapping. Clarified ambiguously / incorrectly named attributes. - "Target" is used to refer to the part of the source that is to be snapped (Active, Median, Center, Closest), but several other areas of Blender use the term "target" to refer to the thing being snapped to and "source" to refer to the thing getting snapped. Moreover, the implications of the previous terms do not match the descriptions. For example: `SCE_SNAP_TARGET_CENTER` does not snap the grabbed geometry to the center of the target, but instead "Snap transforamtion center onto target". - "Select" refers to the condition for an object to be a possible target for snapping. - `SCE_SNAP_MODE_FACE` is renamed to `SCE_SNAP_MODE_FACE_RAYCAST` to better describe its affect and to make way for other face snapping methods (ex: nearest). Refactored related `#define` into `enum`s. In particular, constants relating to... - `ToolSettings.snap_flag` are now in `enum eSnapFlag` - `ToolSettings.snap_mode` are now in `enum eSnapMode` - `ToolSettings.snap_source` (was `snap_target`) are now in `enum eSnapSourceSelect` - `ToolSettings.snap_flag` (`SCE_SNAP_NO_SELF`) and `TransSnap.target_select` are now in `enum eSnapTargetSelect` As the terms became more consistent and the constants were packed together into meaningful enumerations, some of the attribute names seemed ambiguous. For example, it is unclear whether `SnapObjectParams.snap_select` referred to the target or the source. This patch also adds a small amount of clarity. This patch also swaps out generic types (ex: `char`, `short`, `ushort`) and unclear hard coded numbers (ex: `0`) used with snap-related enumerations with the actual `enum`s and values. Note: I did leave myself some comments to follow-up with further refactoring. Specifically, using "target" and "source" consistently will mean the Python API will need to change (ex: `ToolSettings.snap_target` is not `ToolSettings.snap_source`). If the API is going to change, it would be good to make sure that the used terms are descriptive enough. For example, `bpy.ops.transform.translate` uses a `snap` argument to determine if snapping should be enabled while transforming. Perhaps `use_snap` might be an improvement that's more consistent with other conventions. This patch is (mostly) a subset of D14591, as suggested by @mano-wii. Task T69342 proposes to separate the `Absolute Grid Snap` option out from `Increment` snapping method into its own method. Also, there might be reason to create additional snapping methods or options. (Indeed, D14591 heads in this direction). This patch can work along with these suggestions, as this patch is trying to clarify the snapping code and to prompt more work in this area. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D15037
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-10-18Snap and Placement Gizmo RefactorGermano Cavalcante
Move most of the gizmo snap and placement code to `view_cursor_snap.c`. Simplify and extend the snap API. Differential Revision: https://developer.blender.org/D12868
2021-10-13Cleanup: Snap Context RefactorGermano Cavalcante
Move runtime parameters out of context creation. Not being able to choose another region and v3d limits the use of the snap API.
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-04-17Snap Gizmo Refactor: Implement options for the gizmo behaviorGermano Cavalcante
The Snap Gizmo now has options for occlusion, selection filter and edit geometry. It will be useful to implement in current tools.
2021-04-01Cleanup/Refactor: Use flags instead of bool to configure the snap gizmoGermano Cavalcante
This simplifies the addition of future improvements. Also make it more practical to expose as a parameter of gizmo for Python.
2021-03-29Gizmo: Use a utility function to read snap gizmo valuesGermano Cavalcante
No functional changes. This makes the `ED_gizmotypes_snap_3d_update` function more specialized.
2021-01-16Add Object Tool: support incremental snappingCampbell Barton
This adds a "Snap to" option that allows using all the scenes snap settings which includes incremental & absolute grid snapping options. This is optional because always following scene snapping would not snap to geometry by default (which seems to be the most useful default).
2020-11-05Spelling: Predefined, Look Up, No OneHarley Acheson
Fixes 18 misspellings of 'predefined', 'Look Up', 'Lookup', and 'No One'. Differential Revision: https://developer.blender.org/D9466 Reviewed by Hans Goudey
2020-09-30Cleanup: sort struct declarationsCampbell Barton
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
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-05-28Object: new add object tool, currently for primitive typesCampbell Barton
- Interactively adding primitives with two clicks. - Scene orientation used for new objects. - Depth [view-plane, axis-plane, surface] - Origin [base, center] - Primitive types [cube, cylinder, cone, uv-sphere, ico-sphere ] - Settings for object types in the top-bar. Shortcuts: - Snapping (Ctrl). - Constrain 1:1 aspect (Shift). - Toggle center (Alt). Part of T57210 design task.
2020-05-27Gizmo: lazy initialize snap contextCampbell Barton
ED_gizmotypes_snap_3d_context_get could have returned NULL, rename _get(..) to _ensure(..) and initialize the snap context in this function.
2020-05-27Gizmo Library: New Snap GizmoGermano Cavalcante
Generic snap gizmo to be used for different tools. The Gizmo can be configured initially by the following properties: - `"snap_elements_force"`, `"prev_point"` The following properties can be read as return: - `"location"`, `"normal"`, `"snap_elem_index"` This property can be linked to another (tool_setting.snap_elements): - `"snap_elements"` And this 3 extra utilities have been added: - `ED_gizmotypes_snap_3d_draw_util`, - `ED_gizmotypes_snap_3d_context_get`, - `ED_gizmotypes_snap_3d_update`. Differential Revision: https://developer.blender.org/D7071
2020-03-02Cleanup: make remaining editor include headers work in C++Jacques Lucke
2020-01-06Cleanup: remove unused 2D arrow gizmoCampbell Barton
It's simpler to support a single gizmo type for 2D/3D.
2019-11-21Cleanup: remove unused value2d gizmoCampbell Barton
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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-03-25Gizmo: add option to move & dial gizmos to select as filledCampbell Barton
Draw as an outline while using solid selection.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-10-15Mesh: remove DerivedMesh for face-map drawingCampbell Barton
2018-10-04ED_gizmotypes_dial_3d_draw_util: use a struct to hide most parameters.mano-wii
2018-10-03Dial3d Gizmo: Add the Incremental Angle option to snap.mano-wii
2018-10-03Dial 3d Gizmo refactoring.mano-wii
Transform the gizmo's drawing function into a generic function for use in other parts of the code.
2018-09-27UI: use new 3D viewport navigation icons and image icon in add menu.Brecht Van Lommel
I had to make the viewport navigation icons a bit smaller in the SVG since the edges were being clipped off, we only support 16x16 icons currently. They are a bit blurry because of this.
2018-09-19EditMesh: show the spin arc as a thin ribbonCampbell Barton
Closer to the design from T54661
2018-09-19Gizmo: dial3d option to show the final angleCampbell Barton
Was showing modal-delta-angle, which isn't useful for the spin tool.
2018-09-13Gizmo: value2d utility to adjust operator valuesCampbell Barton
This allows any operator to interactively redo without having to manually make each operator modal.
2018-09-06UI: rename Translate/Grab to Move in UI, shortcuts stay the same.Brecht Van Lommel
2018-08-21Tool System: loopcut preview & activate on clickCampbell Barton
The loop cut tool now works as expected for the tool-system, where hovering previews the loop and clicking activates. This uses a new gizmo type to pre-select the edge.
2018-08-10Fix build error due to missing file from commit 98c304e865f8.Brecht Van Lommel
Proper contents still needs to be added, this just makes things build.
2018-08-10Gizmo: add option to catch all mouse clicksCampbell Barton
This was previously default behavior, now it's default.
2018-07-15Cleanup: use variable names based on term gizmoCampbell Barton
2018-07-15WM: rename manipulator to gizmo internallyCampbell Barton
2018-07-15WM: rename files, manipulator -> gizmoCampbell Barton
Edit doxy files and header guards only.