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-28Fix: Fluid/Cloth/DynamicPaint: Only share pointcaches in CoW case.Bastien Montagne
Particle copying code was already properly sharing pointcache between orig data and its copy only when `LIB_ID_COPY_SET_COPIED_ON_WRITE` is set, do the same for the other point cache users. Using `LIB_ID_CREATE_NO_MAIN` here is waaaaaaay to much wide scope for such a dangerous/advanced behavior, that kind of things has to be strictly restricted in scope.
2021-09-28Cleanup: asset catalog service, remove obsolete `write_to_disk` functionSybren A. Stüvel
Remove `AssetCatalogService::write_to_disk()` function. It has been superseded by `write_to_disk_on_blendfile_save()`; the handful of test functions that called the old function have been adjusted to use the new one. No functional changes to Blender itself.
2021-09-28Fix wrong update with shadow catcher and transparent filmSergey Sharybin
This change fixes an issue when scene has a shadow catcher and film is configured to be transparent. Starting viewport render and making the background non-transparent will cause bad memory access (wrong render and possibly crash). Film passes depends on transparency of background, so check for this. Demo file: F10650585 Differential Revision: https://developer.blender.org/D12666
2021-09-28Cycles: Disable tile-level denoisingSergey Sharybin
Only do denoising on the full-frame result. Saves render time. Can re-consider in the future when/if we'll want to support denoising during rendering (similar to viewport) to allow artists to stop rendering when they see image to be good enough. Until there is a design for that workflow stick to a more time efficient rendering. Differential Revision: https://developer.blender.org/D12662
2021-09-28Geometry Nodes: Dashed lines for function flowDalai Felinto
Use dashes to represent the function flow (while keeping continuous lines for the data-flow). It is important to tell both flows apart (the data and the function flow). The sockets help with that, the noodles help this further. The "data flow" is evaluated at every single node. A user can inspect the output sockets of those nodes and have a glimpse at their values. The "function flow" (nodes) however is only evaluated in the geometry nodes. The noodles are not transporting data in the same sense of the "data flow". All that can be inspected are the attributes the functions depend on. Having this clearly communicated should help users to inspect the nodetrees, read and understand the different flows in the same tree. --- Known limitations: At the moment the dash lines are not equidistant: * It would be nice to get the "uv.x" to be resampled for the bezier curve so the dashes are equally distributed in the curve. * Using distance between the P3 and P0 instead of the real bezier curve length seems to be fine. --- Full disclaimer: Changes with that much of a visual impact tend to be controversial. So far the main feedback is that dashed lines can be associated to broken link, and that there are better ways to represent the flows (or different information that should be visually represented). I'm fully aware of that. However dashed lines are already used in the viewport and outliner to indicate (hierarchical) relation. Besides, other approaches (double-lines, having the data flow to be more distinct, ...) didn't pan out in the end (or didn't look as good as this). --- Impact in other editors: The compositor uses mostly a "data flow" nodetree, so no change is expected there. The shader nodetree is one that could but doesn't have to change its visual language. The shader nodetree uses mostly "function flow" with some "data flow" nodes. One can argue that it should be adapted to follow the same pattern as geometry nodes (with the new noodles and the diamond sockets). Oh the other hand, a shader nodetree has a single context. When a node depends on the "UV", there is only one UV at a time for the entire nodetree. So it can also be treated as a psedo "data flow" nodetree if we want to avoid too many changes in other parts of Blender. Differential Revision: https://developer.blender.org/D12602
2021-09-28Cycles: Improve handling of tile file errorSergey Sharybin
Expose them to the interface, and stop rendering as soon as possible. Differential Revision: https://developer.blender.org/D12617
2021-09-28Asset Catalog Service: add function to change catalog pathSybren A. Stüvel
Add `AssetCatalogService::update_catalog_path()` to change the catalog path of the given catalog, and also change the path of all the catalogs contained within the given catalog. Rebuilds the tree structure for the UI, but does not save the new catalog definitions to disk. No user-facing changes, just backend preparation for UI work.
2021-09-28Geometry Nodes: remove empty mesh component in distribute node outputJacques Lucke
2021-09-28Fix T91766: NLA Editor - Segmentation fault on strip resizeGermano Cavalcante
NLA and Dope Sheet use a specific transform operation to scale. Unlike the conventional resize operation, `TIME_SCALE` operates on `td->val`. This is a bit outside the convention of transform operators. The expected thing in this case would be to work in `td->loc` and use the conventional resize operator. But for now, to fix the problem, use `td->loc` in the `TIME_SCALE` operation. This commit also brings a cleanup in the style of some comments and removing unnecessary `memset`.
2021-09-28Assets: Clear Asset operator variants for clearing/setting Fake UserSybren A. Stüvel
The Clear Asset operator (`ASSET_OT_clear`) now clears the Fake User. This makes it symmetrical with the Mark Asset (`ASSET_OT_mark`) operator, which sets Fake User to ensure assets are always saved to disk. Clear Asset now also has a `set_fake_user` boolean option, which allows users to Clear Asset and set Fake User in one go. The asset browser now shows these options in the context menu: - Clear Asset: also clears Fake User. This makes it possible to actually remove assets from the blend file without leaving the Asset Browser. - Clear Asset (Set Fake User): keeps the Fake User bit set. This makes it possible to "hide" the asset from the asset browser, without loosing the actual data. Internally, the `ED_asset_clear_id(id)` function now always clears the Fake User bit. If it was intended that this bit was kept set, it's up to the caller to explicitly call `id_fake_user_set(id)` afterwards. Manifest Task: T90844 Reviewed By: Severin Differential Revision: https://developer.blender.org/D12663
2021-09-28Cleanup: typo in commentPhilipp Oeser
Noticed by @david_black in D12392, thx!
2021-09-28Cleanup: remove unused variableVitor Boschi da Silva
As the title says Reviewed By: lichtwerk, campbellbarton Differential Revision: https://developer.blender.org/D12665
2021-09-28Cleanup: remove incorrect assertJacques Lucke
The method works perfectly fine when `resource` is empty.
2021-09-28Geometry Nodes: move legacy nodes to separate folderJacques Lucke
Previously, we were moving them one by one. It's a lot easier to just move all files at the same time.
2021-09-28Fix Drivers Editor showing playhead on the X AxisPhilipp Oeser
Currently the Drivers Editor shows this (the blue thing can be dragged to change frame): {F10647661} But the Drivers Editors X axis is the output of the driver [which can be further tweaked by the curve] not time(frame). So it seems better to not mix them here, it is just confusing to have two different units on one axis. Especially since what we really want to look at in X (the drivers output value) can be in a totally unrelated range compared to frames, so e.g. we might be interested in a drivers range from 0.0 to 1.0 and a framerange of 100 to 200, so putting this on one axis just does not make sense. Better to use a separate timeline for this. Note 2.79 also did not do this. Maniphest Tasks: T91157 Differential Revision: https://developer.blender.org/D12392
2021-09-28Fix Drivers Editor not hiding vertical part of cursorPhilipp Oeser
When "Show Cursor" is unchecked, the Drivers Editor would still display the vertical line representing the cursor x. Probably overseen in {rB65072499c65a} (historically the vertical line could represent either the current frame of the cursor X in drawing, but this is now much more separate). There is no point in seeing part of the cursor in the Drivers Editor if this is disabled. Also correct outdated comments. ref. T91157 Maniphest Tasks: T91157 Differential Revision: https://developer.blender.org/D12391
2021-09-28Path util: BLI_path_contains() case-insensitive on WindowsSybren A. Stüvel
Make `BLI_path_contains()` case-insensitive on Windows. This behaviour is dependent on the platform Blender is running on, like the rest of BLI_path, and not on the style of paths (Windows-style paths will be treated case-sensitively when Blender is running on Linux/macOS).
2021-09-28Fix T91679: Crash when saving bordered render as multilayer exrSergey Sharybin
The related issue which is fixed by this change is the missing noisy image pass when denoising and border render is used, Need to allocate passes after the passes has been copied from the original render result.
2021-09-28Cleanup: Move VSE channels check into own util functionDalai Felinto
Differential Revision: https://developer.blender.org/D12661
2021-09-28VSE: Implement sanity check for files with more channels than supportedDalai Felinto
This is a follow up to 8fecc2a8525467ee2fbbaae16ddbbc10b3050d46. This makes sure future .blend files that have more channels than the limit won't break Blender. It can be backported to LTS. This is part of https://developer.blender.org/D12645 Differential Revision: https://developer.blender.org/D12648
2021-09-28Fix: field inferencing fails when there are undefined nodesJacques Lucke
2021-09-28Cleanup: support moving InstanceReferenceJacques Lucke
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.