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-12-27Cleanup: Store cursor location in tGPspoint as an arrayAaron Carlisle
Fixes many instances of `-Wstringop-overread` warning on GCC 11 Differential Revision: https://developer.blender.org/D13672
2021-12-27Cleanup: clang tidyJacques Lucke
Use c++ headers; use nullptr; redundant `void` in parameter list; inconsistent parameter name.
2021-12-27Render: move editor/render module to c++Jacques Lucke
Doing this in preparation for some work on asset preview generation. Differential Revision: https://developer.blender.org/D13676
2021-12-27Fix T93941: geometry proximity breaks with high resolution meshJacques Lucke
The calls to `.fill` were overwriting indices that are processed by other threads.
2021-12-27OpenSubDiv: add support for an OpenGL evaluatorKévin Dietrich
This evaluator is used in order to evaluate subdivision at render time, allowing for faster renders of meshes with a subdivision surface modifier placed at the last position in the modifier list. When evaluating the subsurf modifier, we detect whether we can delegate evaluation to the draw code. If so, the subdivision is first evaluated on the GPU using our own custom evaluator (only the coarse data needs to be initially sent to the GPU), then, buffers for the final `MeshBufferCache` are filled on the GPU using a set of compute shaders. However, some buffers are still filled on the CPU side, if doing so on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose logic is hardly GPU compatible). This is done at the mesh buffer extraction level so that the result can be readily used in the various OpenGL engines, without having to write custom geometry or tesselation shaders. We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in order to control the data layout, and interpolation. For example, we store vertex colors as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float types. In order to still access the modified geometry on the CPU side, for use in modifiers or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`. Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will create such a wrapper if possible. If the final subdivision surface is not needed on the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used. Enabling or disabling GPU subdivision can be done through the user preferences (under Viewport -> Subdivision). See patch description for benchmarks. Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport Differential Revision: https://developer.blender.org/D12406
2021-12-27Nodes: Support linking to existing group input from link drag search.Jacques Lucke
Before one could only create a new group input using the link drag search. With this patch it becomes possible to create a Group Input node for an existing input. Differential Revision: https://developer.blender.org/D13674
2021-12-27BLI: add utility to check if type is any specific typeJacques Lucke
This adds `blender::is_same_any_v` which is the almost the same as `std::is_same_v`. The difference is that it allows for checking multiple types at the same time. Differential Revision: https://developer.blender.org/D13673
2021-12-27Allocator: add missing includeJacques Lucke
The placement-new operator requires `#include <new>`. It is used in `MEM_new`.
2021-12-27LineArt: Protecting bounding area links.YimingWu
In case they overflowed the bounding area maximum link count, Protect the link array so it doesn't crash.
2021-12-27LineArt: Remove duplicated edge-boundbox linking.YimingWu
The edge is linked twice from differen calls during line art calculation Probably caused by a merge and both calls stayed for some reason. This would lead to edge link overflowing its limit of 2^16 items.
2021-12-26Cleanup: Use array for BKE cursor functionsAaron Carlisle
Missed this function in rB67525b88d2e
2021-12-26Cleanup: Fix compile warningAaron Carlisle
Own mistake in rB67525b88d2e
2021-12-26Fix T94387: Mesh sequence cache, crash when clicking a panelKévin Dietrich
The crash happens when opening a panel (added in rB43f5e761a66e87fed664a199cda867639f8daf3e) when no CacheFile is set in the modifier. To fix this, check that the CacheFile pointer is not null before attempting to draw anything.
2021-12-26Docs: Add to and cleanup attribute API docsHans Goudey
Most of the comment block is similar to the text in the source code documentation wiki. It's helpful to have some text in a header file too, so it's closer for programmers already looking at the code. This also uses more consistent syntax and wording in the comments about the attribute API in `GeometryComponent`. Ref T93753 Differential Revision: https://developer.blender.org/D13661
2021-12-25Cleanup: Use more common variable nameHans Goudey
It's preferred to use `area` as a name for `ScrArea` variables.
2021-12-25Cleanup: Move customdata.c to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13666
2021-12-25Breakdown ImplementationChristoph Lendenfeld
This patch adds the breakdown (or tween) functionality to the graph editor. The factor defines the linear interpolation from left key to right key. Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9375 Ref: D9375
2021-12-25Shader Nodes: Convert bump node to use new socket builderAaron Carlisle
This node is a bit special in that it uses two internal sockets for a hack for Eevee; see rBffd5e1e6acd296a187e7af016f9d7f8a9f209f87 As a result, the `SOCK_UNAVAIL` flag is exposed to socket builder API. Reviewed By: JacquesLucke, fclem Differential Revision: https://developer.blender.org/D13496
2021-12-25Cleanup: use new c++ guarded allocator API in nodesAaron Carlisle
Also simplify the allocation name to `__func__` Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13665
2021-12-25Blend To Neighbor ImplementationChristoph Lendenfeld
This patch adds the blend to neighbor operator to the Graph editor. The operator acts like the blend to neighbor operator for a pose context, just working on keyframes. Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9374 Ref: D9374
2021-12-25Fix T94375: Python error when trying to add Grease Pencil brush presetAntonio Vazquez
The prop name was wrong.
2021-12-25Fix T94362: GPUMaterialTexture references freed ImageUserJacques Lucke
The issue was caused by rB7e712b2d6a0d257d272ed35622b41d06274af8df and the fact that `GPUMaterialTexture` contains an `ImageUser *` which references the `ImageUser` on e.g. `NodeTexImage`. Since the node tree update refactor, it is possible that the node tree changes without changing the actual material. Therefore, either the renderer should check if the node tree has changed or it should not store pointers to data in node storage. The latter approach is implemented in this patch. Differential Revision: https://developer.blender.org/D13663
2021-12-25Cleanup: Do not use magic numberAaron Carlisle
2021-12-25Cleanup: Use array for BKE cursor functionsAaron Carlisle
Differential Revision: https://developer.blender.org/D12962
2021-12-25Update RNA to user manual mapping fileAaron Carlisle
2021-12-25Cleanup: Define node tree icon in register functionAaron Carlisle
I suppose this was done to reduce then dependencies. However, most nodes already depend on UI code so this isnt too useful.
2021-12-25Cleanup: use new c++ guarded allocator APIAaron Carlisle
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
2021-12-25Cleanup: Use consistent order for custom data mesh masksHans Goudey
Loops come last in the struct's definition, use the same order when initializing the common masks in customdata.c (they were switched with the poly masks).
2021-12-24Nodes: Migrate bump shader node to cppAaron Carlisle
Needed for D13496
2021-12-24Cleanup: Remove misleading commentsHans Goudey
Most of these custom data layers weren't BMesh only, and the one that actually looks to be BMesh only has `BM` in its name.
2021-12-24Cleanup: Use vector instead of linked listHans Goudey
2021-12-24Fix T94322: add missing updates after recent refactorJacques Lucke
This was a regression in rB7e712b2d6a0d257d272ed35622b41d06274af8df.
2021-12-24Fix T94162: incorrect handling when there are multiple group outputsJacques Lucke
Typically a node group should only have a single Group Output node. However, currently Blender already supports having multiple group outputs, one of which is active. This wasn't handled correctly by geometry nodes. Differential Revision: https://developer.blender.org/D13611
2021-12-24Cleanup: remove unused button functionSybren A. Stüvel
rB05f900e3466b45a19e13bea6dd641e4f7b8b46e9 removed unused button functions, but since that commit the `uiDefIconTextButBit()` static function sits unused as well. It's now been removed.
2021-12-24Fix T94357: Node Ungroup operator copies current node treeHans Goudey
This was a mistake in rBfdc4a1a590d8befb1ff which copied the parent node tree into itself rather than accessing the node group's nodes.
2021-12-24Fix T94344: Incorrect size for edge vertices node outputHans Goudey
This looks like a copy and paste error from the original commit. The virtual array output used the number of mesh polygons instead of the number of edges.
2021-12-23Cleanup: Remove outdated commentHans Goudey
After rB01df48a983944ab3f8a, this comment no longer applies.
2021-12-23Cleanup: Move hair object type files to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13657
2021-12-23Cleanup: Remove unused UI button definition functionsHans Goudey
These were part of the older buttons API that shouldn't be used in more places at this point. Most layouts should be built with the regular layout system API and RNA properties. This sort of button can still be created though, since these were just shortcuts anyway.
2021-12-23Cache File: use panels to organize UIKévin Dietrich
This adds interface panels to organize the Cache File UI parameters for modifiers and constraints into related components: velocity, time, and render procedural. Properties relating to the three aforementioned components are separated from `uiTemplateCacheFile` into their own functions (e.g. `uiTemplateCacheFileVelocity` for the velocity one), which are in turn called from the specific panel creation routines of the modifiers and constraints (for constraints, the functions are exposed to the RNA). `uiTemplateCacheFile` now only shows the properties for the file path, and in the case of constraints, the scale property. The properties that are only defined per modifier (like the velocity scale), are shown in the proper modifier layout panel if applicable. Reviewed By: sybren Differential Revision: https://developer.blender.org/D13652
2021-12-23Graph Slider Ops: Show error when no valid keys are foundChristoph Lendenfeld
When using graph slider operators like D9374 it showed a warning when no keys were selected. However since that stops the modal operation it should be an Error. Also the message was misleading since it could error for different reasons than stated. Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D13655 Ref: D13655
2021-12-23Avoid exception when no weight paint settings existSybren A. Stüvel
Just an extra check for `None` before accessing its properties.
2021-12-23Cleanup: remove BKE_animdata_driver_path_hackSybren A. Stüvel
The `BKE_animdata_driver_path_hack()` function has had almost no effect since rB51b796ff1528, and basically boils down to: ``` return base_path ? base_path : RNA_path_from_ID_to_property(ptr, prop); ``` Since `base_path` was `NULL` in the majority of cases, it's just been replaced by a direct call to `RNA_path_from_ID_to_property()`. The conditional now just appears in one remaining case. This relates to T91387. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D13646
2021-12-23LibOverride: protect better against using on complex inter-dependency cases.Bastien Montagne
Do not allow 3DView operator to run on the liboverride of an instantiating Empty object. And tweak behavior in the Outliner operations too. Related to T94226. Note that this remains fairly exotic, bad idea not recommended cases, such complex inter-dependencies between different libraries inside a same liboverride hierarchy is just not possible to handle properly.
2021-12-23Fix missing type declaration compile errorKévin Dietrich
rBbd3bd776c893 broke compilation here due to missing type declaration for basic types as the source file is not including this header. In any case, it is the responsibility of header files to include headers for types used by value in function parameters or struct definitions.
2021-12-23Cleanup: typo in commentKévin Dietrich
2021-12-23Fix: Curve trim node test failureHans Goudey
Caused by 60c59d7d611dfd726. The position wasn't copied into the correct place on each spline. Somehow I didn't catch that in the tests I ran.
2021-12-23Fix T94232: No selection with set material node empty material listHans Goudey
If the input mesh had no materials already, the new material would become the only material on the mesh, meaning the material was added to all of the faces, instead of just the selected faces. The mesh primitive nodes in geometry nodes already add an empty slot by default, so this only affects outside geometry. The fix is just adding an empty slot before the new slot, so the non-selected material indices can still point to an empty slot. Differential Revision: https://developer.blender.org/D13654
2021-12-23Cleanup: Remove spline add_point method, refactor mesh to curve nodeHans Goudey
It's better to calculate the size of a spline before creating it, and this should simplify refactoring to a data structure that stores all point attribute contiguously (see T94193). The mesh to curve conversion is simplified slightly now, it creates the curve output after gathering all of the result vertex indices. This should be more efficient too, since it only grows an index vector for each spline, not a whole spline.
2021-12-23Nodes: Add link drag search support for map range nodeHans Goudey
Previously only the float version of the node was connected to. This adds connection operations for vector sockets, and exposes the "Steps" socket properly when it's selected.