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-09-30Cleanup: Move modifier.c to C++Hans Goudey
2022-09-29Sculpt: fix T101465, crash in cloth filter with new automasking modesJoseph Eagar
2022-09-29Nodes: fix missing update when input of muted node changesJacques Lucke
2022-09-29Nodes: fix missing updates with muted nodes and reroutesJacques Lucke
Muted nodes and reroutes can potentially affect the output when they are linked to an input socket and don't have any inputs on their own. The issues was that previously "logically linked sockets" where used which hide reroutes and muted nodes away. The solution is to work with the directly linked sockets instead and handle reroutes etc explicitly.
2022-09-29Sculpt: Normal-based automasking modesJoseph Eagar
Two new normal-based automasking modes. The first mode, "brush", compares vertex normals with the initial normal at the beginning of the brush stroke. The second, "view", compares vertex normals with the view normal. If "occlusion" is on then rays will be shot from each vertex to test if it is occluded by other geometry (note: this can be very slow).\ Only geometry inside the sculpt mesh is considered. Each mode has an associated angular limit and a falloff. Reviewed by: Julien Kaspar and Jeroen Bakker Differential Revision: https://developer.blender.org/D15297 Ref D15297
2022-09-29Cleanup: Remove more unused CustomData API functionsHans Goudey
Due to increased usage of typed arrays in C++ and name/offset based access for BMesh, these are unlikely to be used again, and haven't been used in many years.
2022-09-29Cleanup: Deduplicate logic in CustomData access functionsHans Goudey
Also remove comments that just restated what the next line was doing, often incorrectly.
2022-09-29Cleanup: Remove unused BMesh functionHans Goudey
2022-09-29Fix wrong version bump to 3.4.1, we are still on 3.4.0Brecht Van Lommel
The patch levels are reserved for bugfix releases.
2022-09-29Cleanup: spelling in commentsCampbell Barton
2022-09-29Cleanup: replace UNUSED() with commented argumentsCampbell Barton
This is the conventional way of dealing with unused arguments in C++. Also quiet enum conversion warnings.
2022-09-29Sculpt: New Cavity Automasking ModeJoseph Eagar
Add new cavity automasking mode based on local mesh curvature. Cavity masking is a great way to quickly add detail in crevices and the like. It's meant to be used with the Paint brush in color attribute mode. It does work with other brushes but the results can be unpredictable. {F13131497} The old "dirty mask" operator has been replace with a new "mask from cavity" operator that shares the same code with cavity automasking. Differences from the sculpt-dev implementation: * It uses the word "cavity." When I first implemented this I wasn't aware this feature existed in other software (and other paint modes in Blender), and for reasons that escape me today I initially decided to call it a concave or concavity mask. * The cavity factor works a bit differently. It's no longer non-linear and functions as a simple scale around 0.5f. * Supports custom curves. * Supports blurring. Reviewed By: Julian Kaspar, Jeroen Bakker and Campbell Barton Differential Revision: https://developer.blender.org/D15122 Ref D15122
2022-09-29Cleanup: remove duplicate declarationJoseph Eagar
Also got rid of ATTR_NO_OPT macro.
2022-09-29Sculpt: Rewrite PBVH drawJoseph Eagar
Rewrite PBVH draw to allocate attributes into individual VBOs. The old system tried to create a single VBO that could feed every open viewport. This required uploading every color and UV attribute to the viewport whether needed or not, often exceeding the VBO limit. This new system creates one VBO per attribute. Each attribute layout is given its own GPU batch which is cached inside the owning PBVH node. Notes: * This is a full C++ rewrite. The old code is still there; ripping it out can happen later. * PBVH nodes now have a collection of batches, PBVHBatches, that keeps track of all the batches inside the node. * Batches are built exclusively from a list of attributes. * Each attribute has its own VBO. * Overlays, workbench and EEVEE can all have different attribute layouts, each of which will get its own batch. Reviewed by: Clement Foucault Differential Revision: https://developer.blender.org/D15428 Ref D15428
2022-09-29Cleanup: Typo in forward declarationHans Goudey
2022-09-28Geometry Nodes: Curve and mesh topology access nodesHans Goudey
This patch contains an initial set of nodes to access basic mesh topology information, as explored in T100020. The nodes allow six direct topology mappings for meshes: - **Corner -> Face** The face a corner is in, the index in the face - **Vertex -> Edge** Choose an edge attached to the vertex - **Vertex -> Corner** Choose a corner attached to the vertex - **Corner -> Edge** The next and previous edge at each face corner - **Corner -> Vertex** The vertex associated with a corner - **Corner -> Corner** Offset a corner index within a face And two new topology mappings for curves: - **Curve -> Points** Choose a point within a curve - **Point -> Curve** The curve a point is in, the index in the curve The idea is that some of the 16 possible mesh mappings are more important, and that this is a useful set of nodes to start exploring this area. For mappings with an arbitrary number of connections, we must sort them and use an index to choose a single element, because geometry nodes does not support list fields. Note that the sort index has repeating behavior as it goes over the "Total" number of connections, and negative sort indices choose from the end. Currently which of the "start" elements is used is determined by the field context, so the "Field at Index" and "Interpolate Domain" nodes will be quite important. Also, currently the "Sort Index" inputs are clamped to the number of connections. One important feature that isn't implemented here is using the winding order for the output elements. This can be a separate mode for some of these nodes. It will be optional because of the performance impact. There are several todos for separate commits after this: - Rename "Control Point Neighbors" to be consistent with this naming - Version away the "Vertex Neighbors" node which is fully redundant now - Implement a special case for when no weights are used for performance - De-duplicating some of the sorting logic between the nodes - Improve performance and memory use of topology mappings - Look into caching some of the mappings on meshes Differential Revision: https://developer.blender.org/D16029
2022-09-28Mesh: Add C++ implementaiton of topology mappingsHans Goudey
Because they are friendlier to use in C++ code than the existing mesh mapping API, these mappings from one domain to another were often reimplemented in separate files. This commit moves some basic implementations to a `mesh_topology` namespace in the existing mesh mapping header file. These is plenty of room for performance improvement here, particularly by not using an array of Vectors, but that can come later. Split from D16029
2022-09-28Geometry Nodes: viewport previewJacques Lucke
This adds support for showing geometry passed to the Viewer in the 3d viewport (instead of just in the spreadsheet). The "viewer geometry" bypasses the group output. So it is not necessary to change the final output of the node group to be able to see the intermediate geometry. **Activation and deactivation of a viewer node** * A viewer node is activated by clicking on it. * Ctrl+shift+click on any node/socket connects it to the viewer and makes it active. * Ctrl+shift+click in empty space deactivates the active viewer. * When the active viewer is not visible anymore (e.g. another object is selected, or the current node group is exit), it is deactivated. * Clicking on the icon in the header of the Viewer node toggles whether its active or not. **Pinning** * The spreadsheet still allows pinning the active viewer as before. When pinned, the spreadsheet still references the viewer node even when it becomes inactive. * The viewport does not support pinning at the moment. It always shows the active viewer. **Attribute** * When a field is linked to the second input of the viewer node it is displayed as an overlay in the viewport. * When possible the correct domain for the attribute is determined automatically. This does not work in all cases. It falls back to the face corner domain on meshes and the point domain on curves. When necessary, the domain can be picked manually. * The spreadsheet now only shows the "Viewer" column for the domain that is selected in the Viewer node. * Instance attributes are visualized as a constant color per instance. **Viewport Options** * The attribute overlay opacity can be controlled with the "Viewer Node" setting in the overlays popover. * A viewport can be configured not to show intermediate viewer-geometry by disabling the "Viewer Node" option in the "View" menu. **Implementation Details** * The "spreadsheet context path" was generalized to a "viewer path" that is used in more places now. * The viewer node itself determines the attribute domain, evaluates the field and stores the result in a `.viewer` attribute. * A new "viewer attribute' overlay displays the data from the `.viewer` attribute. * The ground truth for the active viewer node is stored in the workspace now. Node editors, spreadsheets and viewports retrieve the active viewer from there unless they are pinned. * The depsgraph object iterator has a new "viewer path" setting. When set, the viewed geometry of the corresponding object is part of the iterator instead of the final evaluated geometry. * To support the instance attribute overlay `DupliObject` was extended to contain the information necessary for drawing the overlay. * The ctrl+shift+click operator has been refactored so that it can make existing links to viewers active again. * The auto-domain-detection in the Viewer node works by checking the "preferred domain" for every field input. If there is not exactly one preferred domain, the fallback is used. Known limitations: * Loose edges of meshes don't have the attribute overlay. This could be added separately if necessary. * Some attributes are hard to visualize as a color directly. For example, the values might have to be normalized or some should be drawn as arrays. For now, we encourage users to build node groups that generate appropriate viewer-geometry. We might include some of that functionality in future versions. Support for displaying attribute values as text in the viewport is planned as well. * There seems to be an issue with the attribute overlay for pointclouds on nvidia gpus, to be investigated. Differential Revision: https://developer.blender.org/D15954
2022-09-28Cleanup: decentralize .blend I/O for space typesKévin Dietrich
This adds callbacks to `SpaceType` to make each editor responsible to manage their own .blend I/O, and moves relevant code from `screen.c` to the editors files. Differential Revision: D11069
2022-09-28Cleanup: spelling in commentsCampbell Barton
Also add missing task ID.
2022-09-27Fix: Assert in legacy mesh conversionHans Goudey
When setting the old face set custom data type, do it in the "layers to write" vector instead of the mesh's poly custom data layers, which weren't "prepared" yet. Otherwise this could make the mesh's custom data typemap invalid.
2022-09-27Cleanup: Use signed integers for mesh vertex indicesHans Goudey
2022-09-27Gpencil: Time Offset modifier new Chain modeAleš Jelovčan
This patch adds 5th mode to Time offset modifier, which should allow to create time segments list. This will allow users to chain together multiple time ranges in 4 modes: - Forward - Backwards - Pingpong - Reverse Pingpong It also comes with additional Repeat parameter which specifies number of times particular segment should run. The mechanic of it is transforming initial parameters into array of frames which are mapped to existing cfra (current frame) value. Prototype : https://jsfiddle.net/ha2sjw8p/3/ This is also closely aligned to community request: https://blender.community/c/rightclickselect/Txhbbc/ This should allow creation of complex animations like dancing, which consists of repeating loops and transitions to the next. One important side effect of this is dramatically reduced file sizes, as user no longer needs to copy paste keyframes. Reviewed By: antoniov, mendio, pepeland Differential Revision: https://developer.blender.org/D15052
2022-09-27BLF: Editing Text with Combining CharactersHarley Acheson
Corrections for caret insertion & movement and deletion for text strings that include non-precomposed diacritical marks (Unicode combining characters). See D15659 for more details and examples. Differential Revision: https://developer.blender.org/D15659 Reviewed by Campbell Barton
2022-09-27Fix: GPencil animated layer transforms evaluate wrong when identityPhilipp Oeser
Due to (optimization) checks in in `BKE_gpencil_prepare_eval_data` & `BKE_gpencil_update_layer_transforms`, updates were skipped if animation reached exact identity transforms. Now check if the matrix has changed additionally to gain proper updates. Unsure if this is the cheapest way to check for the animated state of layer transforms tbh, but I see similar checks elsewhere. Fixes T101164. Maniphest Tasks: T101164 Differential Revision: https://developer.blender.org/D16018
2022-09-26Fix: Incorrect handling for crease layersHans Goudey
First, there can only be one crease layer, so remove the "default name", since apparently that's how CustomData tests for that (see `CustomData_layertype_is_singleton`). Second, always propagate crease data because it can be used in arbitrary situations by geometry nodes. That also has to be done for all generic attribute layers. Fixes T101340, T101373
2022-09-26Fix T101365: saving second view layer as (non-Multilayer) OpenEXR does not workBrecht Van Lommel
2022-09-26Geometry Nodes: Control Point Neighbors NodeJohnny Matthews
This node allows access to the indices of neighboring control points within a curve via an offset. This includes taking into consideration curves that are cyclic. Differential Revision: D13373
2022-09-26Fix: bump subversion to avoid corrupted filesJacques Lucke
Replacing the transfer node breaks forward compatibility, so a version bump is necessary to get a warning in older versions.
2022-09-26Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Use function style casts in C++ headers & source.
2022-09-26GPU: Disable SSBO support from commandline.Jeroen Bakker
In heavy scenes containing many hairs/curves and volumetrics using SSBO can overwrite the binding information of the volumetric resolve shader. This has been detected during project Heist and is only reproducable on NVIDIA platform. This patch adds an debug option to disable SSBOs from the command line to replace the --debug-gpu-force-workarounds that has been used as a workaround on the render farm. Reason is that force workarounds will also add other limitations as well (number of texture binds for example)
2022-09-26Cleanup: remove redundant parenthesisCampbell Barton
2022-09-26Cleanup: use 'u' prefixed integer types for brevity in C codeCampbell Barton
This also simplifies using function style casts when moving to C++.
2022-09-26Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
2022-09-25Cleanup: remove redundant parenthesis (especially with macros)Campbell Barton
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: replace static_casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-09-24Sculpt: Fix bug with allocating duplicate attribute layersJoseph Eagar
Sculpt attribute API was incorrectly allocating duplicate attribute layers.
2022-09-24Fix: Invalid CustomData type map created for legacy mesh conversionHans Goudey
Caused by 060a5341419412fd7996cf99.
2022-09-24Curves: Use early out when apapting domain of single valueHans Goudey
When adapting the domain of a single value virtual array, skip allocating an array for the result and just return another single value. Among other cases, this can help when everything is selected in sculpt mode, moving domain interpolation from 5% of perf samples to 0% when sculpting.
2022-09-24Cleanup: simplify accessing mesh looptrisJacques Lucke
2022-09-24BLF: Refactor of DPIHarley Acheson
Correction of U.dpi to hold actual monitor DPI. Simplify font sizing by omitting DPI as API argument, always using 72 internally. See D15961 for more details. Differential Revision: https://developer.blender.org/D15961 Reviewed by Campbell Barton
2022-09-24Cleanup: Remove unused data transfer functionHans Goudey
2022-09-24Sculpt: fix memory corruption in new attribute apiJoseph Eagar
2022-09-23Geometry Nodes: Split transfer attribute nodeHans Goudey
This patch replaces the existing transfer attribute node with three nodes, "Sample Nearest Surface", "Sample Index", and "Sample Nearest". This follows the design in T100010, allowing for new nodes like UV sampling in the future. There is versioning so the new nodes replace the old ones and are relinked as necessary. The "Sample Nearest Surface" node is meant for the more complex sampling algorithms that only work on meshes and interpolate values inside of faces. The new "Sample Index" just retrieves attributes from a geometry at specific indices. It doesn't have implicit behavior like the old transfer mode, which should make it more predictable. In order to not change the behavior from existing files, the node has a has a "Clamp", which is off by default for consistency with the "Field at Index" node. The "Sample Nearest" node returns the index of the nearest element on a geometry. It can be combined with the "Sample Index" node for the same functionality as the old transfer node. This node can support curves in the future. Backwards compatibility is handled by versioning, but old versions can not understand these nodes. The warning from 680fa8a523e0 should make this explicit in 3.3 and earlier. Differential Revision: https://developer.blender.org/D15909
2022-09-23Fix: Crash with empty vertex group in mask modifierHans Goudey
The C++ vertex group data accessor returned a span with null data that wasn't empty. Instead of adding a null check as well as the size check, just return an empty span when there is no vertex group data.
2022-09-23Fix: Assert calculating mesh triangulationHans Goudey
The condition from 0d7d8c73cf5c5c5f05c was reversed.