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-08-04Viewport normal drawing with constant lengthJeroen Bakker
Patch for: T37878 {F10169694} Reviewed By: fclem Differential Revision: https://developer.blender.org/D11487
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
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-16UI - LOCAL View3D overlay statsHarley Acheson
This patch improves the 3DView statistics overlay to show LOCAL stats while in local view. This means the stats can vary between 3DViews and the statusbar when views are in local view, but this gives a much more accurate count of the objects, and their components, that you are directly working with rather than just scene values. Differential Revision: https://developer.blender.org/D8883 Reviewed by Campbell Barton
2021-06-11Overlays: Make flash on mode transfer an operator propertyPablo Dobarro
This moves the flash on mode transfer effect option from the overlays to an operator property of the mode transfer operator. - This effect is intended to show the target object when no overlays or a minimal set of overlays is enabled. Making it part of the whole set of overlays invalidates this use case. - The effect is not intended to be configurable per viewport, it should be a global option. The effect is still implemented using the overlay engine (instead of a draw modal callback) due to performance and drawing artifacts. Having it implemented as an overlay with runtime timer data in the objects makes also possible to run multiple animations at the same time without any visual glitches. Reviewed By: campbellbarton, JulienKaspar Differential Revision: https://developer.blender.org/D11519
2021-06-03Overlay: Flash on Mode Transfer overlayPablo Dobarro
This implements T87633 This overlay renders a flash animation on the target object when transfering the mode to it using the mode transfer operator. This provides visual feedback when switching between objects without extra overlays that affect the general color and lighting in the scene. Differences with the design task: - This uses just a fade out animation instead of a fade in/out animation. The code is ready for fade in/out, but as the rest of the overlays (face sets, masks...) change instantly without animation, having a fade in/out effect gives the impression that the object flashes twice (once for the face sets, twice for the peak alpha of the flash animation). - The rendering uses a flat color without fresnel for now, but this can be improved in the future to make it look more like the shader in the prototype. - Not enabled by default (can be enabled in the overlays panel), maybe the defaults can change for 3.0 to disable fade inactive and enable this instead. Reviewed By: jbakker, JulienKaspar Differential Revision: https://developer.blender.org/D11055
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
2020-12-04EEVEE: Arbitrary Output VariablesJeroen Bakker
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the render pass tab and used in shader materials. Both Object and World based shaders are supported. The AOV can be previewed in the viewport using the renderpass selector in the shading popover. AOV names that conflict with other AOVs are automatically corrected. AOV conflicts with render passes get a warning icon. The reason behind this is that changing render engines/passes can change the conflict, but you might not notice it. Changing this automatically would also make the materials incorrect, so best to leave this to the user. **Implementation** The patch adds a copies the AOV structures of Cycles into Blender. The goal is that the Cycles will use Blenders AOV defintions. In the Blender kernel (`layer.c`) the logic of these structures are implemented. The GLSL shader of any GPUMaterial can hold multiple outputs (the main output and the AOV outputs) based on the renderPassUBO the right output is selected. This selection uses an hash that encodes the AOV structure. The full AOV needed to be encoded when actually drawing the material pass as the AOV type changes the behavior of the AOV. This isn't known yet when the GLSL is compiled. **Future Developments** * The AOV definitions in the render layer panel isn't shared with Cycles. Cycles should be migrated to use the same viewlayer aovs. During a previous attempt this failed as the AOV validation in cycles and in Blender have implementation differences what made it crash when an aov name was invalid. This could be fixed by extending the external render engine API. * Add support to Cycles to render AOVs in the 3d viewport. * Use a drop down list for selecting AOVs in the AOV Output node. * Give user feedback when multiple AOV output nodes with the same AOV name exists in the same shader. * Fix viewing single channel images in the image editor [T83314] * Reduce viewport render time by only render needed draw passes. [T83316] Reviewed By: Brecht van Lommel, Clément Foucault Differential Revision: https://developer.blender.org/D7010
2020-11-19Build-system: Force C linkage for all DNA type headersJulian Eisel
Some DNA headers already did this, most did not. Even though many of them would be included in C++ files and thus compiled as C++. This would be confusing and developers may think they have to add `extern "C"` too a whole lot of (indirect) includes to be able to use a C header in C++. However, this is a misconception. `extern "C"` does not cause code to be compiled with C rather than C++! It only causes the linker to not use C++ function name mangling. See https://stackoverflow.com/a/1041880. Because extern DNA headers don't have function declarations, using `extern "C"` actually should not have any effect. On the other hand, adding it causes no harm and avoids confusion. So let's just have it consistently in C header files. Differential Revision: https://developer.blender.org/D9578 Reviewed by: Bastien Montagne, Sybren Stüvel
2020-11-13Add An Opacity Slider to Overlay WireframeJun Mizutani
This patch adds an opacity slider to the wireframe overlay. The previous wireframe in dense geometry scenes could be too dark and sometimes the user just wants an impression of the geometry during modelling. Reviewed By: Jeroen Bakker Differential Revision: https://developer.blender.org/D7622
2020-09-18Overlay: Fade Inactive GeometryPablo Dobarro
This implements a new overlay that blends the bakground color over the objects that are not in the same mode as the active object, making them fade with the background. This is especially needed for sculpt mode as there is no other overlay or indication in the viewport to display which object is active. This is intended to be used with D7510 in order to have a faster workflow when sculpting models with multiple objects. Reviewed By: fclem Differential Revision: https://developer.blender.org/D8679
2020-09-18LookDev: Lock HDRI rotation to ViewPablo Dobarro
This adds an option for the HDRI rotation to follow the view rotation. When this option is enabled, this allows EEVEE materials to be used as matcaps for sculpting and painting. This has an extra performance cost when orbiting around the model as the lookdev cache needs to be recalculated, but in my test it is barely noticeable. Reviewed By: fclem Differential Revision: https://developer.blender.org/D8566
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
2020-07-06Fix alignment/size issue on ARM/RPi architectureSergey Sharybin
Addresses 964305 from Debian bug tracker.
2020-05-26Curves: Implement Handles for selected points onlyAntonio Vazquez
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves. I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel.. Reviewed By: fclem, #user_interface, billreynish, Severin Differential Revision: https://developer.blender.org/D7754
2020-05-15Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-15Cleanup: don't check flags as booleansCampbell Barton
Causes unexpected behavior when adding new flags.
2020-05-13GPencil: Add new X-Ray option for Canvas GridAntonio Vazquez
In some situations is good to have a grid visible anot beeing occulde by meshes. By default is OFF. Differential Revision: https://developer.blender.org/D7721
2020-05-13Revert "GPencil: Add new X-Ray option for Canvas Grid"Antonio Vazquez
This reverts commit fd025b0b7a46c5e56f348b73cf989c6bbddec707.
2020-05-13GPencil: Add new X-Ray option for Canvas GridAntonio Vazquez
In some situations is good to have a grid visible anot beeing occulde by meshes. By default is OFF. Differential Revision: https://developer.blender.org/D7721
2020-04-24UI: Move Scene Statistics to the 3D ViewportHarley Acheson
Removes statistics from footer and to an (optional) overlay in 3DView. Differential Revision: https://developer.blender.org/D7410 Reviewed by Campbell Barton
2020-04-05Cleanup: macro hygiene, parenthesize argumentsCampbell Barton
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-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-06CodeCleanup: Added View3DShading enumsJeroen Bakker
Added the core enums that workbench draw engine uses.
2020-03-06CodeCleanup: Added enums to opengl render functionsJeroen Bakker
Motivation the functions get 3 different kind of flag parameters (ImBuf, DrawType, OffscreenRendering) the naming of the flags were not clear, leading to mistakes and unnecessary time spend debugging.
2020-03-05Sculpt Face SetsPablo Dobarro
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070
2020-02-25EEVEE: Lookdev: Add support for partially blurred backgroundClément Foucault
This is using the GGX probe as background. This has the drawback of having the resolution choosed in the indirect lighting setting. The blurring is not really high-quality. The pros is that it has a simple implementation and is fast to evaluate. This patch also fades the background alpha to make overlay engine draw the default background color in the correct color space. Removing one colorspace hack. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6895
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.
2019-12-11DrawManager: Disable Clipping in material/rendered modeJeroen Bakker
Viewport: Disable Clipping For EEVEE and External Renderers Currently it is possible that, when using viewport clipping, the display and tools communicate different information to the user then the renderer does. The reason is that the renderer does not support viewport clipping. Both EEVEE and Cycles do not support it. This patch will disable the clipping in all the tools and drawing code when the viewport drawing mode is `Material Preview` or `Rendered`. This patch introduces a `RV3D_CLIPPING_ENABLED` util that checks if clipping is enabled for the given `rv3d` and `v3d`. Also in places where it was needed we added the `ViewContext` as a carrier for the `View3D` and `RegionView3D`. There are a few areas in the tooling (select, projection painting) that still needs to be tackled after this patch. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6047
2019-11-28EEVEE: Viewport RenderpassesJeroen Bakker
This patch will allow the user to select the EEVEE renderpass to be shown in the viewport by default the combined pass will be shown. Limitations: * Viewport rendering stores the result in a `RenderResult`. RenderResult is not aware of the type of data it holds. In many places where RenderResult is used it is assumed that it stores a combined pass and the display+view transform are applied. I will propose to fix this in a future patch. But that is still being designed and discussed. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6319
2019-10-18Cleanup: remove unused viewport fx_settingsCampbell Barton
2019-09-29Sculpt: disable workbench anti-aliasing during stroke paintingBrecht Van Lommel
This mostly happens automatically anyway since there is usually not enough time left over for it. But when it does it happen it breaks partial redraw, and may also have a negative impact on responsiveness. Ref T70295
2019-09-13Per-Viewport Collection VisibilityDalai Felinto
Support per-viewport collection visibility options. Note 1: There is no way to show a collection that was not visible before due to depsgraph. Otherwise we would risk having all the collections in the depsgraph and I believe this is not the idea. An alternative would be to have a new depsgraph for viewports that are not local. Something to keep in mind if we do per-viewport current frame in the future. So for now what we do is to only allow collections visibility to be disabled/hidden in this mode. Note 2: hide_viewport (the eye icon) doesn't really matter for depsgraph. So after the merge we can still ignore it to show the collections locally in a viewport with no problems for the depsgraph. Reviewers: brecht, sergey Subscribers: billreynish Related task: T61327 Differential Revision: https://developer.blender.org/D5611
2019-09-11Cycles: Display RenderPass in ViewportJeroen Bakker
This change allows the user to select a renderpass in the 3d viewport. Added support for external renderers to extend the `View3DShading` struct. This way Blender doesn't need to know the features an external render engine wants to support. Note that the View3DShading is also available in the scene->display.shading; although this is supported, it does not make sense for render engines to put something here as it is really scene/workbench related. Currently cycles assumes that it always needs to calculate the combined pass; it ignores the `pass_flag` in KernelFilm. We could optimize this but that was not in scope of this change Reviewed By: brecht Differential Revision: https://developer.blender.org/D5689
2019-09-06GPencil: New option to fade not selected objectsAntonio Vazquez
Before, it was only possible to fade the active object. The new option allows to fade all non gpencil selected object. This is a common request by artists. {F7719513} Reviewers: mendio, pepeland Reviewed By: mendio Differential Revision: https://developer.blender.org/D5704
2019-09-06Viewport Shading: StudioLight IntensityJeroen Bakker
Add option to change the Intensity of the HDRI in the 3d viewport. This works for both EEVEE and Cycles Reviewed By: brecht, fclem Differential Revision: https://developer.blender.org/D5674
2019-09-04Shading Modes: Material and Render PreviewJeroen Bakker
This change implements the basics as described in {T68312} for the shading modes. * LookDev shading mode is renamed to Material Preview. It always uses Eevee as renderer, and is intended to provide a fast material preview suitable for texture painting, and texture and material setup. * Rendered shading gains "Use Scene Lights" and "Use Scene World" options similar to current Material Preview. These will be enabled by default. When Use Scene World is turned off, HDRIs will be used for lighting instead. These options are available for EEVEE and Cycles. * Renderers will be able to customize the shading settings panel and add additional settings. Reviewed By: brecht, fclem Differential Revision: https://developer.blender.org/D5612
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-08Fix T67587: Fix Drawing in Wireframe Non X-Ray ModeJeroen Bakker
When using Vertex or Weight paint mode on a wireframe the overlay was blended with the background. In this case we now use alpha blending. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5340
2019-07-05TexturePaint: Force Workbench Texture Color ModeJeroen Bakker
When in texture paint mode and in solid mode the object that is being texture painted will be rendered by the workbench engine with textures. All other objects would render the same. For other cases the texture paint draw engine will still draw the texture. The texture mode draw engine now only drawn the masks. The opacity sliders influences the texture mask. This change has been implemented conserably. In the future we need to look into making this better, like adding support that every object can be colored differently. Currently when rendering in the workbench we can have up to 3 different color types active (what the user selected, the fallback in case no materials have been configured and this one, forcing textures) Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5190
2019-06-13Cleanup: correct wireframe xray flag nameCampbell Barton
Revert part of d56c0a0a6affcdfd7335c
2019-05-21Viewport: MSAA support during ViewportRenderingJeroen Bakker
When rendering viewport to an offscreen buffer the buffer was constructed for non anti aliasing (0 samples). This made the objects that are drawn by the `object_mode` including `wireframe` draw type non-anti-aliased. The offscreen buffers will be constructed based on the user setting for viewport multisampling (`U.ogl_multisamples`). The same setting will also be used when previewing scene strips in the sequencer. For now this only improves wireframe drawing in the scene strips. To improve the Anti aliasing in the scene strips we need to get finer control in the draw manager. This will be part of a different patch I am preparing. Please note that this patch also cleansup some unused code in the offscreen rendering (FSAA code was still existing, but never called) Reviewed By: brecht Maniphest Tasks: T64849 Differential Revision: https://developer.blender.org/D4907
2019-04-30Sequencer: Scene Strip PerformanceJeroen Bakker
- Merged SEQ_OFSDRAW with V3D_OFSDRAW and define in the DNA_view3d_types: Due to this FSAA always kicked in making the rendering slow. - Removed `Texture Solid` and `DOF`. - Now when chosing Solid rendering the settings of the original scene is used. - Added a global override to use scene specific shading. In the Future we will need to enhanced this so user can change the settings. - Added support for LookDev. LookDev crashed as it needed the `evil_C` what was not set - LookDev mode will always show the scene + world lights. Reviewed By: brecht, fclem Maniphest Tasks: T62517 Differential Revision: https://developer.blender.org/D4738
2019-04-23Workbench: Support Active Vertex ColorJeroen Bakker
Currently it is not possible to view the vertex colors of an object. To optimize the workflow, workbench will need to support Vertex Colors. The Vertex Colors is a new option in `shading->color_type`. When objects do not have vertex color, the objects will be rendered with the `V3D_SHADING_OBJECT_COLOR`. In order to support vertex colors in workbench the current texture/solid shading structure is migrated to a primary shaders and fallback shaders. Fix: T57000 Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D4694
2019-04-203D View: add opacity for sculpt mask displayPablo Dobarro
This matches vertex/texture paint opacity options. Useful because 0.75 is sometimes too dark to see the surface shading. Resolves T63746