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-23Fix T91638: image editor Open Cached Render not loading some passesBrecht Van Lommel
Previously this was only loading built-in render passes. Now instead of trying to load the scene render passes, load whatever passes exist in the cache file.
2021-09-23Fix: Build issue with MSVCCharlie Jolly
header for std::function was not included reported/fixed by Charlie on chat
2021-09-23Paint: prevent RenderResults and Viewers where unappropriatePhilipp Oeser
Using a RenderResult (or a Viewer) was never really working (think you cant get a real ImBuff from these) -- cannot use it as a clone, stencil or canvas [Single Image paint texture slot]. In the case of using it as a 2D paint clone image this would also crash [due to the Image Editor drawing refactor in 2.91]. Now [in the spirit of T73182 / D11179], prevent using these where unappropriate by using rna pointer polling functions. Also add a security check for the 2D paint clone image crash in case a stencil ImBuff cannot be provided for some reason, but generally old files are now patched in do_versions_after_linking_300 (thx @brecht!). Fixes T91625. Maniphest Tasks: T91625 Differential Revision: https://developer.blender.org/D12609
2021-09-23Cleanup: Use const in previously committed functionJulian Eisel
2021-09-23UI: Tree-View API for easy creation of tree UIsJulian Eisel
This follows three main targets: * Make creation of new tree UIs easy. * Groundwork to generalize tree UIs (so e.g. Outliner, animation channels, asset catalogs and spreadsheet data-sets don't have to re-implement basic tree UI code) or even other data-view UIs. * Better separate data and UI state. E.g. with this, tree-item selection or the open/collapsed state can be stored on the UI level, rather than in data. (Asset Catalogs need this, storing UI state info in them is not an option.) In addition, the design should be well testable and could even be exposed to Python. Note that things will likely change in master still. E.g. the actually resulting UI isn't very nice visually yet. The design is documented here: https://wiki.blender.org/wiki/Source/Interface/Views Differential Revision: https://developer.blender.org/D12573
2021-09-23Fix D12533: Simplify curve object to mesh conversionHans Goudey
This patch simplifies the curve object to mesh conversion used by the object convert operator and exporters. The existing code had a convoluted model of ownership, and did quite a bit of unnecessary work. It also assumed that curve objects always evaluated to a mesh, which is not the case anymore. Now the code checks if the object it receives is evaluated. If so, it can simply return a copy of the evaluated mesh (or convert the evaluated curve wire edges to a mesh if there was no evaluated mesh). If the object isn't evaluated, it uses a temporary copy of the object with modifiers removed to create the mesh in the same way. This follows up on the recent changes to curve evaluation, namely that the result is always either a mesh or a wire curve. Differential Revision: https://developer.blender.org/D12533
2021-09-23Fix T91626: Cycles sss behind fully transparent object renders differentlyBrecht Van Lommel
2021-09-23Cycles: improve Auto Tile option descriptionBrecht Van Lommel
Ref T91645
2021-09-23bUUID: make it explicit the default constructor produces the nil valueSybren A. Stüvel
The implicit default constructor zeroes all plain data fields, and now this behaviour is explicit & tested for in a unit test.
2021-09-23Cleanup: UUID, fix clang-tidy warningsSybren A. Stüvel
Use explicit `uint32_t` instead of `uint`, add a missing end-of-namespace comment, and change `auto` to `const auto *`. No functional changes.
2021-09-23Geometry Nodes: remove old method to iterate over attributesJacques Lucke
The previous commit added a new method to the same in a better way.
2021-09-23Geometry Nodes: simplify looping over attributes in geometry setJacques Lucke
This adds three new methods: * `InstancesComponent::foreach_reference_as_geometry(...)` * `GeometrySet::attribute_foreach(...)` * `GeometrySet::gather_attributes_for_propagation(...)` The goal is that these iteration primitives can be used in places where we use more specialized iterators currently. Differential Revision: https://developer.blender.org/D12613
2021-09-23UUID: add `!=` operator for comparing UUIDsSybren A. Stüvel
Make it possible to unit test with `EXPECT_NE(uuid1, uuid2)`.
2021-09-23UUID: place C++ code in correct namespaceSybren A. Stüvel
Put the `bUUID` class in the `blender` namespace, instead of the `blender::bke` namespace. As a result, some C++ code now correctly uses the C++ class, where previously it would use the C struct and use implicit casting where necessary. As a result, support for initializer lists had to be explicitly coded and in another place an explicit `::bUUID` was necessary to avoid ambiguity.
2021-09-23Cleanup: bUUID, document the constructorsSybren A. Stüvel
No functional changes.
2021-09-23Cleanup: asset catalogs, correct assertion messageSybren A. Stüvel
There is no such thing as a "relative path" when it comes to asset catalog paths (they're always absolute). No functional changes.
2021-09-23Fix T91641: crash rendering with 16k environment map in CyclesBrecht Van Lommel
Protect against integer overflow.
2021-09-23Fix Cycles compiler warning on GCC 11Brecht Van Lommel
For shadow rays there are no closures, leave out the closure merging code there to avoid warnings about accessing closure memory that does not exist.
2021-09-23Cleanup: Remove hardcoded values and rename keyframe shape shadersDalai Felinto
No functional change. The shader is complicated by itself, having hardcoded values makes it even more cryptic. I also renamed the shader because the shader is not for the keyfarme diamond only, but for all the keyframe shapes. Differential Revision: https://developer.blender.org/D12615
2021-09-23Fix T91557: Texture Paint Stencil doesnt use assigned UV LayerPhilipp Oeser
Choosing a UV layer would actually affect the overlay in the viewport and also painting with the mask brush was in that UV space, but the resulting stencil mask was always applied with the active UV (not the explicitly selected stencil UV -- the one one is looking at in the viewport!) to painting. This has been like that as far as I have checked back (at least 2.79b), I am surprised this has not come up before, but it does not seem to make sense at all... Now use the UV specified for the stencil layer when applying the mask for painting, so it corresponds to the stencil mask one is looking at in the viewport. Maniphest Tasks: T91557 Differential Revision: https://developer.blender.org/D12583
2021-09-23Asset Catalogs: explicit version number in catalog definition filesSybren A. Stüvel
Declare the current format used for asset catalog definition files as version 1, and write that to the files. Files without that version number will be rejected. This makes it much easier to move to different versions later, with the opportunity to do versioning on file load. The version is not associated with any version of Blender, but a separate integer that's simply incremented when a non-backward-compatible change happens.
2021-09-23Fix unused variable warning in release buildsJulian Eisel
The variable is only used in debug builds.
2021-09-23Assets: add Asset Catalog systemSybren A. Stüvel
Catalogs work like directories on disk (without hard-/symlinks), in that an asset is only contained in one catalog. See T90066 for design considerations. #### Known Limitations Only a single catalog definition file (CDF), is supported, at `${ASSET_LIBRARY_ROOT}/blender_assets.cats.txt`. In the future this is to be expanded to support arbitrary CDFs (like one per blend file, one per subdirectory, etc.). The current implementation is based on the asset browser, which in practice means that the asset browser owns the `AssetCatalogService` instance for the selected asset library. In the future these instances will be accessible via a less UI-bound asset system. The UI is still very rudimentary, only showing the catalog ID for the currently selected asset. Most notably, the loaded catalogs are not shown yet. The UI is being implemented and will be merged soon. #### Catalog Identifiers Catalogs are internally identified by UUID. In older designs this was a human-readable name, which has the problem that it has to be kept in sync with its semantics (so when renaming a catalog from X to Y, the UUID can be kept the same). Since UUIDs don't communicate any human-readable information, the mapping from catalog UUID to its path (stored in the Catalog Definition File, CDF) is critical for understanding which asset is stored in which human-readable catalog. To make this less critical, and to allow manual data reconstruction after a CDF is lost/corrupted, each catalog also has a "simple name" that's stored along with the UUID. This is also stored on each asset, next to the catalog UUID. #### Writing to Disk Before saving asset catalogs to disk, the to-be-overwritten file gets inspected. Any new catalogs that are found thre are loaded to memory before writing the catalogs back to disk: - Changed catalog path: in-memory data wins - Catalogs deleted on disk: they are recreated based on in-memory data - Catalogs deleted in memory: deleted on disk as well - New catalogs on disk: are loaded and thus survive the overwriting #### Tree Design This implements the initial tree structure to load catalogs into. See T90608, and the basic design in T90066. Reviewed By: Severin Maniphest Tasks: T91552 Differential Revision: https://developer.blender.org/D12589
2021-09-23Asset Browser: Disable metadata editing for external asset librariesJulian Eisel
Buttons to edit asset metadata are now disabled for assets from an external library (i.e. assets not stored in the current .blend file). Their tooltips explain why they are disabled. Had to do some RNA trickery to disable the metadata properties at RNA level, not at UI script level. The basic idea is: * Local data-block assets set the data-block as owning ID for the asset metadata RNA pointer now. * That way we can use the owner ID to see where the metadata belongs to and decide if it's editable that way. * Additionaly, some Python operators needed better polling so they show as grayed out, and don't just fail. One important thing: Custom properties of the metadata can still be edited. The edits won't be saved however. Would be nice to disable that, but it's currently not supported on BPY/IDProperty/RNA level. Addresses T82943. Differential Revision: https://developer.blender.org/D12127
2021-09-23Fileops: call `BLI_path_slash_native()` in `BLI_dir_create_recursive()`Sybren A. Stüvel
Make the Windows version of `BLI_dir_create_recursive()` call `BLI_path_slash_native()` before it tries to handle the path. This should make it possible to call it with non-native path separators. This change was provided by our Windows platform maintainer @LazyDodo in P2414, so I assume he agrees with this change.
2021-09-23Keymap: RMB select option to place cursor on Alt-LMBCampbell Barton
This allows most tools to activate on press, removing a small but noticeable distance between the initial press and detection of a drag event. Gizmo tweak no longer actives when Alt is held, to avoid conflicting with cursor placement. This has the advantage that the gizmo doesn't get in the way when Alt is used for activating tools or placing the cursor.
2021-09-23WM: gestures now activate immediately on mouse pressCampbell Barton
Some gestures were activating immediately on tweak events, extend this to mouse-press and click-drag. Without this change, box-select for example wouldn't be automatically activated on mouse-press.
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-23Cleanup: assign variable for LMB selectCampbell Barton
2021-09-23LibLink: Modify WM API to link/append one ID to take flag parameter.Bastien Montagne
There is no reason to lock behavior into a specific configuration in those calls, make them properly configurable like the rest of the link/append code. This also enable users of those functions to activate 'ID reuse' behavior.
2021-09-23Geometry Nodes: add utility to print an attribute id.Jacques Lucke
2021-09-23Fix T91629: Crash in "Open Cached Render" functionSergey Sharybin
2021-09-23LibLink Append: Expose 'reuse ID' through new BLO flag, and add basic tests.Bastien Montagne
Option is now available to append operator, alsthough hidden and disabled by default.
2021-09-23LibLink Append: Fix 'reused ID' case keeping linked data around.Bastien Montagne
When we re-use a local ID, we need to delete the matching linked data.
2021-09-23Cleanup: proper handling of `LIB_TAG_DOIT` in append code.Bastien Montagne
2021-09-23Cleanup: eBLOLibLinkFlags: Add 'space' between `APPEND` flags and `INSTANCE` ↵Bastien Montagne
ones.
2021-09-23Cleanup: Silence unused var warning in release builds.Bastien Montagne
2021-09-23Add missing GPencil `IDTYPE_FLAGS_APPEND_IS_REUSABLE` flag.Bastien Montagne
Forgot that one in rB794c2828af60. Noted by Antonio Vazquez (@antoniov), thanks.
2021-09-23Append: Reuse local data: remove limitation on directly selected data.Bastien Montagne
in asset context, when user drag & drop a material several time, they would still expect to re-use existing one instead of getting new copies of it, even if this material is directly appended (and not an indirect dependency of an object e.g.).
2021-09-23Link/Append: Refactor flags.Bastien Montagne
Flags controlling link/append code are split between two enums, one in `DNA_space_types.h` and one in `BLO_readfile.h`. This commit: - Moves flags exclusively used in WM and BLO code to `eBLOLibLinkFlags` in `BLO_readfile.h`. Flags in `eFileSel_Params_Flag` from `DNA_space_types.h` are now only the ones effectively used by the file browser editor code too. - Fixes some internal utils in `readfile.c` still taking `short` flag parameter instead of proper `int` one. NOTE: there are a few other flags that could probably be moved to `eBLOLibLinkFlags` (at the very least `FILE_LINK`, probably also `FILE_AUTOSELECT` and `FILE_ACTIVE_COLLECTION`), since those are not effectively used by the file browser, and control linking/appending behavior, not filebrowser behavior. However for now think it's safer to not touch that.
2021-09-23Fix last Cycles tile highlighted while file from disk is being processedSergey Sharybin
2021-09-23Fix default surface resolution U/V mis-matchCampbell Barton
The resolution for surfaces was 12 for U, 4 for V, where both should have been set to 4. Regression in 9a076dd95a01135ea50f9ccc675668db9f2155f4
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-23Custom Properties: Rewrite edit operator, improve UXHans Goudey
This commit changes the custom property edit operator to make editing different properties types more obvious and expose more of the data, made more easily possible by the recent UI data refactor. Previously, the operator guessed the type you wanted based on what you wrote in a text box. That was problematic, you couldn't make a string property with a value of `1234`, and you had to know about the Python syntax for lists in order to create an array property. It was also slow and error prone; it was too easy to make a typo. Improvements compared to the old operator: - A type drop-down to choose between the property types. - Step and precision values are exposed. - Buttons that have the correct type based on the property. - String properties no longer display min, max, etc. buttons. - Generally works in more cases. The old operator tended to break. - Choose array length with a slider. - Easy to choose to use python evaluation when necessary. - Code is commented, split up, and much easier to understand. The custom property's value is purposefully not exposed, since the Edit operator is for changing the property's metadata now, rather than the value itself. Though in the "Python" mode the value is still available. More improvements are possible in the future, like exposing different subtypes, and improving the UI of the custom properties panel. Differential Revision: https://developer.blender.org/D12435
2021-09-23Applying patch D12600, GSOC Knife Tools branchCian Jinks
This adds constrained angle mode improvements, snapping to global and local orientation, visible distance and angle measurements, undo capability, x-ray mode, multi-object edit mode. See https://developer.blender.org/D12600 for more details. Note: this project moved some of the default keymappings around a bit, as discussed with users in the thread https://devtalk.blender.org/t/gsoc-2021-knife-tool-improvements-feedback/19047 We'll change the manual documentation in the next couple of days.
2021-09-23Fix: T91602 ffmpeg crashRay Molenkamp
Issue caused by our patch in rB1af722b81912 we replaced an array with a memory allocation but we forgot to update the assert which now used an invalid method to calculate the array size. SVN libs will have to be updated before T91602 will be fixed for end users.
2021-09-23Cleanup: Move more shader nodes to socket declaration APIHans Goudey
I had to add `no_muted_links` to the declaration API. The name could change there, but I think it's more obvious than "internal"
2021-09-23Fix: Incorrect socket names after previous commitHans Goudey
2021-09-22Cleanup: Use new node socket declaration API for some shader nodesHans Goudey
This converts socket declarations for most shader nodes that had already been converted to C++, but skips those that needed a special flag.
2021-09-22GPencil: Fix compiler warningsAntonio Vazquez