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-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-05Cleanup: spelling, punctuationCampbell 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-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: deduplicate free codeGermano Cavalcante
It is more appropriate that `depths` is freed in `ED_view3d_depths_free`.
2021-06-21Refactor: Do not keep a copy of depth buffer in RegionView3DGermano Cavalcante
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
2021-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
2021-04-17Fix wrong logic used in 'ED_view3d_depth_read_cached'Germano Cavalcante
It is important to limit the pixels read on `BLI_array_iter_spiral_square`. Fortunately `ED_view3d_depth_read_cached` was not being called with a `margin` parameter. Wrong logic introduced in rB44c76e4ce310.
2021-04-053D View Utils: Add 'margin' parameter to 'ED_view3d_depth_read_cached'Germano Cavalcante
Matches the alternative function ED_view3d_autodist_depth, but is more efficient since it uses the cache. No functional changes.
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678
2021-03-18Cleanup: spellingCampbell Barton
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-01-26Cleanup: Declare variables where initializedHans Goudey
2020-12-14UI/Assets: Support generating object preview imagesJulian Eisel
Object previews are really helpful for visual data-block selection, like asset browsing. Having them be generative should also be quite handy and should work well enough in many, if not most cases. What this does is simple: * Place the object (actually a deep copy of it, for thread safety) in a virtual .blend into an empty scene/view-layer. * Add a camera, point it towards the front of the object, assuming that means pointing towards its +Y axis. * Use "Camera Fit Frame to Selected" logic to put the object into frame. * Create a threaded off-screen render. Of course, such an automatic preview will not work in all situations. E.g. it currently does a bad job capturing a single plane. We could add options for more advanced automatic previews, but probably custom previews is more important, which I committed already (812ea9184221). Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Reviewed as part of https://developer.blender.org/D9719. Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-03Cleanup: view-port --> 2D/3D ViewportAaron Carlisle
2020-11-30Cleanup: Use "region" for ARegion variable namesHans Goudey
As proposed in T74432 and already implemented in several commits, "region" is the preferred name for `ARegion` variables, rather than any variant of "ar". This commit changes a few "ar" variables that have popped up over time and also adjusted names of variants like "arnew".
2020-11-07View3D: take clipping into account for Frame AllCampbell Barton
Clamp the min/max used for Frame All/Selected by the clipping region if it's set. Resolve T81050
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-06Move "Camera Parent Lock" from preferences to Object RelationsHans Goudey
"Camera Parent Lock" can be useful when rigging cameras, but it is not intuitive, and has also generated a lot of confusion (bug reports). This is because it breaks the fundamental parent <-> child relationship conventions in Blender, and there is no indication that it's intended without diving into the preferences. This commit moves the setting to the object level, and exposes it in the relations panel in the property editor. It is exposed for every object type because any object type can be "View Locked" in the 3D view. The property description is also updated to reflect this change and be more specific without getting too long. In the future this could become a more general feature of the transform system, but for now it is limited to "Lock Camera to View". Differential Revision: https://developer.blender.org/D9239
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-02Cleanup: pass const matricesCampbell Barton
Also order return matrices last.
2020-07-18Cleanup: GPU: rename bglPolygonOffset to GPU_polygon_offsetClément Foucault
And move it to GPU module.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-03Cleanup: Editors/Space/View3D, 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/space_view3d` module. No functional changes.
2020-06-30Fix T78358: random crash editing shader nodes with texturesBrecht Van Lommel
2020-05-26Fix T76970: Unneccessary update calls viewportJeroen Bakker
Due to recent changes clicks in the node editor would trigger a depsgraph update resulting in too many redraws. This patch limits the updates to when workbench shown in texture mode in any visible screen. There are still cases where too many updates are created. For example when there are a Cycles render viewport and a Workbench texture viewport on the same screen. This fix is meant as a workaround. The actual fix should add a mechanism to the depsgraph and the viewports should check if they need to be redrawn. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7830
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-04-03Cleanup: Continue renaming ARegion variables from ar to regionJulian Eisel
Continuation of b2ee1770d4c3, now non-single word variables are also renamed. Part of T74432. 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-17Cleanup: rename 'centre' to 'center' in View3DCampbell Barton
2020-03-13Cleanup: pass const args (mostly Scene & RenderData)Campbell 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-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-093D View: check view quaternion alignment which orbitingBataev Artem
This makes auto-perspective work as expected when orbiting out of a snapped view.
2019-08-16Cleanup: spellingCampbell Barton
2019-08-08Docs: improve description of 3D view distance offset utilityCampbell Barton
2019-08-073D View: utility function to set the depth from a locationCampbell Barton
Avoids having to do projection/offset calculations inline.
2019-05-16RNA: add 3D cursor matrix attributeCampbell Barton
Avoids having to check rotation modes to get the orientation.
2019-04-21Cleanup: comments (long lines) in editorsCampbell 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-26Cleanup: style, use braces for editor/spacesCampbell Barton
2019-02-27Cleanup: rename lamp -> lightCampbell Barton
2019-02-253D View: support for editing cursor rotationCampbell Barton
Add buttons for editing the cursor rotation as well as rotation modes, similar to object and pose bones.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.