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-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-15Cleanup: redundant assignmentsCampbell Barton
2020-03-15Cleanup: use 'const' style argumentCampbell Barton
2020-03-12Fix T73049: Drag & drop on overlapping panels behaves incorrectlyJacques Lucke
Reviewers: brecht, Severin Differential Revision: https://developer.blender.org/D7024
2020-03-09Fix failing assert because of invalid region coordinatesJulian Eisel
Steps to reproduce were: * Disable tool settings region in 3D View (View > Tool Settings) * Split the 3D View and drag all the way down The removed code doesn't seem to be needed anymore. Tested this on hiDPI too, seems fine. These kind of fixes are always tricky, so I wouldn't be surprised if there are any issues caused by this.
2020-03-09Python API: allow overriding context.workspace for workspace operatorsKai Jægersen
Differential Revision: https://developer.blender.org/D6867
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
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-03-04Cleanup: avoid the term old when storing/restoring context variablesCampbell Barton
2020-02-25WM: move cursor refresh tag to the windowCampbell Barton
Avoids having to check the current area is NULL.
2020-02-22Cleanup: internal changes to cursor resettingCampbell Barton
- Move gizmo cursor check into ED_region_cursor_set so the result of calling this function is the same as flagging for cursor update. - Use tagging in ui_popup_block_remove which avoids adding a mouse-move event in case the cursor needs to be changed again.
2020-02-21Cleanup: remove unused ScreenAnimData.refreshCampbell Barton
2020-02-21Cleanup: un-indent ED_screen_set_active_regionCampbell Barton
Also remove redundant flag assignment from previous comment.
2020-02-21Cleanup: avoid looping over areas when refreshing the cursorCampbell Barton
These values are already known, pass in as arguments.
2020-02-21Fix T67805: Cursor doesn't update when switching tools via shortcutsCampbell Barton
2020-02-15Cleanup: work around clang-format differences between versionsBrecht Van Lommel
Ref T73747
2020-02-14Cleanup: Rename ED_region_tag_redraw_overlay() to ED_region_tag_redraw_cursor()Julian Eisel
Old name was a bit confusing/misleading, esp. since previous commit.
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-02-12Cleanup: clang-format.Bastien Montagne
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-02-093D View: support axis views with axis-aligned rollCampbell Barton
Previously any of the named views could not have any roll, this commit supports roll as long as it's axis-aligned (90,180,270 deg). This is useful for snapping to views, an improvement on cebd025e02f11.
2020-02-07Cleanup: use of 'unsigned'Campbell Barton
- Replace 'unsigned' used on it's own with 'uint'. - Replace 'unsigned const char' with 'const uchar'.
2020-01-29Fix T73453: Selecting playhead in VSE deselects all selected stripsJulian Eisel
Tool system handlers had higher priority than the overlayed animation "regions" (fake regions in fact). Give animation (and View2D) handlers priority over toolsystem handlers. Gizmo's still have higher priority, but I'll leave that unless there's a reason to change.
2020-01-29Fix T73482: Context Menu on any button is brokenJulian Eisel
What I removed here used to be needed in an earlier version of the patch, to avoid use-after-frees. This is not the case anymore, so it seems we can remove this. Generally the context region code is very weak and inconsistent. If things were done properly, the line I added shouldn't cause issues - it's logically correct. Also fixes T73475.
2020-01-28UI: Edit Menu - Undo History List and Operator PollingHarley Acheson
Enable and Disable Edit Menu items based on whether those actions are currently applicable. https://developer.blender.org/D4846 Reviewed by Brecht Van Lommel
2020-01-28Fix T63999: Filepath property won't open filebrowser from a popoverJulian Eisel
To issues caused this: * The code to launch the filebrowser from a button didn't respect popup menus stored in context * There was actually no popup menu region stored in context for this case. Doing so *may* introduce other issues, but the way I did things already fixes all issues I've found.
2020-01-22Fix T73191: Buttons in lower left of Preferences brokenJulian Eisel
I'm still not entirely sure what was going on - I know that the execute region didn't get initialized correctly, but doing that at a later point didn't fix the issue. Apparently forcing the header region to re-initialize does fix it, even though I was sure this was redundant. Also fixes a memory leak in UI code after preferences were opened.
2020-01-22Cleanup: Rename ED_region_init() -> ED_region_floating_initialize()Julian Eisel
This function is a very special refresh function just for floating regions. _initialize is more consistent with ED_area_initialize() so use that too. Also adds assert.
2020-01-21Fix T71810: Flipping Sidebar with tabs breaks alignmentJulian Eisel
Panel alignment was only updated when panel size changed. Now we can also recognize changes in the category tabs offset and tag panels for alignment updates.
2020-01-16Fix wrong usages of region align enumerationsJulian Eisel
`ARegion.alignment` unfortunately is a mixture of value and bitflag enumerations. When checking for left/right/top/bottom region alignment, the flags have to be masked out usually. Most of the fixed cases here probably didn't cause issues in practice, but could in fact break at any point when surrounding logic changes. In fact the assert in #region_visible_rect_calc() failed in an older file from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949035. This fixes it.
2020-01-15Fix crash with some hidden regions after previous commitJulian Eisel
E.g. in the default "Animation" workspace this would crash.
2020-01-15Fix invalid region rectangles, sanitize dynamic region size calulationsJulian Eisel
It was too easy to end up with invalid region rectangles and we were badly protected against them, so that they were hard to catch. In fact we still create a main region for the top-bar, which ended up getting a region height of -1. While this doesn't seem to have caused issues in practice, we should prevent them entirely. So idea was that at the end of region layout resolving, `BLI_rcti_is_valid()` should return `true` for the region rectangle. Further changes here ensure this is true: The `RGN_FLAG_TOO_SMALL` flag is now set whenever there is not enough space for a region or if it would get a size of zero or less. Note: Should the assert fail, please do not just disable it and try to actually address the root of the issue.
2020-01-14Cleanup: Use new BLI_rct utilities to ensure valid rectanglesJulian Eisel
Technically this does a slight change to the check in wm_window.c: The assert now also allows zero width/height rectangles.
2020-01-14Fix T72200: Split Quad View Region CrashJeroen Bakker
When splitting a Quad View by dragging a corner an quad area can become negative size because of a one pixel offset to calculate the start of the area. This patch solves this to make sure that there are no negative areas. By adapting the `ARegion.winrct`. Reviewed By: Severin Differential Revision: https://developer.blender.org/D6579
2020-01-07Annotations: Split annotation operators and pointer functionsAntonio Vazquez
This allows to have annotation panels and grease pencil object panel at the same time. Differential Revision: https://developer.blender.org/D6467
2020-01-03UI: scale region hide threshold by zoom levelCampbell Barton
Resolves issue were it wasn't possible to have a single column toolbar when zoomed out.
2020-01-03Fix gizmos flickering when resizing regionsCampbell Barton
2020-01-03Fix toolbar flickering on resize, inability to hideCampbell Barton
2020-01-03UI: Improve toolbar width snappingHarley Acheson
Allow narrower toolbar before snapping to two column layout.
2019-12-20Fix IC-keymap doesn't allow MMB to run the active toolCampbell Barton
Now the keymap can be configured so both the fallback and active tool can be activated at once - when configured not to conflict.
2019-12-17UI: Prevent crash when opening file browser with mouse not in windowSybren A. Stüvel
When the mouse is not inside the Blender window, `CTX_wm_area(C)` returns `NULL`, but this wasn't checked for.
2019-12-17Fix deprecated DNA define checksCampbell Barton
Also remove dead code which checked for SPACE_TIME.
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-12-04Make curve decimation only take into account the selected curve pointsSebastian Parborg
Previously the decimation would take the whole curve into account when decimating and not just the selected part. This also contains various smaller bug fixes for the fcurve decimation. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D6286
2019-11-24Cleanup: spelling, repeated wordsCampbell Barton
2019-11-08Merge branch 'blender-v2.81-release'Philipp Oeser
2019-11-08Fix T71372: view layer is not maintained when area is duplicated into new windowPhilipp Oeser
Maniphest Tasks: T71372 Differential Revision: https://developer.blender.org/D6205