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
2021-11-08Fix snap cursor not active even if gizmo is availableGermano Cavalcante
Error introduced in rB69d6222481b4 and partially fixed in rB24310441ddc8. When gizmo was turned on but the scene has more than one 3D viewport, one of them the snap cursor did not appear.
2021-11-02Fix snap cursor still active even when gizmo is not availableGermano Cavalcante
The snap cursor continued to appear even when the workspace is changed for example. So add the region to check in the cursor pool.
2021-10-27Cleanup: remove underscore prefix from variableCampbell Barton
Avoid using underscore prefix since these typically mean the variable shouldn't be accessed directly (it may be accessed from a macro, or memory on the stack which is assigned to a pointer). In this case a more meaningful name can be used for the argument that was shadowed.
2021-10-26View3D Snap Cursor: sanitize and increase the maximum amount of statesGermano Cavalcante
3 is a small amount as each viewport creates a gizmo that creates its own state Now if the state is not created, the gizmos use the last state.
2021-10-20Cleanup: use an array for wmEvent cursor position variablesAaron Carlisle
Use arrays for wmEvent coordinates, this quiets warnings with GCC11. - `x, y` -> `xy`. - `prevx, prevy` -> `prev_xy`. - `prevclickx, prevclicky` -> `prev_click_xy`. There is still some cleanup such as using `copy_v2_v2_int()`, this can be done separately. Reviewed By: campbellbarton, Severin Ref D12901
2021-10-20Cleanup: unused parameters, `nullptr` instead of `NULL` in cpp code...Bastien Montagne
2021-10-20View3D: Cursor Snap RefactorGermano Cavalcante
Make the snap system consistent with the placement tool and leak-safe. **Changes:** - Store `SnapCursorDataIntern` in a `static` variable; - Initialize (lazily) `SnapCursorDataIntern` only once (for the keymap). - Move setup members of `V3DSnapCursorData` to a new struct `V3DSnapCursorState` - Merge `ED_view3d_cursor_snap_activate_point` and `ED_view3d_cursor_snap_activate_plane` into `state = ED_view3d_cursor_snap_active()` - Merge `ED_view3d_cursor_snap_deactivate_point` and `ED_view3d_cursor_snap_deactivate_plane` into `ED_view3d_cursor_snap_deactive(state)` - Be sure to free the snap context when closing via `ED_view3d_cursor_snap_exit` - Use RNA properties callbacks to update the properties of the `"Add Primitive Object"` operator
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-16Fix T92184: Cage gizmo doesn't with area lightRichard Antalik
This is caused by removing `gizmo_cage2d_modal()` code in 482806c8167. Some areas use cage gizmo to modify RNA properties without using transform operator like area light, image empty, and compositor preview. This functionality is implemented in code that was removed. Add this code back. Reviewed By: zeddb, campbellbarton Differential Revision: https://developer.blender.org/D12859
2021-10-14Cleanup: clang-tidy, clang-format & spellingCampbell Barton
2021-10-14Fix invalid arguments to ED_gizmotypes_snap_3d_context_ensureCampbell Barton
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-10-08VSE: Implement the bounding box (xform) tool in the seq preview windowSebastian Parborg
Make the "xform" tool/gizmo available for strip transformations in the sequencer preview window. Because of the amount of hacks needed to make the gizmo work nicely with multiple strips at the same time, it was decided to only show the translate gizmo when multiple strips are selected. This is because the transforms with multiple strips would appear buggy because of our lack of shearing support in the transform system. There is also currently no way to properly sync the gizmo drawing with the transform when using multiple strips. Reviewed By: Richard Antalik, Campbell Barton Differential Revision: http://developer.blender.org/D12729
2021-09-09Gizmo: warn when 2D projection fails with non-invertable matricesCampbell Barton
Add a warning to quickly pinpoint the problem. This would have simplified tracking down this problem in D12105.
2021-07-30Cleanup: headers, use 'pragma once', remove argument to '\file'Campbell Barton
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-04-30Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-30Fix/Workaround T87511: snap gizmo flickers on Ctrl-DragCampbell Barton
Hack to bypass drag events, eventually the gizmo API should support this use case without hacks.
2021-04-30Cleanup: avoid ambiguous parenthesisCampbell Barton
2021-04-19Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-19Fix spin-gizmo button tool-tip placementCampbell Barton
gizmo_button2d_bounds result wasn't valid when the gizmo was part of a 3D gizmo group. Regression in cf6d17a6aa421e0038fc1f8e60e3f1f708887c3e
2021-04-18Cleanup: make formatJacques Lucke
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-17Transform Snap Refactor: Use enum for cage snap optionsGermano Cavalcante
This allows the addition of the `SNAP_GEOM_CAGE` option. Currently unused.
2021-04-16Snap Gizmo: Improve event comparison codeGermano Cavalcante
Better distinction between modifier key events and mouse position events. No functional changes.
2021-04-16Snap Gizmo: Minor optimization in detecting toggle inversionGermano Cavalcante
Do not compare the x and y values of the mouse to check inversion. Also remove "Lazy Initialization".
2021-04-03Fix inversion of snapping failing in measure toolGermano Cavalcante
Comparison of event change has to be more specific and compare the x and y values of the mouse as well.
2021-04-03Fix T87162: Measure Tool Not WorkingGermano Cavalcante
The non-enabled gizmo was overwriting the projected coordinate value.
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-03-29Snap Gizmo: Minor optimization when updating gizmo propertiesGermano Cavalcante
As the Snap Gizmo properties are used as return of snapping values and therefore updated with each change, use callbacks to get these values through RNA properties. Differential Revision: https://developer.blender.org/D8525
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-10Cleanup: remove redundant headers in source/blender/editors/Campbell Barton
Remove redundant headers using `./source/tools/utils_maintenance/code_clean.py` Reviewed By: jmonteath Ref D10364
2021-01-25UI: Gizmo Tooltip PositioningHarley Acheson
Position Gizmo tooltips below their bounds so they do not obscure the content. Differential Revision: https://developer.blender.org/D9793 Reviewed by Julian Eisel
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-12-09Fix T83460: Regression in snap for measure toolGermano Cavalcante
Now the gizmo is drawn only when the eventstate located in `wm->winactive->eventstate` has not changed. So it doesn't matter if it's "selected" or not. This commit also removes the use of the private header "wm.h" Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D9539
2020-12-02Fix T83161: Crash when moving ruler endpoints and opening or closing the ↵Germano Cavalcante
toolshelf `invert_snap` could be called before `snap_gizmo->keymap` was found. Use the lazy initialization in `invert_snap` then.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-08-20GPUState: Use explicit depth test enumClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPU: Replace Batch uniform by shader uniform using macroClément Foucault
This is a first step into removing uniforms from GPU_batch and Imm.
2020-08-11Cleanup: rename variables 'gizmo_snap' to 'snap_gizmo'Germano Cavalcante
And a minor fix when there is no `USE_SNAP_DETECT_FROM_KEYMAP_HACK`.
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
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