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-02-12Geometry Nodes: Make instances real on-demandHans Goudey
This commit makes the geometry output of the collection info usable. The output is the geometry of a collection instance, but this commit adds a utility to convert the instances to real geometry, used in the background whenever it is needed, like copy on write. The recursive nature of the "realize instances" code is essential, because collection instances in the `InstancesComponent`, might have no geometry sets of their own containing even more collection instances, which might then contain object instances, etc. Another consideration is that currently, every single instance contains a reference to its data. This is inefficient since most of the time there are many locations and only a few sets of unique data. So this commit adds a `GeometryInstanceGroup` to support this future optimization. The API for instances returns a vector of `GeometryInstanceGroup`. This may be less efficient when there are many instances, but it makes more complicated operations like point distribution that need to iterate over input geometry multiple times much simpler. Any code that needs to change data, like most of the attribute nodes, can simply call `geometry_set_realize_instances(geometry_set)`, which will move any geometry in the `InstancesComponent` to new "real" geometry components. Many nodes can support read-only access to instances in order to avoid making them real, this will be addressed where needed in the near future. Instances from the existing "dupli" system are not supported yet. Differential Revision: https://developer.blender.org/D10327
2021-02-12Merge branch 'blender-v2.92-release'Jacques Lucke
2021-02-12Fix T84899: instance ids are not unique in common casesJacques Lucke
Ids stored in the `id` attribute cannot be assumed to be unique. While they might be unique in some cases, this is not something that can be guaranteed in general. For some use cases (e.g. generating "stable randomness" on points) uniqueness is not important. To support features like motion blur, unique ids are important though. This patch implements a simple algorithm that turns non-unique ids into unique ones. It might fail to do so under very unlikely circumstances, in which it returns non-unique ids instead of possibly going into an endless loop. Here are some requirements I set for the algorithm: * Ids that are unique already, must not be changed. * The same input should generate the same output. * Handle cases when all ids are different and when all ids are the same equally well (in expected linear time). * Small changes in the input id array should ideally only have a small impact on the output id array. The reported bug happened because cycles found multiple objects with the same id and thought that it was a single object that moved on every check. Differential Revision: https://developer.blender.org/D10402
2021-02-12Fix T85545: changing position attribute does not tag normals dirtyJacques Lucke
This makes it so that normals are tagged dirty whenever the position attribute is requested for writing. This seems like a good default. If the calling code is aware of normals, it could untag normals when they are not changed by the operation. Differential Revision: https://developer.blender.org/D10397
2021-02-11Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-11Fix T84114: Existence of vertex groups slows down mesh editingCampbell Barton
Having a vertex group in a mesh slowed down unrelated operations such as selection. De-duplicating custom-data arrays for layers that contain pointers can become slow without any benefit as the content never matches. Use full copies when storing custom-data for edit-mesh undo.
2021-02-11UI: Multi-input node socket spacing and interactionFabian Schempp
This commit makes links connected to multi-input sockets spread verticaly along the socket. Sockets grow if more links are connected and the node layout updates accordingly. Links are sorted by their incoming angle to avoid crossing links. Also, link picking is updated to work with spread links and bezier links. Currently the multi-input sockets are used in the join geometry node. The mutli-input sockets look like a vertical rounded rectangle. Currently they do not support the other custom socket shapes. Reviewed By Hans Goudey, with cleanup and additional edits Differential Revision: https://developer.blender.org/D10181
2021-02-10Cleanup/fix warnings.Bastien Montagne
Own dummy mistakes in rBf269fbd64a5a0cb7.
2021-02-10LibOverride: Refactor: Switch more code to using Main.relations.Bastien Montagne
This potentially could fix some missed cases in dependency tagging (when dealing with overrides hierarchies), since relying on tag in ID itself is not a good idea to check whether an ID has been propcessed or not (exterior code may have forced that tag on some IDs e.g., which would prevent them from ever being processed properly).
2021-02-10Merge branch 'blender-v2.92-release'Jacques Lucke
2021-02-10Fix T85492: fix check if object has visible instancesJacques Lucke
Without this, `OB_VISIBLE_INSTANCES` would be added to `visibility` incorrectly, leading to unexpected visibility changes down the line.
2021-02-10Fix Geometry Nodes: Broken built-in attribute exists checkHans Goudey
Fixes an issue in a node setup with the point separate node, where muting a node that does nothing breaks the operation, resulting in the point separate not copying the position attrbute to either result. The fix is straightfoward, it looks just like a typo. Differential Revision: https://developer.blender.org/D10379
2021-02-10Cleanup: spellingCampbell Barton
2021-02-09LibOverride: Refactor: Switch more code to using Main.relations.Bastien Montagne
This potentially could fix some missed cases in dependency tagging (when dealing with overrides hierarchies), since relying on tag in ID itself is not a good idea to check whether an ID has been propcessed or not (exterior code may have forced that tag on some IDs e.g., which would prevent them from ever being processed properly).
2021-02-09Fixed (unreported) memleak in recent BMain relations new code.Bastien Montagne
Forgot to free the GHash iterator.
2021-02-09Fix (unreported) assert in liboverride reset code.Bastien Montagne
Invalid override properties ( i.e. invalid RNA paths) are not strictly speaking errors, many things can lead to that situation. Just ignore and skip those cases.
2021-02-09LibOverride: Refactor a bit override hierarchy utils.Bastien Montagne
Use LibOverrideGroupTagData helper struct a bit more widely.
2021-02-09Geometry Nodes: Add Combine and Separate XYZ nodes for attributesWannes Malfait
These are similar to the regular "Combine XYZ" and "Separate XYZ" nodes, but they work on attributes. They will make it easier to switch between vector attributes and float attributes. Differential Revision: https://developer.blender.org/D10308
2021-02-09LibOverride: Verious minor cleanups and fixes to code tagging IDs in an ↵Bastien Montagne
override hierarchy.
2021-02-09LibOverride: cleanup: code consistency.Bastien Montagne
Properly fully extract `lib_override_hierarchy_dependencies_recursive_tag` from `lib_override_linked_group_tag`. Was supposed to be that way already (see comment of `lib_override_linked_group_tag`), for some reasons this case was missed.
2021-02-09GPencil: Fill tool refactor and Multiframe in Draw modeAntonio Vazquez
This commit is a refactor of the fill tool to solve several problems we had since the first version of the tool. Changes: * The filling speed has been improved for each step of the process with the optimization of each algorithm/function. * New `AutoFit` option to fill areas outside of the viewport. When enable, the total size of the frame is calculated to fit the filling area. * New support multiframe filling. Now it is possible to fill multiple similar frames in one go. * New `Stroke Extension` option to create temporary closing strokes. These strokes can be displayed and adjusted dynamically using wheel mouse or PageUp/Down keys. * Parameter `Resolution` now is named `Precision` and has been moved to topbar. * `Resolution` now has decimals and can be lower than 1 to allow quick filling in storyboarding workflows. Maximum value has been set as 5. * Parameter `Simplify` has been moved to Advanced panel. * Improved fill outline detection. In some cases, the outline penetrated the area to be filled with unexpected results. * Fixes some corner case bugs with infinite loops. As a result of this refactor, also these new functionalities has been added. * New support for multiframe in `Draw` mode. Any drawing in active frame is duplicated to all selected frame. * New multiframe display mode. Keyframes before or after of the active frame are displayed using onion colors. This can be disable using Onion overlay options.
2021-02-09Cleanup: comments, replace 'undoes' with 'undo-steps'Campbell Barton
2021-02-09Geometry Nodes: initial attribute interpolation between domainsJacques Lucke
This patch adds support for accessing corner attributes on the point domain. The immediate benefit of this is that now (interpolated) uv coordinates are available on points without having to use the Point Distribute node. This is also very useful for parts of T84297, because once we have vertex colors, those will also be available on points, even though they are stored per corner. Differential Revision: https://developer.blender.org/D10305
2021-02-09Geometry Nodes: refactor internal attribute access architectureJacques Lucke
Goals: * Clarify the distinction between builtin and other attributes at the code level. * Reduce number of places that need to be modified to add more builtin attributes. * Reduce number of virtual methods that need to be implemented by e.g. `MeshComponent`. To achieve these goals, this patch implements the concept of "attribute providers". An attribute provider knows how to give access to attributes on a geometry component. Each geometry component can have multiple attribute providers, whereby each provider manages an different set of attributes. The separation of builtin and other attributes is now done at the attribute provider level. There are two types of attribute providers. One for builtin attributes and one for all others. This refactor also helps with T84297. Differential Revision: https://developer.blender.org/D10341
2021-02-09Fix T81206: Do not limit gl texture size in image editorJeroen Bakker
This patch will show textures in the image editor with the maximum available resolution determined by the GPU Hardware/Driver. Currently the size is limited by the user preference texture size limit. An image user can set the `IMA_SHOW_MAX_RESOLUTION` flag to request gpu textures in the max supported resolution. When this flag isn't set the gpu texture is limited by the user preference setting. When the gl resolution limit is disabled the GPU texture is always created for the max supported resolution. Reviewed By: Clément Foucault Maniphest Tasks: T81206 Differential Revision: https://developer.blender.org/D9160
2021-02-09Cleanup: spellingCampbell Barton
2021-02-08Fix T81206: Do not limit gl texture size in image editorJeroen Bakker
This patch will show textures in the image editor with the maximum available resolution determined by the GPU Hardware/Driver. Currently the size is limited by the user preference texture size limit. An image user can set the `IMA_SHOW_MAX_RESOLUTION` flag to request gpu textures in the max supported resolution. When this flag isn't set the gpu texture is limited by the user preference setting. When the gl resolution limit is disabled the GPU texture is always created for the max supported resolution. Reviewed By: Clément Foucault Maniphest Tasks: T81206 Differential Revision: https://developer.blender.org/D9160
2021-02-08Cleanup: Alphabetize function orderHans Goudey
2021-02-06Code quality: Port recently added asset files to C++Julian Eisel
It seems generally preferred to have new files be created with C++. The only reason I didn't do that when I initially created the files is that I was unsure about some C-API aspect. Also includes some minor C++ related cleanup (nullptr instead of NULL, remove redundant `struct` keyword).
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-06Cleanup: malformed web addresses in commentsCampbell Barton
2021-02-06Fix: Disabled NLA Interferes with Action EvalWayde Moss
Introduced by my commit: rB09709a7e64ff This bug effectively enabled the NLA when it should be disabled, when all tracks muted or no strips exist. Specifically, the NLA Action Track settings would be used (extrapolation, blendmode, influence).
2021-02-06NLA: Refactor Transition, Use Snapshot Blend FuncWayde Moss
The function `nlastrip_evaluate_transition()` has been slightly modified to use `nlasnapshot_blend()` instead of it's own special blending function `nlaeval_snapshot_mix_and_free()`. No user functional changes Reviewed By: sybren, #animation_rigging Differential Revision: https://developer.blender.org/D10221
2021-02-05Fix T85380: NLA Evaluation Missing Null CheckWayde Moss
Introduced by commit: rB40b7929cc040
2021-02-05Depsgraph: Remove no-op evaluation functionSergey Sharybin
Make the SHADING_PARAMETERS operation on node tree a real no-op. The function used as a callback was only doing a debug print. The issue with this function was that an original ID was passed as an argument. This is a violation of design, and if anything it should be left up to the implementation to check whether depsgraph is active. There are no functional changes for users in the interface. The only difference is that the debug print will no longer happen.
2021-02-05Geometry Nodes: add Volume to Mesh nodeJacques Lucke
This node takes a volume and generates a mesh on it's "surface". The surface is defined by a threshold value. Currently, the node only works on volumes generated by the Points to Volume node. This limitation will be resolved soonish. Ref T84605. Differential Revision: https://developer.blender.org/D10243
2021-02-05Geometry Nodes: Add Attribute Proximity NodeVictor-Louis De Gusseme
This node calculates a distance from each point to the closest position on a target geometry, similar to the vertex weight proximity modifier. Mapping the output distance to a different range can be done with an attribute math node after this node. A drop-down changes whether to calculate distances from points, edges, or faces. In points mode, the node also calculates distances from point cloud points. Design task and use cases: T84842 Differential Revision: https://developer.blender.org/D10154
2021-02-05Cleanup: use 'r_' prefix for return arguments, order lastCampbell Barton
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-05Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.Bastien Montagne
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values everywhere. Note that this also introduce the `STEP_INVALID` value in that enum. Finally, kept the matching struct members in some lower-level readfile code as an `int` to avoid having to include `BKE_undo_system.h` in a lot of unrelated files.
2021-02-04LibOverride: Improve/Fix issues in override resync process.Bastien Montagne
When we have a local override, its linked reference may not be detected as needing to be overridden anymore. In that case, if there is no actual override defined by the user, assume that we can get rid of this local override as part of the resync process, and use the linked data directly instead.
2021-02-04Animation: Add PreviewImage to bAction structSybren A. Stüvel
Make it possible to attach a preview image to an Action. In the #asset_browser_pose_libraries project, poses will be stored as individual Action datablocks. Having a thumbnail for each pose is of course essential. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D10306
2021-02-04Geometry Nodes: new Is Viewport nodeJacques Lucke
This node outputs true when geometry nodes is currently evaluated for the viewport and false for final renders. Ref T85277. Differential Revision: https://developer.blender.org/D10302
2021-02-04Liboverride: clean-up/sanitize tagging of root overrides.Bastien Montagne
now do this in utils that also handle the hierarchy tagging, doing it in caller code is prone to errors. Issue reported by @sebbas, thanks.
2021-02-04Fix: window manager can reference scenes and workspacesJacques Lucke
This also fixes T83592 for me. Differential Revision: https://developer.blender.org/D10046
2021-02-04Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-04Fix T85318: Driver variable don't resolve collection indicesCampbell Barton
The driver variable `splines[0]` (on a curve) behaved as if the path was `splines`. Resolve pointers was well as properties as it's supported by the caller. Error in original commit that added property support 82b0a9e36900c8aeb374078bd4cb3a7d7f8295e6.
2021-02-04NLA: Fix nlasnapshot_blend() Misplaced Null CheckWayde Moss
From original commit: rB40b7929cc040
2021-02-04NLA: Extract nlasnapshot_blend()Wayde Moss
Refactor //nlastrip_evaluate_actionclip()// and //nlaeval_blend_value()// into //nlasnapshot_blend()//, //nlastrip_evaluate_actionclip()//, //nlasnapshot_from_action()//. **Motivations**: * {T83615} Requires reading all pose bone fcurves before being able to apply pre-blend transforms. The function //nlasnapshot_from_action()// achieves this. This effectively removed the need to specially handle Quaternion blend queuing so that code has been removed. * {D8296} Adds support for keyframe remapping through an upper stack of strips. Instead of introducing a variant of the form: //nlastrip_evaluate_actionclip_inverted_get_lower()//, //nlastrip_evaluate_actionclip()// will later be extended to take an `evaluation_mode` as input to avoid duplicating the recursion functions related to //nlastrip_evaluate()//. * //nlasnapshot_blend()// will eventually have variants of //nlasnapshot_blend_get_inverted_lower_snapshot()// and //nlasnapshot_blend_get_inverted_upper_snapshot()// which are all independent of NlaStrips and NlaTracks, further simplifying the blending implementation. Ideally, //nlastrip_evaluate()// would get renamed to //nlasnapshot_blend_strip()// but that'll be a later patch to avoid unnecessary patches slowing the review of more important patches. No User-side Functional changes Reviewed By: sybren, #animation_rigging Differential Revision: https://developer.blender.org/D10220
2021-02-03Merge branch 'blender-v2.92-release'Pablo Dobarro