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
2020-08-20GPUState: Use explicit depth test enumClément Foucault
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
2020-07-26Cleanup: GPU: Remove GPU_glew.h outside of GPU moduleClément Foucault
Remove use of GL* constants and types inside the codebase. There is still a few occurence to get rid of.
2020-07-16Cleanup: GPU: Move depth/color masks functions to GPU_stateClément Foucault
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-17VR: Initial Virtual Reality support - Milestone 1, Scene InspectionJulian Eisel
NOTE: While most of the milestone 1 goals are there, a few smaller features and improvements are still to be done. Big picture of this milestone: Initial, OpenXR-based virtual reality support for users and foundation for advanced use cases. Maniphest Task: https://developer.blender.org/T71347 The tasks contains more information about this milestone. To be clear: This is not a feature rich VR implementation, it's focused on the initial scene inspection use case. We intentionally focused on that, further features like controller support are part of the next milestone. - How to use? Instructions on how to use this are here: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test These will be updated and moved to a more official place (likely the manual) soon. Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC headsets don't support the OpenXR standard yet and hence, do not work with this implementation. --------------- This is the C-side implementation of the features added for initial VR support as per milestone 1. A "VR Scene Inspection" Add-on will be committed separately, to expose the VR functionality in the UI. It also adds some further features for milestone 1, namely a landmarking system (stored view locations in the VR space) Main additions/features: * Support for rendering viewports to an HMD, with good performance. * Option to sync the VR view perspective with a fully interactive, regular 3D View (VR-Mirror). * Option to disable positional tracking. Keeps the current position (calculated based on the VR eye center pose) when enabled while a VR session is running. * Some regular viewport settings for the VR view * RNA/Python-API to query and set VR session state information. * WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data * wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU context) * DNA/RNA for management of VR session settings * `--debug-xr` and `--debug-xr-time` commandline options * Utility batch & config file for using the Oculus runtime on Windows. * Most VR data is runtime only. The exception is user settings which are saved to files (`XrSessionSettings`). * VR support can be disabled through the `WITH_XR_OPENXR` compiler flag. For architecture and code documentation, see https://wiki.blender.org/wiki/Source/Interface/XR. --------------- A few thank you's: * A huge shoutout to Ray Molenkamp for his help during the project - it would have not been that successful without him! * Sebastian Koenig and Simeon Conzendorf for testing and feedback! * The reviewers, especially Brecht Van Lommel! * Dalai Felinto for pushing and managing me to get this done ;) * The OpenXR working group for providing an open standard. I think we're the first bigger application to adopt OpenXR. Congratulations to them and ourselves :) This project started as a Google Summer of Code 2019 project - "Core Support of Virtual Reality Headsets through OpenXR" (see https://wiki.blender.org/wiki/User:Severin/GSoC-2019/). Some further information, including ideas for further improvements can be found in the final GSoC report: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report Differential Revisions: D6193, D7098 Reviewed by: Brecht Van Lommel, Jeroen Bakker
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-14UI: Allow gizmo-only redraw taggingJulian Eisel
NOTE: This change shouldn't have any visible effect. It's just the first (easiest) step towards decoupling gizmo redraws from viewport redraws. We currently redraw the entire region whenever a gizmo needs redrawing, which would be nice to avoid in the future, see T73198. The first step towards this would be having a separate tag for them, which is what this patch implements. The term "editor-overlays" was chosen because for the forseeable future, we'll also have to redraw non-gizmo overlays in-between drawing 3D and 2D gizmos. Namely annotations. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6838
2020-01-21Cleanup: simplify wmEvent tablet data storage and namingBrecht Van Lommel
Removing meaningless distinction between NULL pointer and EVT_TABLET_NONE, and initialize pressure and tilt to 1.0 and 0.0 respectively when no tablet is used.
2020-01-09Fix T72900: Mouse-move causes redraw when gizmos are hiddenCampbell Barton
Move redraw tagging to the gesture modal operator to make sure this only runs when it's needed. Caused by d591c8a350310, which tagged the region to redraw when the gizmos were tagged to refresh, however they wont redraw when hidden. Thanks to @jbakker for finding the root cause.
2019-12-19Fix error in recent gizmo tweak workaroundCampbell Barton
2019-12-18Gizmo: add the ability to postpone refreshing while tweakingCampbell Barton
This resolves a logical problem using tweak as a fallback tool. See: T66304#828742 The select action would immediately show the gizmo underneath it, then the tweak would be handled by the gizmo instead of moving the item under the cursor. Currently this works by hiding the gizmo until the tweak event ends. While it's simpler to check if the gizmo received a mouse-down event, it causes flickering before each drag event which feels like a glitch. This is optional for each gizmo type because there are cases where this can be useful to activate the gizmo immediately (mesh rip for example).
2019-12-18Cleanup: use wrapper function for gizmo group refreshCampbell Barton
Allows for adding checks before/after refresh, not yet added.
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-25Fix T67472: Gizmo overlap causes cursor to get stuckCampbell Barton
2019-07-09Fix T61474: laggy interaction on Windows/NVIDIA when gizmos are visibleBrecht Van Lommel
Thanks to Sergey and Clément for helping to track this down.
2019-07-02Cleanup: spellingCampbell Barton
2019-07-01Fix T66229: gizmos overlap when switching modesCampbell Barton
2019-06-28Fix T63694: Crash using tool gizmos with multiple windowsCampbell Barton
Gizmo group types now store a user count so they aren't unlinked while other tools are using them. The tool system now works with multiple windows.
2019-06-27Cleanup: clarify WM_gizmoconfig function namingCampbell Barton
2019-06-27Cleanup: remove unused context check in toolsystem_ref_linkCampbell Barton
Also comment corrections.
2019-06-22GPU_matrix: Add GPU_matrix_unproject_precalcCampbell Barton
Pre-calculates values needed for unprojecting to avoid a matrix invert and extracting projection matrix dimensions for every call to GPU_matrix_unproject. Use for gizmo selection drawing.
2019-06-11Fix T62875: Tooltips behave erratically with view gizmosCampbell Barton
Improvements to behavior for gizmo tool-tips. - 2D gizmos no longer cancel tool-tips on cursor motion (matching the behavior of UI widgets). - 3D gizmos still close on motion since 3D gizmos may have a large on-screen area which would cause them to stay visible even after the cursor has been moved a large distance. The motion threshold is used so they don't close on unintended cursor motion. - Changing highlighted gizmo now cancels the tool-tip & resets the timer.
2019-05-28Cleanup: use WM_ prefix for cursor enumCampbell Barton
2019-05-28WM: support X/Y axis cursor wrappingCampbell Barton
Operator flags to wrap on a single axis. D4865 by @Gvgeo with updates. Resolves T64585
2019-05-28Cleanup: remove unused modal gizmo keymapCampbell Barton
An operator can only have one modal keymap, there is no use in defining multiple.
2019-05-28Gizmo: only highlight when held modifier keys are usedCampbell Barton
Check the current events modifiers against the gizmo keymap, only highlighting when keymap items match. Needed to resolve T63996
2019-05-28Gizmo: changes to internal drag logicCampbell Barton
Minor changes to recent gizmo click/drag logic 08dff7b40bc6a Changing the gizmos highlighted part in the invoke_prepare callback is too error prone since it needs to run before it's known which operator will execute. Add back 'drag_part', since it simplifies click-drag use. While this isn't essential with custom keymaps per gizmo it avoids having to define a keymap in the case a drag event needs a different action.
2019-05-27Gizmo: add per gizmo keymapsCampbell Barton
Remove click-drag support for tweak gizmo, rely on keymap events instead. This is needed for some gizmos to use modifiers keys without having all gizmos use all modifier keys (see: T63996).
2019-05-27Fix tweak/drag event use with gizmosCampbell Barton
It was possible to use a drag event for a gizmo that dragged away from the gizmo, changing the active gizmo. Now use gizmo located at the location that was clicked on.
2019-05-27Gizmo: add event argument to invoke_prepare callbackCampbell Barton
2019-05-23Cleanup: replace the visible gizmo linked list with an arrayCampbell Barton
Avoids an allocation per gizmo & simplifies limiting the lookup past the first intersecting 2D gizmo found.
2019-05-15Gizmo: add depth bias for 3D selectionCampbell Barton
This allows some gizmos priority over others even when they're behind.
2019-04-29Fix T63112: Gizmos fail to restore last cursorCampbell Barton
2019-04-20Cleanup: add missing macros to clang-formatCampbell Barton
2019-04-20Cleanup: comment line length (windowmanager)Campbell 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-04-13Cleanup: style, use braces for the window managerCampbell Barton
2019-03-24GPU: Replace glEnable/glDisable but GPU_state callsClément Foucault
2019-03-08Cleanup: use plural names for Main listsCampbell Barton
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
2019-03-07Fix gizmos not responding to theme color updatesCampbell Barton
Re-create gizmos when changing theme colors, since theme colors don't change often this allows gizmos to setup their colors on initialization.
2019-02-20Cleanup: rename wmEventHandler_* base -> headCampbell Barton
Makes it more clear it's the header/start of the struct.
2019-02-19WM: move operator handler to it's own typeCampbell Barton
2019-02-19WM: move gizmo handler to it's own typeCampbell Barton
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-15Fix T60905: Crash using smooth toolCampbell Barton
Tools were relying on gizmos drawing to initialize their gizmos, now tool gizmos are initialized immediately.
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.