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
2022-08-05Cleanup: Spelling, remove double negativeHans Goudey
2022-05-03Cleanup: spelling in commentsCampbell Barton
2022-04-29Select Engine: port shader to use 'GPUShaderCreateInfo'Germano Cavalcante
Simple port with a few cosmetic changes: - Attribute named "color" for indices VBO is now called "index" - The indices VBO is now composed of `int`s instead of `uint`s (this simplifies the source) Differential Revision: https://developer.blender.org/D14800
2022-04-05Cleanup: Change globalBlock members to snake caseClément Foucault
This avoid conflicting defines in GLSL Fix T96998 Blender 3.2.0 Alpha crashes on startup
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-04-01Cleanup: Use const for bounding boxes where possibleHans Goudey
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-25Fix depsgraphs sharing IDs via evaluated edit meshSergey Sharybin
The evaluated mesh is a result of evaluated modifiers, and referencing other evaluated IDs such as materials. It can not be stored in the EditMesh structure which is intended to be re-used by many areas. Such sharing was causing ownership errors causing bugs like T93855: Cycles crash with edit mode and simultaneous viewport and final render The proposed solution is to store the evaluated edit mesh and its cage in the object's runtime field. The motivation goes as following: - It allows to avoid ownership problems like the ones in the linked report. - Object level is chosen over mesh level is because the evaluated mesh is affected by modifiers, which are on the object level. This patch allows to have modifier stack of an object which shares mesh with an object which is in edit mode to be properly taken into account (before the change the modifier stack from the active object will be used for all objects which share the mesh). There is a change in the way how copy-on-write is handled in the edit mode to allow proper state update when changing active scene (or having two windows with different scenes). Previously, the copt-on-write would have been ignored by skipping tagging CoW component. Now it is ignored from within the CoW operation callback. This allows to update edit pointers for objects which are not from the current depsgraph and where the edit_mesh was never assigned in the case when the depsgraph was evaluated prior the active depsgraph. There is no user level changes changes expected with the CoW handling changes: should not affect on neither performance, nor memory consumption. Tested scenarios: - Various modifiers configurations of objects sharing mesh and be part of the same scene. - Steps from the reports: T93855, T82952, T77359 This also fixes T76609, T72733 and perhaps other reports. Differential Revision: https://developer.blender.org/D13824
2021-12-07DrawManager: Engine Instance Data.Jeroen Bakker
In the original design draw engines had to copy with a limitation that they were not allowed to reuse complex data structures between drawing calls. Data that could be reused were limited to: - GPUFramebuffers - GPUTextures - Memory that could be removed calling MEM_freeN (storage list) - DRWPass This is fine when the storage list contains arrays or structs but when more complex data types (vectors, maps) etc wasn't possible. This patch adds instance_data that can be reused between drawing calls. The instance_data is controlled by the draw engine and doesn't need to be limited as described above. When an engines stores instance_data it must implement the `DrawEngineType.instance_free` callback to free the data. The patch originates from eevee rewrite. But was added to master as the image engine rewrite also has a need for it. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13425
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-08-12Cleanup: spelling in commentsCampbell Barton
2021-08-05DRW: New Select Debug EngineGermano Cavalcante
This is a simple engine used only to debug the texture of select ids. It is only used when the `WITH_DRAW_DEBUG` option is enabled and the debug value is 31. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5490
2021-08-03Fix select engine buffer having wrong vertex sizeGermano Cavalcante
The theme used was wrong and the vertex size is twice as set in the theme.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-01-05Eevee Cryptomatte: Store hashes in render result meta dataJeroen Bakker
Stores cryptomatte hashes as meta data to the render result. Compositors could use this for lookup on names in stead of hashes. Differential Revision: https://developer.blender.org/D9553
2020-09-05Cleanup: spellingCampbell Barton
2020-09-05GPUTexture: Change texture creation APIClément Foucault
This is to modernize the API: - Add meaningful name to all textures (except DRW textures). - Remove unused err_out argument: only used for offscreen python. - Add mipmap count to creation functions for future changes. - Clarify the data usage in creation functions. This is a cleanup commit, there is no functional change. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-08-30GPUFrameBuffer: Use debug name supportClément Foucault
This is to make it easier to navigate captures in renderdoc.
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-20Python API: option to use OpenGL context in RenderEngine.renderMiguel Pozo
When bl_use_gpu_context is set, an OpenGL context will be available for OpenGL based render engines. Differential Revision: https://developer.blender.org/D8305
2020-06-05Fix T77335: Circle Select tool selects faces perpendicular to the viewGermano Cavalcante
Internally the face dots are being drawn when the Edges option of the overlay (not the selection mode) is disabled.
2020-05-18Cleanup: Put GPU_state_init inside gpu_state.cClément Foucault
Also put glDisable(GL_DITHER) in it since we don't even use it (but is enabled by default). Also leave GL_MULTISAMPLE on by default since it has no impact on non-MSAA framebuffers.
2020-03-20Python API: add bl_use_stereo_viewport for RenderEngineBrecht Van Lommel
To indicate if the render engine supports rendering a stereo 3D viewport. This is not currently supported for Cycles. Fixes T62582
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
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-06CodeCleanup: Use eDrawTypeJeroen Bakker
This patch will make use of the eDrawType where it was used as a variable or parameter name. The eObjectDrawType was renamed to eDrawType as it is also used by `View3DShading.type`.
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-01-15Fix T72104 Blender selects faces outside of Clipping Region if X-Ray is offClément Foucault
2019-12-04Fix T72076: Edit mode circle selection inconsistency with animationmano-wii
The solution is to check for updates on `data->recalc`.
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-09-23Fix selection and snapping misusing texture space as boundboxBrecht Van Lommel
This fixes the regression from T70103 introduced by the fix for T70103.
2019-09-19Cleanup: spellingCampbell Barton
2019-09-17Fix T69716: Can't select geometry hidden by faces created by modifiersmano-wii
This kind of reverts rBc060a835 that was committed without discussion.
2019-09-12Fix T69752: Texture paint sampling colors always 'merged down'Philipp Oeser
Rgression from rBaf4dcc6073fa. paint_sample_color > imapaint_pick_face uses the the selection buffer (DRW_select_buffer_sample_point) and to get flat colors [select_id_flat] we need to be in SCE_SELECT_FACE mode. This was already fine if you had 'Face Selection Masking' turned on, but got colors including lighting when turned of [select_id_uniform]. There was already an exception in 'select_cache_init' that turns on SCE_SELECT_FACE for weightpaint, we just need this for texture paint (vertex paint) as well... Also moved the logic into select_id_get_object_select_mode. Note we were also asserting here: BLI_assert failed: /blender/source/blender/draw/engines/select/ select_engine.c:174, select_cache_init(), at 'e_data.context.select_mode != 0' Note also this is not working correctly for vertexpaint (yet), but has been discussed in T69752 and there is a solution by @mano-wii in P1032. Reviewers: mano-wii Subscribers: mano-wii Maniphest Tasks: T69752 Differential Revision: https://developer.blender.org/D5775
2019-09-03Fix selection engine checksCampbell Barton
- Don't use vertex selection in texture paint mode. - Don't allow mixing vertex & face flags in vert/weight paint modes.
2019-09-03Fix T69424: Weight paint sample doesn't workCampbell Barton
2019-08-21Fix T68911: "illegal recursive expansion of macro id"mano-wii
I imagined that could be a problem for some drivers. I should have avoided.
2019-08-20Cleanup: remove undefined functionmano-wii
2019-08-20Select Engine: Move some private members out of select contextmano-wii
2019-08-20Cleanup: Move select_engine function to corresponding headermano-wii
2019-08-18Fix T68782: false occlusion in selecting vertices and edges with objects in ↵mano-wii
any wire view
2019-08-15Cleanup: Remove redundant headersmano-wii
2019-08-15Edit Mesh Selection: Refactor: Redraw idmap buffer at runtime with only ↵mano-wii
objects inside the rect But in the future the selection code may also be used in object mode (eg for snapping). So to avoid using too much VRAM resources, it is good to avoid drawing all objects in the viewport. The solution was to create an array with only objects that are detected within the selection area. If the selection operator is modal, objects already detected are not removed from the array until view3d is moved or orbited. To detect the object, its BoundBox is tested. Since the Select Engine does not have a dedicated depth texture, whenever a new object is "found" the depth of the objects in the array already drawn is redrawn. Reviewers: campbellbarton, fclem Reviewed By: fclem Differential Revision: https://developer.blender.org/D5435
2019-08-12Cleanup: rename `BaseOffset` to `ObjectOffsets`mano-wii
2019-08-12Cleanup: DRW manager: Move `select_buffer.c` utilities out of the selection ↵mano-wii
engine internals
2019-08-07Fix unassigned return argument in recent select refactorCampbell Barton
2019-08-07Edit Mesh Selection: Move ED_view3d_select_ functions to bf_drawmano-wii
It is easier to deal with private values of the DRW_select engine and gives room for improvement. Reviewers: campbellbarton, fclem Differential Revision: https://developer.blender.org/D5415
2019-08-07Select utils refactor: remove lagacy `ED_view3d_select_id_read_rect`mano-wii
`ED_view3d_select_id_read_rect` serves only as a bridge to `DRW_framebuffer_select_id_read`. Keeping these codes similar only increases the complexity of some functions. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5415
2019-08-06Fix not reported: Face selection sometimes does not work in weight, paint ↵mano-wii
and texture mode.