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
path: root/source
AgeCommit message (Collapse)Author
2022-04-19improve hover tip for 'Lock Object Modes' propertyGaia Clary
2022-04-19Fix wrong logic in comparison code of RNA collection proerties.Bastien Montagne
Noted as part of T94775 investigation by Wayde Moss (@GuiltyGhost), thanks! NOTE: this mistake probably did not have any pratical impact in current code, at least for overrides.
2022-04-19DRW: Volume: Fix warning about unused variableClément Foucault
2022-04-19Fix: Uninitialized paint brush when using byte textures.Jeroen Bakker
This is a fix for the 3d texturing brush.
2022-04-19EEVEE: Fix compilation caused by missing fileClément Foucault
2022-04-19GPU: Replace `GPUMaterialVolumeGrid` by `GPUMaterialAttribute`Clément Foucault
This is to make the codegen and shading nodes object type agnostic. This is essential for flexibility of the engine to use the nodetree as it see fits. The essential volume attributes struct properties are moved to the `GPUMaterialAttribute` which see its final input name set on creation. The binding process is centralized into `draw_volume.cc` to avoid duplicating the code between multiple engines. It mimics the hair attributes process. Volume object grid transforms and other per object uniforms are packed into one UBO per object. The grid transform is now based on object which simplify the matrix preparations. This also gets rid of the double transforms and use object info orco factors for volume objects. Tagging @brecht because he did the initial implementation of Volume Grids.
2022-04-19Material: Add name to default shadersClément Foucault
Improve debugging experience.
2022-04-19Workbench: Volume: Fix errors about unboud textureClément Foucault
2022-04-19DRW: Centralize smoke domain texture managementClément Foucault
This code was duplicated in multiple engines. Now it is the draw manager responsability to manage the throwaway fluid textures.
2022-04-19Refactor: Move mesh face dot tag out of MVertHans Goudey
Continuing the refactors described in T93602, this commit moves the face dot tag set by the subdivision surface modifier out of `MVert` to `MeshRuntime`. This clarifies its status as runtime data and allows further refactoring of mesh positions in the future. Before, `BKE_modifiers_uses_subsurf_facedots` was used to check whether subsurf face dots should be drawn, but now we can just check if the tags exist on the mesh. Modifiers that create new new geometry or modify topology will already remove the array by clearing mesh runtime data. Differential Revision: https://developer.blender.org/D14680
2022-04-19Cleanup: Use correct capitalization of "F-Curve"Aaron Carlisle
2022-04-19UI: Fix typo in UI description for bpy.types.ActionFCurves.remove functionColin Basnett
The UI description for the `bpy.types.ActionFCurves.remove` was incorrect; seemingly a copy-paste typo from the `rna_Action_groups_remove` function. Reviewed By: sybren, Blendify Differential Revision: https://developer.blender.org/D14659
2022-04-19Fix call of 'BLI_assert' instead 'BLI_assert_msg'Germano Cavalcante
Error in 5da02548e99ac67338cbdf2a5088261408f5e7bf
2022-04-19Cleanup: remove redundant 'DEG_get_original_object' callGermano Cavalcante
The `BMEditMesh` pointer is the same in the original or evaluated mesh. Also a clang-format was missed.
2022-04-19Transform: small optimization in snap to edit meshGermano Cavalcante
In some cases, selected elements do not contribute to snapping. So ignore these elements when creating the edit meshes bound box.
2022-04-19Fix assert on meshes without mloop in snap codeGermano Cavalcante
Meshes without loops are still valid for snapping.
2022-04-18Fix T97002: Preserve multi socket link orderLeon Schittek
Preserve multi socket link order when copying nodes or adding a new group input sockets by linking directly to multi inputs from the group input node's extension socket. This is done by also copying the `multi_input_socket_index` when the new links are created by copying existing or temporary links. Reviewed By: Hans Goudey Differential Revision: http://developer.blender.org/D14535
2022-04-18Cleanup: Remove incorrect commentHans Goudey
2022-04-18Cleanup: Move object_modifier.c to C++Hans Goudey
This allows using C++ only APIs/data structures, and potentially simplifies adding support to apply modifiers for the Curves object.
2022-04-18Cleanup: Clang tidyHans Goudey
- Inconsistent parameter names - Else after return - Braces around statements - Qualified auto - Also (not clang tidy): Pass StringRef by value, unused parameter
2022-04-18Fix T94559: Copying geometry node group does not copy animation dataAngus Stanton
Reimplement copy geometry node groups in C. The version implemented in Python could also manually copy the animation data, but it's more standard to do this with `BKE_id_copy_ex` and `LIB_ID_COPY_ACTIONS`. Differential Revision: https://developer.blender.org/D14615
2022-04-18Nodes: Remove unnecessary RNA pointer creationHans Goudey
`rna_NodeSocket_refine` and `rna_Node_refine` take significant time when building the `NodeTreeRef` acceleration data structure, but they aren't used at all. This commit removes their eager calculation and instead creates them on-demand in the `rna()` functions. They also aren't inlined to avoid including `RNA_prototypes.h` in the header. Differential Revision: https://developer.blender.org/D14674
2022-04-18Minor tweaks to labels/tooltips of override operation in the Outliner.Bastien Montagne
2022-04-18Add debugging info for Wintab activated by argument `--debug-wintab`.Nicholas Rishel
Bonus: Added docs for `--debug-ghost`. Differential Revision: https://developer.blender.org/D14610
2022-04-17OBJ: further optimize, cleanup and harden the new C++ importerAras Pranckevicius
Continued improvements to the new C++ based OBJ importer. Performance: about 2x faster. - Rungholt.obj (several meshes, 263MB file): Windows 12.7s -> 5.9s, Mac 7.7s -> 3.1s. - Blender 3.0 splash (24k meshes, 2.4GB file): Windows 97.3s -> 53.6s, Mac 137.3s -> 80.0s. - "Windows" is VS2022, AMD Ryzen 5950X (32 threads), "Mac" is Xcode/clang 13, M1Max (10 threads). - Slightly reduced memory usage during import as well. The performance gains are a combination of several things: - Replacing `std::stof` / `std::stoi` with C++17 `from_chars`. - Stop reading input file char-by-char using `std::getline`, and instead read in 64kb chunks, and parse from there (taking care of possibly handling lines split mid-way due to chunk boundaries). - Removing abstractions for splitting a line by some char, - Avoid tiny memory allocations: instead of storing a vector of polygon corners in each face, store all the corners in one big array, and per-face only store indices "where do corners start, and how many". Likewise, don't store full string names of material/group names for each face; only store indices into overall material/group names arrays. - Stop always doing mesh validation, which is slow. Do it just like the Alembic importer does: only do validation if found some invalid faces during import, or if requested by the user via an import setting checkbox (which defaults to off). - Stop doing "collection sync" for each object being added; instead do the collection sync right after creating all the objects. Cleanup / Robustness: This reworking of parser (see "removing abstractions" point above) means that all the functions that were in `parser_string_utils` file are gone, and replaced with different set of functions. However they are not OBJ specific, so as pointed out during review of the previous differential, they are now in `source/blender/io/common` library. Added gtest coverage for said functions as well; something that was only indirectly covered by obj tests previously. Rework of some bits of parsing made the parser actually better able to deal with invalid syntax. E.g. previously, if a face corner were a `/123` string, it would have incorrectly treated that as a vertex index (since it would get "hey that's one number" after splitting a string by a slash), instead of properly marking it as invalid syntax. Added gtest coverage for .mtl parsing; something that was not covered by any tests at all previously. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14586
2022-04-17Fix T97095: export of Poly curves, export crash when object contains ↵Aras Pranckevicius
multiple curve types - Was not exporting "Poly" curves at all, - Had a crash when a single object contains multiple curves of different types -- it had a check for "is this nurbs compatible?" only for the first curve, and then proceeded to treat the other curves as nurbs as well, without checking for validity. Fixed both issues by doing the same logic as in the old python exporter: - Poly curves are supported, - Treat object as "nurbs compatible" only if all the curves within it are nurbs compatible. Added test coverage in the gtest suite. While at it, made "all_curves" test use the "golden obj file template" style test, instead of a manually coded test that checks intermediate objects but does not check the final exported result. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14611
2022-04-17Fix T96824: New 3.1 OBJ exporter writes incorrect polygon/vertex groups in ↵Aras Pranckevicius
some cases The new 3.1 OBJ exporter code had incorrect code to determine which vertex group a polygon belongs to -- for each vertex, it was only looking at the first vertex group it has, and not using the group weight either. This 99% fixes T96824, but not 100% on the user's submitted mesh -- exactly two faces from that mesh get assigned a different group compared to the old exporter. Either choice is "correct" given that on these two faces there are two vertex groups with equal contribution. The old Python exporter was picking the group based on internal python group name map order, whereas the new C++ exporter is picking the group with the lowest index, in case of ties. I'm not sure if it's possible to fix this TBH, will have to wait until the importer is also C++. While at it, the new vertex group calculation code was doing a lot of redundant work for each and every face (traversing group lists several times, allocating & freeing memory), so I fixed that. Exporting a 6-level subdivided Monkey mesh with 30 vertex groups was taking 810ms, now takes 330ms. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14500
2022-04-17Cleanup: Use C++ Array typeHans Goudey
2022-04-17USD/Ctest: Add basic USD-Imaging test.Michael Kowalski
This adds a basic unit test to check USD has been correctly build with imaging components to support building both with the old and new libs, it automatically adds the test when it detects a library with imaging enabled. (platform devs will have to pay attention it runs the test to validate the libs build correctly) For future use in the code it also defines a USD_HAS_IMAGING define one could check if we're building against an USD lib that has it (just because we build/ship with it, doesn't mean downstream builds will ship with it, so we'll have to be a little pro-active there) Reviewed By: sybren Differential Revision:https://developer.blender.org/D14456
2022-04-17Fix T97366: Misdetection of numbers as UDIMs in certain filepathsJesse Yurkovich
In some circumstances singular files with numbers in their name (like turntable-1080p.png or frame-1042.png) might be detected as a UDIM. The root cause in this particular instance was because `BKE_image_get_tile_info` believed this file to be a tiled texture and replaced the filename with a tokenized version of it. However, later on, the code inside `image_open_single` did not believe it was tiled because only 1 file was detected and our tiled textures require at least 2. This discrepancy lead to the broken filename situation. This was a regression since rB180b66ae8a1f as that introduced the tokenization changes. Differential Revision: https://developer.blender.org/D14667
2022-04-16Mask by color now auto-creates aJoseph Eagar
color attribute if one does not exist, and no longer passes through to the translate tool on tweak grab.
2022-04-16Fix T96988: Merge by distance node crash with certain inputHans Goudey
If the `wpoly` vector was small, the `wpoly_new` pointer could point to part of its inline buffer on the stack, which becomes invalid out of that scope. Instead, store `wpoly_new` as a span, and assign it properly from the moved vector.
2022-04-16Cleanup: Return earlyHans Goudey
2022-04-15UI: Improve wording for some USD export descriptionsHans Goudey
The HIG mentions that redundant words like "Enables" or "Activates" shouldn't be used for tooltips of boolean properties. In this case "When checked" was the redundant language that was implied by the checkbox itself-- convention is to just state what the property does when it's on. Also change a few conjugations to the imperative and simplify wording slightly, in order to be more consistent with language elsewhere in Blender, and to be a bit more direct. Differential Revision: https://developer.blender.org/D14644
2022-04-15Fix: Missing Null CheckWayde Moss
Introduced by my recent commit: {rB3acbe2d1e933} Lead to crash when insert_keyframe_direct() was called. Keyframing crashed for NLA special properties (influence, animated_time), driven properties, etc.
2022-04-15Fix T97363: Duplicate elements node doesn't tag loose edgesHans Goudey
2022-04-15Cleanup: fix warning for differing parameter namesWayde Moss
2022-04-15Cleanup: Clang tidyHans Goudey
2022-04-15Curves: Port curve to mesh node to the new data-blockHans Goudey
This commit changes the Curve to Mesh node to work with `Curves` instead of `CurveEval`. The change ends up basically completely rewriting the node, since the different attribute storage means that the decisions made previously don't make much sense anymore. The main loops are now "for each attribute: for each curve combination" rather than the other way around, with the goal of taking advantage of the locality of curve attributes. This improvement is quite noticeable with many small curves; I measured a 4-5x improvement (around 4-5s to <1s) when converting millions of curves to tens of millions of faces. I didn't obverse any change in performance compared to 3.1 with fewer curves though. The changes also solve an algorithmic flaw where any interpolated attributes would be evaluated for every curve combination instead of just once per curve. This can be a large improvement when there are many profile curves. The code relies heavily on a function `foreach_curve_combination` which calculates some basic information about each combination and calls a templated function. I made assumptions about unnecessary reads being removed by compiler optimizations. For further performance improvements in the future that might be an area to investigate. Another might be using a "for a group of curves: for each attribute: for each curve" pattern to increase the locality of memory access. Differential Revision: https://developer.blender.org/D14642
2022-04-15GPU: Make viewport not acquireable during renderingClément Foucault
This is a partial fix to the fact that rendering with EEVEE or other GL render engines is currently blocking the whole UI when asking to redraw a viewport. This patch just bypasses the viewport bind (containing the Draw Context lock) and the following drawing. There is an update tagging to not loose a viewport update if there was one asked. Other queries other than view redraw (such as selection depth drawing or offscreen drawing) will still block the whole UI as they need immediate data feedback. Ping @Severin for the change in `WM_draw_region_viewport_bind()`. I'm assuming this is not an issue because it's highly unlikely to bring up this operator during rendering. But in this case, it would just lock as usual. The bypassing in `DRW_notify_view_update` might be a bit overparanoid.
2022-04-15Fix: Apply tilt in curves data-block normals calculationHans Goudey
The ported normal calculation from ceed37fc5cbb466a0 neglected to use the tilt attribute to rotate the normals around the tangents. This commit adds that behavior back, adding a new math header file to avoid duplicating the rotation function for normalized axes. Differential Revision: https://developer.blender.org/D14655
2022-04-15PBVH Pixel extractor.Jeroen Bakker
This patch contains an initial pixel extractor for PBVH and an initial paint brush implementation. PBVH is an accelleration structure blender uses internally to speed up 3d painting operations. At this moment it is extensively used by sculpt, vertex painting and weight painting. For the 3d texturing brush we will be using the PBVH for texture painting. Currently PBVH is organized to work on geometry (vertices, polygons and triangles). For texture painting this should be extended it to use pixels. {F12995467} Screen recording has been done on a Mac Mini with a 6 core 3.3 GHZ Intel processor. # Scope This patch only contains an extending uv seams to fix uv seams. This is not actually we want, but was easy to add to make the brush usable. Pixels are places in the PBVH_Leaf nodes. We want to introduce a special node for pixels, but that will be done in a separate patch to keep the code review small. This reduces the painting performance when using low and medium poly assets. In workbench textures aren't forced to be shown. For now use Material/Rendered view. # Rasterization process The rasterization process will generate the pixel information for a leaf node. In the future those leaf nodes will be split up into multiple leaf nodes to increase the performance when there isn't enough geometry. For this patch this was left out of scope. In order to do so every polygon should be uniquely assigned to a leaf node. For each leaf node for each polygon If polygon not assigned assign polygon to node. Polygons are to complicated to be used directly we have to split the polygons into triangles. For each leaf node for each polygon extract triangles from polygon. The list of triangles can be stored inside the leaf node. The list of polygons aren't needed anymore. Each triangle has: poly_index. vert_indices delta barycentric coordinate between x steps. Each triangle is rasterized in rows. Sequential pixels (in uv space) are stored in a single structure. image position barycentric coordinate of the first pixel number of pixels triangle index inside the leaf node. During the performed experiments we used a fairly simple rasterization process by finding the UV bounds of an triangle and calculate the barycentric coordinates per pixel inside the bounds. Even for complex models and huge images this process is normally finished within 0.5 second. It could be that we want to change this algorithm to reduce hickups when nodes are initialized during a stroke. Reviewed By: brecht Maniphest Tasks: T96710 Differential Revision: https://developer.blender.org/D14504
2022-04-15EEVEE: Support disabling all lightprobe object contribution in viewportClément Foucault
This is supported throught the visibility toggle. The light cache will then only be used for world lighting. This is the behavior as light objects.
2022-04-15Curves: initial geometry nodes support for curves objectsJacques Lucke
* Curves objects now support the geometry nodes modifier. * It's possible to use the curves object with the Object Info node. * The spreadsheet shows the curve data. The main thing holding this back currently is that the drawing code for the curves object is very incomplete. E.g. it resamples the curves always in the end, which is not expected for curves in general. Differential Revision: https://developer.blender.org/D14277
2022-04-15Object: Set Parent (Keep Transform Without Inverse)Wayde Moss
**Relevant to Artists:** This patch adds an option to the Parenting menu, `Object (Keep Transform Without Inverse)`, and Apply menu, `Parent Inverse`. The operators preserve the child's world transform without using the parent inverse matrix. Effectively, we set the child's origin to the parent. When the child has an identity local transform, then the child is world-space aligned with its parent (scale excluded). **Technical:** In both cases, the hidden parent inverse matrix is generally set to identity (cleared or "not used") as long as the parent has no shear. If the parent has shear, then this matrix will not be entirely cleared. It will contain shear to counter the parent's shear. This is required, otherwise the object's local matrix cannot be properly decomposed into location, rotation and scale, and thus cannot preserve the world transform. If the child's world transform has shear, then its world transform is not preserved. This is currently not supported for consistency in the handling of shear during the other parenting ops: Parent (Keep Transform), Clear [Parent] and Keep Transform. If it should work, then another patch should add the support for all of them. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14581
2022-04-14Fix T96875: Envelope modifier strokes cannot be eselected with TweakAntonio Vazquez
The new created strokes were not setting the right `orig` pointers, so the select operator could not select the strokes and points. Now, the original pointers are set in the new strokes. To set the values is necessary assign the original pointer from the reference stroke because in modifiers the stroke is evaluated, so we need back two levels: Eval->Eval->Orig
2022-04-14Fix crash when loading Blender due to recent changeGermano Cavalcante
Issue introduced in {rB80859a6cb272} Only seen on Windows. The `keyword_parse` lambda function code did not consider `\r` as a whitespace char, resulting in a wrong parse. (More investigation needs to be done).
2022-04-14Fix: Use after free when removing attribute on instancesHans Goudey
Assume that only one layer matches the id and return instead of continuing to iterate over attributes after the layers have been potentially reallocated.
2022-04-14GPU: Make nodetree GLSL Codegen render engine agnosticClément Foucault
This commit removes all EEVEE specific code from the `gpu_shader_material*.glsl` files. It defines a clear interface to evaluate the closure nodes leaving more flexibility to the render engine. Some of the long standing workaround are fixed: - bump mapping support is no longer duplicating a lot of node and is instead compiled into a function call. - bump rewiring to Normal socket is no longer needed as we now use a global `g_data.N` for that. Closure sampling with upstread weight eval is now supported if the engine needs it. This also makes all the material GLSL sources use `GPUSource` for better debugging experience. The `GPUFunction` parsing now happens in `GPUSource` creation. The whole `GPUCodegen` now uses the `ShaderCreateInfo` and is object type agnostic. Is has also been rewritten in C++. This patch changes a view behavior for EEVEE: - Mix shader node factor imput is now clamped. - Tangent Vector displacement behavior is now matching cycles. - The chosen BSDF used for SSR might change. - Hair shading may have very small changes on very large hairs when using hair polygon stripes. - ShaderToRGB node will remove any SSR and SSS form a shader. - SSS radius input now is no longer a scaling factor but defines an average radius. The SSS kernel "shape" (radii) are still defined by the socket default values. Appart from the listed changes no other regressions are expected.
2022-04-14Cleanup: Alembic, use a structure to pass parametersKévin Dietrich
This adds a structure, `ABCReadParams`, to store some parameters passed to `ABC_read_mesh` so we avoid passing too many parameters, and makes it easier to add more parameters in the future without worrying about argument order. Differential Revision: https://developer.blender.org/D14484