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-04-11Cleanup: malformed C-style comment blocks, spellingCampbell Barton
- Missing star prefix. - Unnecessary indentation. - Blank line after dot-points (otherwise doxygen merges with the previous dot-point). - Use back-slash for doxygen commands. - Correct spelling.
2022-04-01Assets: Enable collection assets (no longer experimental)Julian Eisel
With automatic collection previews (810e225c260d) and a toggle for collection instancing (previous commit) supported, there are no known blocking issues for collection assets. There are still further improvements to come as part of regular developemt (e.g. bounding box based snapping).
2022-03-25Cleanup: remove argument to doxygen \fileCampbell Barton
Doxygen doesn't require this to be set.
2022-03-25Cleanup: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
Activating a gizmo used the windows eventstate which may have values newer than the event used to activate the gizmo. This meant transforms check for the key that activated transform could be incorrect. Support passing an event when calling operators to avoid this problem.
2022-02-24Fix wrong asset library displayed/loaded in asset view templatesJulian Eisel
Sometimes when switching asset libraries in the asset view templates (like the pose library sidebar UI), the wrong library would end up being shown.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-07Fix asset-view template ignoring "Asset Indexing" debug optionJulian Eisel
If the "Asset Indexing" option was disabled in Preferences > Experimental > Debugging, the asset-view template (used by pose libraries for example) would still use the indexing.
2022-02-04Fix: Missing translations from operator descriptionsHans Goudey
The strings in the `get_description` functions for operators need translation, they are not found by the translation system automatically, and there is no translation applied afterwards either (as far as I could tell). Some used `N_` before, but most did nothing. Differential Revision: https://developer.blender.org/D14011
2022-01-26Assets: enable node group assetsJacques Lucke
This enables support for node group assets. Previously, node group assets only worked when the "extended asset browser" experimental features is enabled. Differential Revision: https://developer.blender.org/D13748
2022-01-24Cleanup: sort struct forward declarationsCampbell Barton
2022-01-18Assets: Enabling Asset Indexing.Jeroen Bakker
Asset indexing was disabled as ID property indexing wasn't supported. Now that ID property support is added we can enable asset indexing. Check {T91406} for more information about asset indexing.
2022-01-18AssetsBrowser: Add ID Properties to Asset IndexerJeroen Bakker
Object/collection asset workflow would need the bounding box for snapping. The bounding box is stored using ID properties in the scene. Currently ID properties aren't stored in the asset index, what would break object snapping. For this reason Asset Indexing is turned off in mater. This patch will introduce the indexing of ID properties what will allow the indexing to be turned on again. ## Data Mapping ## For data mapping we store the internal structure of IDProperty to the indexer (including meta-data) to be able to deserialize it back. ``` [ { "name": .., "value": .., "type": .., /* `subtype` and `length` are only available for IDP_ARRAYs. */ "subtype": .., }, ] ``` | **DNA** | **Serialize type** | **Note** | | IDProperty.name | StringValue| | | IDProperty.type | StringValue| "IDP_STRING", "IDP_INT", "IDP_FLOAT", "IDP_ARRAY", "IDP_GROUP", "IDP_DOUBLE"| | IDProperty.subtype | StringValue| "IDP_INT", "IDP_FLOAT", "IDP_GROUP", "IDP_DOUBLE" | | IDProperty.value | StringValue | When type is IDP_STRING | | IDProperty.value | IntValue | When type is IDP_INT | | IDProperty.value | DoubleValue | When type is IDP_FLOAT/IDP_DOUBLE | | IDProperty.value | ArrayValue | When type is IDP_GROUP. Recursively uses the same structure as described in this section. | | IDProperty.value | ArrayValue | When type is IDP_ARRAY. Each element holds a single element as described in this section. | NOTE: IDP_ID and IDP_IDARRAY aren't supported. The entry will not be added. Example ``` [ { "name": "MyIntValue, "type": "IDP_INT", "value": 6, }, { "name": "myComplexArray", "type": "IDP_ARRAY", "subtype": "IDP_GROUP", "value": [ [ { "name": .. .... } ] ] } ] ``` ## Considered alternatives ## - Add conversion functions inside `asset_indexer`; makes generic code part of a specific solution. - Add conversion functions inside `BLI_serialize`; would add data transformation responsibilities inside a unit that is currently only responsible for formatting. - Use direct mapping between IDP properties and Values; leads to missing information and edge cases (empty primitive arrays) that could not be de-serialized. Reviewed By: Severin, mont29, HooglyBoogly Maniphest Tasks: T92306 Differential Revision: https://developer.blender.org/D12990
2022-01-14Cleanup: spelling in comments, C++ style comments for disabled codeCampbell Barton
Also ensure space at end of comment.
2022-01-06CMake: add missing headersCampbell Barton
2022-01-04Cleanup: Code formatting.Jeroen Bakker
2022-01-03Cleanup: Renamed to_object_value to to_dictionary_value.Jeroen Bakker
2022-01-03Cleanup: Rename ObjectValue to DictionaryValue (Serialization).Jeroen Bakker
ObjectValue was to confusing as it is the term from JSON.
2021-12-18Cleanup: compiler warnings with clangBrecht Van Lommel
Includes use of memcpy to avoid warnings about deprecated members.
2021-12-17Allocator: simplify using guarded allocator in C++ codeJacques Lucke
Using the `MEM_*` API from C++ code was a bit annoying: * When converting C to C++ code, one often has to add a type cast on returned `void *`. That leads to having the same type name three times in the same line. This patch reduces the amount to two and removes the `sizeof(...)` from the line. * The existing alternative of using `OBJECT_GUARDED_NEW` looks a out of place compared to other allocation methods. Sometimes `MEM_CXX_CLASS_ALLOC_FUNCS` can be used when structs are defined in C++ code. It doesn't look great but it's definitely better. The downside is that it makes the name of the allocation less useful. That's because the same name is used for all allocations of a type, independend of where it is allocated. This patch introduces three new functions: `MEM_new`, `MEM_cnew` and `MEM_delete`. These cover the majority of use cases (array allocation is not covered). The `OBJECT_GUARDED_*` macros are removed because they are not needed anymore. Differential Revision: https://developer.blender.org/D13502
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-09Cleanup/Documentation: Add/move comments for asset filesJulian Eisel
Adds some basic high-level explanations for editor/UI level asset APIs. Also moves one such comment from the source file to the header file, so it's in the same file as other API comments.
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-12-06Disable asset indexing in the Asset ListSybren A. Stüvel
Asset indexing should be disabled, but this was overlooked in the asset list (used for the pose library in the 3D View).
2021-12-06Asset Indexer: use fixed-length string for ID codeSybren A. Stüvel
Use fixed-length string to convert `char[2]` to `std::string`. Otherwise `strlen()` is called, which is problematic as the `char[2]` is not zero-terminated.
2021-11-30Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-30Asset Bundle Copy button: only report each external dependency onceSybren A. Stüvel
The `ASSET_OT_bundle_install` operator only works when the blend file is self-contained. It reports any external dependencies. Before this patch: - every dependency was mentioned, even when it repeated the same filename over and over again, and - multiple dependencies were all mentioned in the error popup, potentially filling the screen. This is now resolved by: - only reporting each external file once, and - referring to the console when there are multiple external dependencies. Reviewed by: severin, dfelinto Differential Revision: https://developer.blender.org/D13413
2021-11-30Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
This includes adjustment of rBc12d8a72cef5 to the new path traversal code introduced in rBe5e8db73df86.
2021-11-30BPath traversing: allow skipping weak library referencesSybren A. Stüvel
Add flag to `BKE_bpath_traverse_id()` and friends to skip weak references (see below). This makes a distinction between "this blend file depends on that file" and "this blend file references that file, but doesn't directly use its data". This distinction is for the Asset Bundle install operator, which refuses to copy the blend file when it's not self-contained. Weak references are those that are not directly used by the blend file, but are still present to allow path rewriting. For example, when an Asset is loaded its originating blend file is saved in `ID::library_weak_reference`; this reference is purely for deduplication purposes, and not for actually loading any data. Reviewed by: mont29, brecht Differential Revision: https://developer.blender.org/D13412
2021-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-30Cleanup: use colon after doxygen params, correct slash directionCampbell Barton
2021-11-29Refactor BKE_bpath module.Bastien Montagne
The main goal of this refactor is to make BPath module use `IDTypeInfo`, and move each ID-specific part of the `foreach_path` looper into their own IDTypeInfo struct, using a new `foreach_path` callback. Additionally, following improvements/cleanups are included: * Attempt to get better, more consistent namings. ** In particular, move from `path_visitor` to more standard `foreach_path`. * Update and extend documentation. ** API doc was moved to header, according to recent discussions on this topic. * Remove `BKE_bpath_relocate_visitor` from API, this is specific callback that belongs in `lib_id.c` user code. NOTE: This commit is expected to be 100% non-behavioral-change. This implies that several potential further changes were only noted as comments (like using a more generic solution for `lib_id_library_local_paths`, addressing inconsistencies like path of packed libraries always being skipped, regardless of the `BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value, etc.). NOTE: basic unittests were added to master already in rBdcc500e5a265093bc9cc. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13381
2021-11-25Fix T93357: crash when opening search menuJacques Lucke
This is the same fix as in rBde35a90f9f56d3ff3ac80c13bf1ae296853ba877 but for the blender-v3.0-release branch.
2021-11-24Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-24Asset Browser: Support dragging catalogs into top levelJulian Eisel
This was an oversight when I added catalog drag & drop support. I forgot to add this for dragging catalogs into the top level by dragging into to the "All" item as well. This made the drag & drop support rather broken because it wouldn't work for a basic case.
2021-11-24Cleanup: use nullptrJacques Lucke
2021-11-24Fix crash when opening search menu.Jeroen Bakker
Asset install bundle poll didn't check the space it was running in and assumed that it was always running in file browser.
2021-11-24T91406: Asset Library IndexingJeroen Bakker
Asset library indexing would store indexes of asset files to speed up asset library browsing. * Indexes are read when they are up to date ** Index should exist ** Index last modify data should be later than the file it indexes ** Index version should match * The index of a file containing no assets can be load without opening the index file. The size of the file should be below a 32 bytes. * Indexes are stored on a persistent cache folder. * Unused index files are automatically removed. The structure of the index files contains all data needed for browsing assets: ``` { "version": <file version number>, "entries": [{ "name": "<asset name>", "catalog_id": "<catalog_id>", "catalog_name": "<catalog_name>", "description": "<description>", "author": "<author>", "tags": ["<tag>"] }] } ``` Reviewed By: sybren, Severin Maniphest Tasks: T91406 Differential Revision: https://developer.blender.org/D12693
2021-11-23Asset: Merge asset library/list refresh operatorsJulian Eisel
In rBdcdbaf89bd11, I introduced a new operator (`file.asset_library_refresh()`) to handle Asset Browser refreshing more separate from File Browser refreshing. However, there already was `asset.asset_list_refresh()`, which at this point only works for asset view templates, but was intended to cover the Asset Browser case in future too. This would happen once the Asset Browser uses the asset list design of the asset view template. So rather than having two operators for refreshing asset library data, have one that just handles both cases, until they converge into one. This avoids changes to the Python API in future (deprecating/changing operators). Differential Revision: https://developer.blender.org/D13239
2021-11-23Asset: Merge asset library/list refresh operatorsJulian Eisel
In rBdcdbaf89bd11, I introduced a new operator (`file.asset_library_refresh()`) to handle Asset Browser refreshing more separate from File Browser refreshing. However, there already was `asset.asset_list_refresh()`, which at this point only works for asset view templates, but was intended to cover the Asset Browser case in future too. This would happen once the Asset Browser uses the asset list design of the asset view template. So rather than having two operators for refreshing asset library data, have one that just handles both cases, until they converge into one. This avoids changes to the Python API in future (deprecating/changing operators). Differential Revision: https://developer.blender.org/D13239
2021-11-23Merge branch 'blender-v3.0-release'Bastien Montagne
2021-11-23Icons: Replace .blend file icons, add "Current File" iconJulian Eisel
The Blender icon must not be used to refer to anything that is not Blender itself. Using the Blender icon on its own to refer to .blend files or the currently open file is a no-go, which was brought up by Ton. This does the following changes to the icon file: * Add new "Current File" icon * Change the .blend file icon to contain a file icon with the Blender logo, but not merely the Blender logo. * Change the backup .blend file icon accordingly. The new "Current File" icon is used in the Asset Browser, but could/should be used in the Outliner as well. That needs more design discussion though.
2021-11-23Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-23Cleanup: fix clang-tidy warningsSybren A. Stüvel
Fix clang-tidy warnings introduced by a recent commit on the release branch. No functional changes.
2021-11-23Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-23Asset Browser: add operator for installing asset bundlesSybren A. Stüvel
Add an operator "Copy to Asset Library" for installing asset bundles into already-existing asset libraries. The operator is shown when: - the "Current File" library is selected, - the blend file name matches `*_bundle.blend`, and - the file is not already located in an asset library. The user can select a target asset library, then gets a "Save As" dialogue box to select where in that library the file should be saved. This allows for renaming, saving in a subdirectory, etc. The Asset Catalogs from the asset bundle are merged into the target asset library. The operator will refuse to run when external files are referenced. This is not done in its poll function, as it's quite an extensive operator (it loops over all ID datablocks). Reviewed by: Severin Differential Revision: https://developer.blender.org/D13312
2021-11-05Cleanup: Use reference for non-optional C++ parameterJulian Eisel
A reference makes clear that NULL is not an expected value. So it's the prefered way of passing a `const` input parameter (at least if it may not be cheap to copy).