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-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-16Edge-scrolling for node editorLukas Tönne
Starts scrolling when dragging a node or node link and going outside the current window. Largely copied from the VIEW2D_OT_edge_pan operator. Edge panning operator customdata and supporting functions now in UI_view2d.h, so they could be used by operators in other editor libraries. The VIEW2D_OT_edge_pan operator also uses this customdata and shared functions now. Operators properties can be used to configure edge panning margins and speed for each use case, rather than using hardcoded values. The speed function for edge panning has been tweaked somewhat: * "Speed per pixel" has been replaced with a "speed ramp" distance. This is more intuitive and also creates an upper bound for the speed, which can otherwise become extreme with large cursor distance. * "Max speed" is reached at the end of the speed ramp. * Padding the region inside and outside is applied as before, but both values are operator properties now. Node transform operator also supports edge panning. This requires an offset for changes in the view2d rect, otherwise nodes are "stuck" to the original view. Transform operator had cursor wrapping categorically enabled, but this gets quite confusing with the edge scrolling mechanism. A new TransInfo option T_NO_CURSOR_WRAP has been introduced to disable this behavior. The double negative is a bit annoying, but want to avoid affecting the existing transform modes, so by default it should still set the OP_IS_MODAL_GRAB_CURSOR flag (which then sets the WM_CURSOR_WRAP_XY flag during modal execution). Reviewed By: HooglyBoogly, JacquesLucke Differential Revision: https://developer.blender.org/D11073
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-02-16Cleanup: spellingCampbell Barton
2021-02-05Cleanup: rename USER_ZOOM_{CONT->CONTINUE} improve commentsCampbell Barton
USER_ZOOM_CONT only had comments saying this was 'oldstyle', remove these comments, add brief explanations of the zoom style in the enum.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-20Fix T73575: Zooming out a lot faster than zooming inYevgeny Makarov
- Zooming out a lot faster than zooming in, it had the wrong aspect ratio, make all the preparations with the factors instead of deltas. - Improved following the `zoom_invert` (should not apply to `MOUSEZOOM`) and "trackpad natural scroll" preferences. - `zoomfac` adjustment, same as in `view_zoomdrag_modal`. Ref D8686
2021-01-20Fix T65837: Zoom Axis is not working in the Node EditorYevgeny Makarov
It was already fixed for the mouse in bcda8cc89b88c999ff64edcc19973d6289bcbf2a, T65837 now the same logic is applied for the track-pad. Ref D8685
2021-01-04Cleanup: use const variablesCampbell Barton
2020-12-13Cleanup: Reduce variable scope in view_2d_ops.cHans Goudey
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-29Merge branch 'blender-v2.91-release'Julian Eisel
2020-10-29Fix Zoom to Mouse Position ignored when zooming outJulian Eisel
Own mistake in rB3a1cf838ca09. Thanks to @jenkm for pointing this out.
2020-10-29Fix for T78211: Trackpad Zoom to Mouse Position ErrorYevgeny Makarov
When using a trackpad Zoom to Mouse Position would always zoom to center of canvas. Differential Revision: https://developer.blender.org/D8683 Reviewed by Brecht Van Lommel
2020-10-29Fix for T65714: Pinch Zooming Crash using Mac TrackpadYevgeny Makarov
Ensure that Zoom does not crash on Mac Trackpad by checking for existence of Continuous Zoom timer. Differential Revision: https://developer.blender.org/D8682 Reviewed by Julian Eisel
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-03Cleanup: Remove duplicated View2D pan polling logicJulian Eisel
Same as 21fc4ae20692, but for view panning this time. Also had to set the poll callbacks still in this case.
2020-10-03Revert part of previous commitJulian Eisel
The change to the `poll()` callback was actually incorrect. But also reduandant, since the function is actually already executed in the operator.
2020-10-03Fix compile error when compiling with WITH_INPUT_NDOF after View2D changesJulian Eisel
Actually, fixes compile error and an incorrect poll. Caused by 21fc4ae20692 and 3a1cf838ca09. The poll has to perfrom the `view_zoom_poll()` logic to ensure correct context.
2020-10-03Fix issues with calling View2D zoom operators in an `EXEC` contextJulian Eisel
Multiple related issues: * `view_zoomdrag_exec()` required `view_zoomdrag_init()` to be called first to set up data. Can now easily be done in the `_exec()` function as well though. * Because of that the operators could not be called in an `EXEC_` context (e.g. `EXEC_REGION_WIN`). * With "Zoom to Mouse Position" enabled, zooming from a menu or script would zoom to the mouse position. That should only happen if the operators are called directly in the editor.
2020-10-03Cleanup: Remove redundant View2D operator poll checkJulian Eisel
The poll would already be executed as operator callback, this check was redundant. Also see previous commit.
2020-10-03Cleanup: Remove duplicated View2D zoom polling logicJulian Eisel
`view_zoomdrag_init()` would perform a number of sanity checks that `view_zoom_poll()` already executed. The design of operators forsees that (non-expensive) context sanity checks are done by the `poll()` callbacks, and the execution callbacks can then just assume that happened. No reason to be overly pedantic, we don't do that elsewhere either. Note that this code is from the earliest days of an operator design. So it's not surprising that it wasn't using the design "properly".
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-08-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-18Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-18Fix T79787: orbit/zoom sensitivity depends on line-widthCampbell Barton
Use 'dpi_fac' instead of 'pixelsize' to scale input sensitivity based on the interface scale. Also use dpi_fac for view zoom operator. Thanks to @ISS for investigating.
2020-08-13View2D: Centralize handling of changes to v2d->curSergey Sharybin
Currently there are no functional changes, preparing code to add more functionality which is to be run from navigation/zoom operators.
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-21UI: Add an outer boundary for edge panning, use in outlinerHans Goudey
Currently if you drag and drop an item from the outliner elsewhere in the Blender window, the outliner will scroll the entire time, even if the mouse is far away. This commit adds optional behavior for the edge pan operator that makes it only act if the mouse is close enough to the region. Differential Revision: https://developer.blender.org/D8193
2020-07-07Cleanup: spellingCampbell Barton
2020-07-03Cleanup: Interface, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/interface` module. No functional changes.
2020-06-23Fix T78146: Crash using scroll barsCampbell Barton
Regression in 2fdca5bd1981c
2020-06-22Refactoring: View2DScrollers memory allocationJeroen Bakker
View2DScrollers used the memory manager to allocate memory. This isn't a problem but in a upcoming change the scrollers will be drawn more often than it used to (See {D8066}). To limit the number of allocations and frees this patch will use the stack for allocation. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8076
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-05Fix failing assert when dragging panel close to region edgeHans Goudey
Forgot to include this change from Julian Eisel @Severin in the previous commit.
2020-06-05UI: Pan 2D Region When Dragging to BoundaryHans Goudey
This adds a modal operator called Edge Pan, which is meant to run invisibly while something inside a region is being dragged. This patch applies this to dragging panels, but it can be used elsewhere too. The speed (which is defined relative to how far the mouse is beyond the boundary) and delay are easily adjustible. and the speed also increases smoothly from a start value to a max to make it feel more interactive and less robotic. Differential Revision: https://developer.blender.org/D7465
2020-04-03Cleanup: Rename bScreen variables from sc/scr to screenJulian Eisel
Part of T74432. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-25Cleanup: update doxy sectionsCampbell Barton
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164
2020-03-15Cleanup: use 'const' style argumentCampbell Barton
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: Reduce context usage in UI functionsJulian Eisel
Part of https://developer.blender.org/T74429. There's a chance that this causes some issues becaue in some cases we change from getting the window from context to getting it from somewhere else.
2020-02-14Cleanup: simplify redundant tests in scrollbar codeNicholas Rishel
Differential Revision: https://developer.blender.org/D6783
2019-09-26WM: clean up cursors constants and codeBrecht Van Lommel
There was a mix of old and new constants. Now have one list of WM_CURSOR_* cursor types, using GHOST standard cursors when available and otherwise falling back to our custom cursors. Ref D5197
2019-08-16Cleanup: spellingCampbell Barton
2019-08-08Fix T68360: Zoom too sensitive with hi-dpiCampbell Barton
Scale pixel-input by pixel size for zoom operators.
2019-07-31Fix T65837: "Zoom Axis" is not working on the node editorSebastian Parborg
We would not take into account the user "Zoom Axis" setting in certain 2D space viewports. In addition to this, the "Scale Zoom" didn't work consistently in these spaces either. Reviewed By: Brecht Differential Revision: http://developer.blender.org/D5132