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-10-23UI: Correct icons of File Browser Link/Append ID filter settingsJulian Eisel
Wasn't using the same icons as usually used for these IDs, which can be confusing. Corrected them to be consistent with other usages of these IDs.
2021-10-19Fix T91197: marking assets from Python may crashSybren A. Stüvel
When using `asset_mark` function from a Python script and afterwards updating the preview image, a crash might happen. The preview image is generated by the `asset_mark` function. This may happen on a background thread, introducing potential synchronization issues. This patch fixes this by separating the preview generation `ID.asset_generate_preview` from the mark as asset `ID.asset_mark`. Note: this separation of "mark as asset" and "generate preview" also applies to the `ED_asset_mark_id()` C function; if it is desired to have previews rendered after marking as asset, a call to `ED_asset_generate_preview()` is now also required. Reviewed By: sybren Maniphest Tasks: T91197 Differential Revision: https://developer.blender.org/D12922
2021-10-06Cleanup: rename BKE_font.h -> BKE_vfont.hCampbell Barton
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
2021-09-22Initial implementation of local ID re-use when appending.Bastien Montagne
This commit adds to ID struct a new optional 'weak reference' to a linked ID (in the form of a blend file library path and full ID name). This can then be used on next append to try to find a matching local ID instead of re-making the linked data local again. Ref. T90545 NOTE: ID re-use will be disabled for regular append for the time being (3.0 release), and only used for assets. Therefore, this commit should not change anything user-wise. Differential Revision: https://developer.blender.org/D12545
2021-09-16Cleanup: Rename `BKE_id_clear_newpoin` to `BKE_id_newptr_and_tag_clear`.Bastien Montagne
2021-09-16IDManagement: refactor: Remove 'test' part from `BKE_lib_id_make_local`.Bastien Montagne
Mixing testing and actual action in a single function is just not a good way to do things, and the 'testing' feature is not used anywhere anymore, time to get rid of it.
2021-08-04LibOverride RNA API: add removal of properties and operations.Bastien Montagne
This should complete the basics of RNA API for library overrides. Ref. T86656.
2021-08-04LibOverride: Add RNA API to reset/delete overrides.Bastien Montagne
Ref. T86656.
2021-08-04Tweak to recent liboverride API addition: naming.Bastien Montagne
Rename new API function introduced in recent rB3b0fab6dfaa0 to match our convention to put the action (verb) at the end of names: `operations_update`. Sorry for not catching that during review.
2021-08-04Override: API update_operations.Jeroen Bakker
The update_operations function will update the override structure of the local object. When working with overrides the override structure is only updated when the work-file is stored. When using scripts you might want to enforce the update of override properties and operations. This function removes a hack on the test cases. Reviewed By: mont29 Maniphest Tasks: T86656 Differential Revision: https://developer.blender.org/D10848
2021-07-15UI/Assets: Initial Asset View UI templateJulian Eisel
The asset view UI template is a mini-version of the Asset Browser that can be placed in regular layouts, regions or popups. At this point it's made specifically for placement in vertical layouts, it can be made more flexible in the future. Generally the way this is implemented will likely change a lot still as the asset system evolves. The Pose Library add-on will use the asset view to display pose libraries in the 3D View sidebar. References: * https://developer.blender.org/T86139 * https://code.blender.org/2021/06/asset-browser-project-update/#what-are-we-building * https://code.blender.org/2021/05/pose-library-v2-0/#use-from-3d-viewport Notes: * Important limitation: Due to the early & WIP implementation of the asset list, all asset views showing the same library will show the same assets. That is despite the ID type filter option the template provides. The first asset view created will determine what's visible. Of course this should be made to work eventually. * The template supports passing an activate and a drag operator name. The former is called when an asset is clicked on (e.g. to apply the asset) the latter when dragging (e.g. to .blend a pose asset). If no drag operator is set, regular asset drag & drop will be executed. * The template returns the properties for both operators (see example below). * The argument list for using the template is quite long, but we can't avoid that currently. The UI list design requires that we pass a number of RNA or custom properties to work with, that for the Pose Libraries should be registered at the Pose Library add-on level, not in core Blender. * Idea is that Python scripts or add-ons that want to use the asset view can register custom properties, to hold data like the list of assets, and the active asset index. Maybe that will change in future and we can manage these internally. As an example, the pose library add-on uses it like this: ``` activate_op_props, drag_op_props = layout.template_asset_view( "pose_assets", workspace, "active_asset_library", wm, "pose_assets", workspace, "active_pose_asset_index", filter_id_types={"filter_action"}, activate_operator="poselib.apply_pose_asset", drag_operator="poselib.blend_pose_asset", ) drag_op_props.release_confirm = True drag_op_props.flipped = wm.poselib_flipped activate_op_props.flipped = wm.poselib_flipped ```
2021-07-14Python API: Add functions to ensure and clear IDPropertiesHans Goudey
This adds id_properties_clear() and id_properties_ensure() functions to RNA structs. This is meant as an initial change based on discussion in review of D9697. However, they may be useful in other situations. The change requires refactoring the internal idproperties callback to return a pointer to the IDProperty pointer, which actually turns out to be quite a nice cleanup. An id_properties attribute could be added in the future potentially. Differential Revision: https://developer.blender.org/D11908
2021-07-09Cleanup: rename BKE_animdata_{add=>ensure}_idCampbell Barton
Use the term `ensure` as existing data is used when present.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-03Fix missing updates in RNA override create functions.Bastien Montagne
2021-06-03LibOverride: Add `override_hierarchy_create`to ID's RNA API.Bastien Montagne
2021-05-25Fix/Refactor RNA ID preview getter creating preview data.Bastien Montagne
Same as with forcefields, accessors should never generate data.
2021-05-20Cleanup: rename incorrectly named experimental feature flagJacques Lucke
The `WITH_GEOMETRY_NODES` flag does not make sense anymore, it is just protecting the `Simulation` data block that is not used currently.
2021-04-22Assets: Correct name of own recently added BPY functionsJulian Eisel
Makes the functions (introduced in 557b3d2762a6) follow existing naming conventions for the API. Changes: `bpy.types.ID.mark_asset` to `bpy.types.ID.asset_mark` `bpy.types.ID.clear_asset` to `bpy.types.ID.asset_clear`
2021-04-20Correction to previous commit: Avoid unnecessary notifierJulian Eisel
Not a big deal, but nice to avoid notifiers when no change was done.
2021-04-20Assets: Add BPY function to mark and clear assetsJulian Eisel
Adds `mark_asset()` and `clear_asset()` to ID data-blocks, e.g. `bpy.context.active_object.mark_asset()`. They essentially do the same as the mark and clear asset operators. Scripts are generally discouraged from using operators where possible, but we need to provide API functions to use instead. In this case it means scripts don't have to override context to pass an ID to the operator.
2021-03-29Overrides: Make Experimental API Fail On Usage.Jeroen Bakker
It used to give a warning so test cases couldn't fail. This has been changed in the test case so we could use an error here.
2021-03-29Overrides: API to create an override template.Jeroen Bakker
This is functionality that isn't accessible via the user interface. The API allows the creation and modification of an override template that holds rules that needs to be checked when overriding the asset. The API is setup that it cannot be changed after creation. Later on when the system is more mature we will allow changing overrides operations. NOTE: This is an experimental feature and should not be used in productions. Reviewed By: mont29, sebbas Differential Revision: https://developer.blender.org/D10792
2021-03-03Fix (unreported) Outliner missing updates copying IDs via pythonPhilipp Oeser
Steps to reproduce: - switch to Scripting workspace - execute bpy.data.meshes['Cube'].copy() - Outliner will not show the new mesh immediately Now just send appropriate notifier. Differential Revision: https://developer.blender.org/D10584
2021-01-13RNA: allow editing pointer IDProperty values from the UI.Alexander Gavrilov
Currently it is not possible to edit bare IDProperty pointer values which are not explicitly defined through python via UI fields. This is likely mostly because, unlike numeric values, pointers aren't marked PROP_EDITABLE by default. However there are also some bugs in the RNA code that need fixing. The Geometry Nodes modifier uses bare properties to store input settings for the node group it wraps, so supporting Object and Collection sockets requires editable pointers. This patch marks bare IDProperties editable, and ensures that changing ID pointers rebuilds the dependency graph. A type check is needed because an IDPROPERTY PointerPropertyRNA can actually wrap a group value rather than an ID pointer. Making pointers editable is not likely to accidentally affect UI fields that were not intended to be editable, because a simple `layout.prop` cannot determine which datablocks to display in the menu and remains read-only. The PROP_NEVER_UNLINK flag is also removed: it seems it was added because the edit field that couldn't produce a menu to set the pointer used to still display the unlink button, but that seems not to be the case anymore. Actual support for Object & Collection inputs in the modifier is added in D10056, which can be used to test this code. Differential Revision: https://developer.blender.org/D10098
2021-01-07UI: Fix various issues with UI textYevgeny Makarov
- Use the name "Point Cloud" instead of "Pointcloud" - Fix a typo in UV_OT_smart_project. - Use the name "Install Light" to for the installation operator for MatCaps, HDRIs, and Studio Lights. Fixes T83585, T65291, and T54921 Differential Revision: https://developer.blender.org/D9867
2020-12-15Asset System: Data-block asset metadata storage, reading and APIJulian Eisel
Asset metadata is what turns a regular data-block into an asset. It is a small data-structure, but a key part of the technical design of the asset system. The design foresees that asset data-blocks store an `ID.asset_data` pointer of type `AssetMetaData`. This data **must not** have dependencies on other data-blocks or data-block data, it must be an independent unit. That way we can read asset-metadata from .blends without reading anything else from the file. The Asset Browser will use this metadata (together with the data-block name, preview and file path) to represent assets in the file list. Includes: * New `ID.asset_data` for asset metadata. * Asset tags, description and custom properties. * BKE code to manage asset meta-data and asset tags. * Code to read asset data from files, without reading IDs. * RNA for asset metadata (including tags) Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9716 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-15Move Point Cloud object back to Experimental FeaturesDalai Felinto
The geometry-nodes features no longer depend on the point cloud object. Therefore the point cloud object, although important in the future, can be postponed until we have render and edit mode fully working. This reverts commits: * ea74ed5a7a2031b614d401e394f2e0146fc90155. * dc614c68ef2c8ca8b076a000974b5a20a4145a42.
2020-12-08Spelling: Bit Depth Compound ModifiersYevgeny Makarov
Correct usage of compound modifiers like '32-bit'. Differential Revision: https://developer.blender.org/D9769 Reviewed by Julian Eisel
2020-12-02Cleanup: remove all of "#ifdef WITH_POINT_CLOUD"Dalai Felinto
Since Point Cloud was removed from experimental this is no longer needed.
2020-11-26Fix T82452: Outliner: Cyclic "Original ID" panel in Data API.Bastien Montagne
I cannot think of any case where we'd want to show this pointer in UI anyway, so just tag it with `PROP_HIDDEN`.
2020-11-14Merge branch 'blender-v2.91-release'Nathan Craddock
2020-11-14UI: Remove remaining uses of old collection iconNathan Craddock
After rB452a1c7b3838 there were still a few cases where the old collection icon was used in the interface. Replace these with the new filled collection icon.
2020-11-05Spelling: Predefined, Look Up, No OneHarley Acheson
Fixes 18 misspellings of 'predefined', 'Look Up', 'Lookup', and 'No One'. Differential Revision: https://developer.blender.org/D9466 Reviewed by Hans Goudey
2020-10-21Preferences: separate feature flags for geometry nodes and point cloud typeJacques Lucke
Those two features are not directly related and one might be activated in master earlier than the other. WITH_PARTICLE_NODES was removed, because we continue the project under the name "Geometry Nodes".
2020-10-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.
2020-08-18Remove (ifdef) RNA for simulation, point cloud and particlesDalai Felinto
For 2.90 release this should not be exposed in the RNA API. In master this needs to be ON by default, that's all. Differential Revision: https://developer.blender.org/D8589
2020-07-23LibOverride: Make `ID_IS_OVERRIDABLE_LIBRARY` macro more correct.Bastien Montagne
2020-07-13LibOverride: Cleanup: Remove option to disable library overrides.Bastien Montagne
Code is mature enough now to not need this anymore, people who do not want to use liboverrides can just not create them.
2020-06-23Preferences: New experimental settings for particle system and hairJacques Lucke
This replaces the cmake options `WITH_NEW_OBJECT_TYPES` and `WITH_NEW_SIMULATION_TYPE` with two experimental userpref settings: * `use_new_particle_system`: Enables the point cloud type and the simulation editor. * `use_new_hair_type`: Only displays the add-operator in the add menu for now. Note, in the current state you can't do anything productive with the new particle system or the new hair type. Features will be added step by step in the upcoming weeks and months. Reviewers: brecht Differential Revision: https://developer.blender.org/D8096
2020-06-23Cleanup: rename 'name' to 'filepath' for DNA typesCampbell Barton
Using 'name' for the full path of a file reads badly, especially when id.name is used in related code.
2020-06-19LibOverride: rempve ID preview from comparison (diffing) process.Bastien Montagne
Accessing this from RNA may actually create some data, which we do not want to happen when comparing data. Further more, preview is not data, but a view of it, so we should be safe ignoring it entirely here.
2020-06-13Cleanup: clang-format, unused variableCampbell Barton
2020-06-12LibOverride: Remove 'auto override' option.Bastien Montagne
Now all overrides are handled that way. Performances of the process look decent enough, even with production characters... If performance issues still arise, we'll investigate other solutions. This should also make T73154 obsolete now.
2020-06-10UI: Show library names grayed out and right-aligned in menusJulian Eisel
Should separate the data-block name better from the library name and improve readability.
2020-06-10LibOverride: Fix issues related to ID name differences.Bastien Montagne
Local datablocks (including overrides) need to have a unique name, which can then differ from the reference linked one (especially when there are several local overrides of a same linked data). Issue is, ID name is a 'rna name property', and as such used as reference when dealing with override of collections of IDs, so we cannot have a changing name. The solution implemented here should work and is simple, but it may have some issues in corner cases (time will say), it is not really robust. Alternative solution would be to store ID pointers as reference in override operations, instead of there name. But that would potentially add quiet a lot of overhead to foreach looping in `lib_query.c`.
2020-04-20Merge branch 'blender-v2.83-release'Bastien Montagne
2020-04-20Various typos fixes in UI messages.Bastien Montagne
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.