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-09-28Geometry Nodes: multi-threading when modifying multiple geometry setsJacques Lucke
Differential Revision: https://developer.blender.org/D12652
2021-09-28UI: avoid excessive padding for labels in headersCampbell Barton
Labels in headers reserved space for an icon even when no icon was used. This is caused by the shared function ui_text_icon_width adding 1.5x a buttons X-units width the the width of the string. Menu buttons detected this and subtracted the extra padding. Instead of adding the same workaround for labels, add ui_text_icon_width_ex that takes a padding argument. Add presets for 'default', 'compact' and 'none' to avoid duplicating padding values. This allows removal of hard-coded label scaling for the add-object tool.
2021-09-28Asset Browser: Allow World assets to be drag/dropped onto the viewportJesse Yurkovich
While World data has always been able to be marked as an asset, there was no way to actually use them from the asset browser. This change allows users to drag-drop world assets onto the Viewport and have them appended/linked to their scene. Differential Revision: https://developer.blender.org/D12566
2021-09-27Cleanup: Fix incorrect commentsHans Goudey
2021-09-27Geometry Nodes: Do not realize instances in the material assign nodeHans Goudey
Only run the node once for every unique geometry set in the input's instance heirarchy. This can massively improve performance when there are many instances, but it will mean that the result is the same for every instance. For the previous behavior, a "Realize Instances" node can be used before this one. This node can be changed without versioning since the old material assign node was already deprecated and replaced.
2021-09-27Geometry Nodes: Move output attribute names to a subpanelHans Goudey
In a sub-panel it will be clearer that they are outputs, since they just look like more inputs now. Unfortunately it is not possible to make sub-panels display conditionally currently, so the output sub-panel will always be visible whether or not it is empty. Differential Revision: https://developer.blender.org/D12653
2021-09-27Fix part of T91516: Cycles not rendering geometry nodes instancesBrecht Van Lommel
Part of the fix is by Jacques. This fixes the most obvious case, but it's still not clear how to deal with non-mesh geometry instances or how to handle motion blur for such instances.
2021-09-27Cleanup: fix (harmless) uninitialized variable usageBrecht Van Lommel
2021-09-27Constraints: change default Stretch To rotation type to Swing.Alexander Gavrilov
As also explained in D6134, in most case of Stretch To usage in rigs, it is desirable to use swing rotation, either via the old method of pairing the constraint with Damped Track, or via the Swing rotation type introduced in 2.82. This is for instance true for all usages of the constraint in Rigify. The reason can be understood by realizing that unlike order- dependent euler rotations, swing is not biased to an axis, and isn't affected by gimbal lock effects at merely 90 degrees of rotation (it has only one singularity at 180 degrees). Thus it makes sense to change the default for newly created constraints to the Swing mode. This has no backward compatibility concerns except for old tutorials and rig generation scripts. Differential Revision: https://developer.blender.org/D12643
2021-09-27Update RNA to user manual url mappingsAaron Carlisle
2021-09-27File/Asset Browser: Don't deselect other items when draggingJulian Eisel
Basically this enables the select-tweaking behavior as per the guidelines: https://wiki.blender.org/wiki/Human_Interface_Guidelines/Selection#Select-tweaking. We use this in most other other editors that allow selecting and dragging multiple items. But besides the consistency improvement, this is important if we want to support dragging multiple assets (or files) in future. We want to support this at least for dragging multiple assets into an asset catalog for the upcoming asset catalog UI.
2021-09-27Cleanup: incorrect null check in asset libraryJacques Lucke
Found by clang tidy (P2439).
2021-09-27Fix: Incorrect node socket name after recent refactorHans Goudey
Caused by rBc99cb814520480379
2021-09-27Geometry Nodes: Distribute points once per instance referenceHans Goudey
With this commit, the distribute points on faces node runs only once for every unique mesh in its input. That means if there are 100 instances of the same mesh, it will only run once. This basically reverts rB84a4f2ae68d408301. The optimization there didn't end up being worth it in the end, since it complicates code quite a lot. It's also incompatible with this method of dealing with instances, and it breaks field evaluation for instances, where we would have to make sure to handle each instance transform properly otherwise, evaluating the field separately for every instance. Differential Revision: https://developer.blender.org/D12630
2021-09-27Cleanup: Asset catalogs, fix clang-tidy warningSybren A. Stüvel
Change `auto &catalog` to `const auto &catalog`. No functional changes.
2021-09-27Asset Catalogs: write catalogs to disk when saving the blend fileSybren A. Stüvel
The Asset Catalog Definition File is now saved whenever the blend file is saved. The location of the CDF depends on where the blend file is saved, and whether previously a CDF was already loaded, according to the following rules. The first matching rule wins: 1. Already loaded a CDF from disk? -> Always write to that file. 2. The directory containing the blend file has a `blender_assets.cats.txt` file? -> Merge with & write to that file. 3. The directory containing the blend file is part of an asset library, as per the user's preferences? -> Merge with & write to `${ASSET_LIBRARY_ROOT}/blender_assets.cats.txt` 4. Create a new file `blender_assets.cats.txt` next to the blend file.
2021-09-27BKE Preferences: find asset library containing a pathSybren A. Stüvel
Add `BKE_preferences_asset_library_containing_path(&U, some_path)` that finds the asset library that contains the given path. This is a simple linear search, returning the first asset library that matches. There is no smartness when it comes to nested asset libraries (like returning the library with the best-matching path), although this could be a useful feature to add later.
2021-09-27BLI Path: add function `BLI_path_contains()`Sybren A. Stüvel
Add function `BLI_path_contains(container, containee)` that returns true if and only `container` contains `containee`. Paths are normalised and converted to native path separators before comparing. Relative paths are *not* made absolute, to simplify the function call; if this is necessary the caller has to do this conversion first.
2021-09-27Fix T91691: Selecting "Remove unused slots" in Materials panel removes slots ↵Bastien Montagne
that are assigned to particle systems/hair. `BKE_object_material_slot_used` would only check obdata usages, but particle settings can also (weirdly enough) use objects' material slots. So now, as its name suggests, `BKE_object_material_slot_used` does take an object as parameter, and also checks for potential slot usage from psys in the object.
2021-09-27Assets: Additions/fixes to the catalog system in preparation for the UIJulian Eisel
* Fixes missing update of the catalog tree when adding catalogs. * Adds iterators for the catalogs, needed for UI code. * Store catalog ID in the catalog tree items, needed for UI code. * Other smaller API additions for the UI. * Improve comments and smaller cleanups. New functions are covered with unit tests. Differential Revision: https://developer.blender.org/D12618 Reviewed by: Sybren Stüvel
2021-09-27Fix T91728: Cycles render artifacts with motion blur and object attributesBrecht Van Lommel
2021-09-27Geometry Nodes: add utility to process all instances separatelyJacques Lucke
This adds a new `GeometrySet::modify_geometry_sets` method that can be used to update each sub-geometry-set separately without making any instances real. Differential Revision: https://developer.blender.org/D12650
2021-09-27Cycles: Rework OptiX visibility flags handlingPatrick Mours
Before the visibility test against the visibility flags was performed in an any-hit program in OptiX (called `__anyhit__kernel_optix_visibility_test`), which was using the `__prim_visibility` array. This is not entirely correct however, since `__prim_visibility` is filled with the merged visibility flags of all objects that reference that primitive, so if one object uses different visibility flags than another object, but they both are instances of the same geometry, they would appear the same way. The reason that the any-hit program was used rather than the OptiX instance visibility mask is that the latter is currently limited to 8 bits only, which is not sufficient to contain all Cycles visibility flags (12 bits). To mostly fix the problem with multiple instances and different visibility flags, I changed things to use the OptiX instance visibility mask for a subset of the Cycles visibility flags (`PATH_RAY_CAMERA` to `PATH_RAY_VOLUME_SCATTER`, which fit into 8 bits) and only fall back to the visibility test any-hit program if that isn't enough (e.g. the ray visibility mask exceeds 8 bits or when using the built-in curves from OptiX, since the any-hit program is then also used to skip the curve endcaps). This may also improve performance in some cases, since by default OptiX can now perform the normal scene intersection trace calls entirely on RT cores without having to jump back to the SM on every hit to execute the any-hit program. Fixes T89801 Differential Revision: https://developer.blender.org/D12604
2021-09-27Fix two issues with recent new Append code.Bastien Montagne
* ID pointer returned by `wm_file_link_append_datablock_ex` was improperly extracted from `WMLinkAppendDataItem` before append step. * Code deleting linked IDs when their local matching version was re-used did not properly clear `LIB_TAG_DOIT` beforehand.
2021-09-27Nodes: Change wire color to increase contrastDalai Felinto
If the theme used by the user did not touch the wire or the wire outline colors this will update them as well. This was supposed to be a part of a bigger UI theme change for 3.0. But it was expedited because of the recent change in line thickness for the noodles (2bd02052157). Theme change by Pablo Vazquez. Differential Revision: https://developer.blender.org/D12649
2021-09-27Geometry Nodes: support creating new attributes in modifierJacques Lucke
This patch allows passing a field to the modifier as output. In the modifier, the user can choose an attribute name. The attribute will be filled with values computed by the field. This only works for realized mesh/curve/point data. As mentioned in T91376, the output domain is selected in the node group itself. We might want to add this functionality to the modifier later as well, but not now. Differential Revision: https://developer.blender.org/D12644
2021-09-27Fix T90570: Constraint validity not updated with library overrides.Bastien Montagne
For some reason was assuming setting a property in RNA would call its update callback if any, but this actually needs to be done separately. So add this call to `rna_property_override_operation_apply`.
2021-09-27RNA: Make is clear that `Scene` parameter of `update` callback may be NULL.Bastien Montagne
There are cases where there is no way to ensure we do have/know about an active scene. Further more, this should not be required to perform 'real' updates on data, only to perform additional special handling in current scene (mostly related to editing tools, UI, etc.). This pointer is actually almost never used in practice, and half of its current usages are fairly close to abuse of the system (like calls to `ED_gpencil_tag_scene_gpencil` or `BKE_rigidbody_cache_reset`). This commit ensures that the few places using this 'active scene' pointer are safely handling the `NULL` case, and clearly document the fact that a NULL scene pointer is valid.
2021-09-27RNA: Fix bad usages of `scene` pointer in Update callbacks.Bastien Montagne
Scene passed to the update callback is the active scene it //may// not be that actual ID owner of the affected data (although in practice it should always be currently).
2021-09-27Cycles: print name of kernels on errors in CUDA queue, for debuggingBrecht Van Lommel
2021-09-27Geometry Nodes: make field links thinner than other linksJacques Lucke
This makes it easier to spot which links contain fields and which contain data. Actually, the patch makes all other links a bit thicker. However, with soon-to-be-implemented theme changes, the perceived thickness will be the same as before. This is part of T91563. Differential Revision: https://developer.blender.org/D12646
2021-09-27Increase VSE strip channels limit from 32 to 128Dalai Felinto
The original limit dates back from 2002 when Blender went open source. After that many years some productions (e.g., Sprite Fright) are already experiencing limitations for complex edits. The future plans is to support an initial shorter (2?) number of channels with support to "unlimited" channels. Finally, I'm bumping the minimum file requirement since files with more than 32 channels won't work well in old Blender versions. In a future commit I will implement a sanitization so that we only read (and write) 128 channels. Making sure future changes of this number won't corrupt Blender. Differential Revision: https://developer.blender.org/D12645
2021-09-27VSE: Clamp resulting frame in multiply modePeter Fog
The clamp added will ensure immediate speed direction change on changing to/from positive/negative speed factor when using the Speed effect strip's Multiply mode. Reviewed By: ISS, sergey Differential Revision: https://developer.blender.org/D12462
2021-09-27Fix T91714: Cycles direct/indirect clamp distinction not working correctlyBrecht Van Lommel
2021-09-27Fix viewport roll working wrongPhilipp Oeser
Mistake in own {rB69893ef27c91}. Was mixing screen on region coordinates.
2021-09-27Cleanup: spelling in commentsCampbell Barton
2021-09-27Cleanup: remove unnecessary use of MEM_SAFE_FREE macroCampbell Barton
2021-09-27Fix T81922: Pose bones F-Curves hidden for unselected objectsCampbell Barton
Whilst in pose-mode, the selection filter only includes other objects in pose-mode instead of the object selection. This makes sense as the selection of the pose bones what the user as acting on in the 3D view. The object selection only makes sense to use in object mode. Reviewed By: sybren Maniphest Tasks: T81922 Ref D12494
2021-09-27Keymap: resolve conflict with use_alt_cursor/Ctrl-LMB to add/extrudeCampbell Barton
While the option allows tools be be activated on press instead of tweak, this meant box-select was catching Ctrl-LMB which is also used for add/extrude in edit mode. Resolve this by always using tweak for selection tools, only supporting activation on press for other tools. Note that this doesn't impact the default configuration.
2021-09-27Cleanup: make formatDalai Felinto
2021-09-27Cleanup: Move asset library remove function next to add functionJulian Eisel
Better to keep such related operations close together in code.
2021-09-27Cleanup: Remove function declaration without definitionJulian Eisel
There is no function definition for this declaration. Instead there is `BKE_preferences_asset_library_remove()`.
2021-09-273DView: ability to cancel out of viewport rollPhilipp Oeser
This adds the ability to cancel out of the roll using ESC or RMB (which is not common for viewops -- but makes sense in the case of roll I think). This resets the view as well as potential locked cameras to the original orientations (but does not remove potential autokeys -- which no transform does on cancel btw.) Maniphest Tasks: T89883 Differential Revision: https://developer.blender.org/D12582
2021-09-273DView: Use "real" angle for viewport rollPhilipp Oeser
Since its introduction in {rB5c569d227b64}, the view roll was based on horizontal movement only. Using a "real" angle not only feels more natural but also has the benefit of getting more precission the further away from the center you are (just like regular rotation, brush/stencil rotation etc.). A similar thing has already been implemented in the Grease Pencil Tools Addon, now make the blender standard roll the same. Since this is not using the transform system, we are still lacking a line in the viewport (this could be added but since this is always based on the center of the view we dont necessarily need this), as well as the additional Shift-extra-precission behavior. Fixes T89883 Maniphest Tasks: T89883 Differential Revision: https://developer.blender.org/D12582
2021-09-27Fix T91711: Blender 3.0 - The Rain demo scene breaks (Proxy to Override auto ↵Bastien Montagne
conversion). Proxy conversion is a fairly particular case of liboverride creation, in which remapping all local usages of linked data probably makes more sense, rather than only doing so whitin the overridden 'group' of IDs.
2021-09-27Kernel: allow unregistering BKE callback functionsSybren A. Stüvel
Introduce `BKE_callback_remove()`, which undoes the effect of `BKE_callback_add()`. It also respects `funcstore->alloc` by freeing the removed `funcstore` when needed. This allows for shorter-lived objects in memory to unregister their callbacks at the end of their lifespan. `BKE_callback_global_finalize()` has been adjusted so that the responsibility "remove a callback" is given to one function only. Reviewed by: campbellbarton Differential Revision: https://developer.blender.org/D12625
2021-09-27Geometry Nodes: new Instance on Points nodeJacques Lucke
This adds a new Instance on Points node that is a replacement for the old Point Instance node. Contrary to the old node, it does not have a mode to instance objects or collections directly. Instead, the node has to be used with an Object/ Collection Info to achieve the same effect. Rotation and scale of the instances can be adjusted in the node directly or can be controlled with a field to get some variation between instances. The node supports placing different instances on different points. The user has control over which instance is placed on which point using an Instance Index input. If that functionality is used, the Instance Geometry has to contain multiple instances that can are instanced separately. Differential Revision: https://developer.blender.org/D12478
2021-09-27Geometry Nodes: support outputting collection children as instancesJacques Lucke
This adds two new input sockets to the Collection Info node: * `Separate Children`: When turned off, the entire collection is output as a single collection instance (same behavior as before). When turned on, each child of the collection is output as a separate instance (children can be objects and collections). Toggling this input should not change the visual transforms of the output geometry. * `Reset Children`: Only used when `Separate Children` is on. When used, the transforms of the instances are reset to the origin. This is useful when one wants to e.g. instance the collection children separately in the upcoming instancing node. Part of D12478.
2021-09-27Fixes T91632 by stopping the sample correlation between dimensions which was ↵William Leeson
causing rendering artifacts on simple scenes. Fix T91632: Stops the sample correlation between dimensions which was causing rendering artefacts on simple scenes. This is done by increasing the amount of jitter the Cranley Patterson Rotation is allowed to add. Also, it uses the y dimension of the of the sample table for 1D sampling which causes further decorrelation between dimensions. As an additional measure the x and y dimensions are swapped randomly to provide further decorrelation. Maniphest Tasks: T91632 Differential Revision: https://developer.blender.org/D12610
2021-09-27Fix: wrong socket shape in Vector input nodeJacques Lucke