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-07-24Merge branch 'master' into node-group-single-socket-nodesLukas Tönne
2021-07-24Weld Modifier: add "loose_edges" optionFredrik Hansson
This improve the cloth modeling workflow by allowing you to weld only the edges that are used for the sewing forces. Reviewed By: mano-wii, weasel Differential Revision: https://developer.blender.org/D10710
2021-07-23Cleanup: double spaces in stringsCampbell Barton
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-23XR: Reference Space ImprovementsPeter Kim
Improves control over the XR reference space by using the stage ref space (user-defined tracking bounds) instead of local ref space (position at application launch), if available. Also adds an "absolute tracking" session option to skip applying eye offsets that are normally added for placing users exactly at landmarks. By enabling absolute tracking, users can define the tracking origin in a way that is not linked to the headset position. Instead, the tracking values given by the XR runtime are left unadjusted and a user can manually calibrate an "origin" landmark object to adjust to their real world space. Can be useful for applications that use external tracking systems and those that primarily only need to use controllers and not the headset (e.g. motion capture). The absolute tracking option requires an update to the VR Scene Inspection addon to be accessible by regular users. Reviewed By: Julian Eisel Differential Revision: http://developer.blender.org/D10946
2021-07-22VSE: Speed Effect layout updatesGermano Cavalcante
**Changes:** - New enums correspond to 4 modes: `Stretch`, `Multiply`, `Frame Number` and `Length`. - "`Multiply Factor`" has been removed; - Value corresponding to "`use as speed`" enabled is now the value appended to the `Multiply` enum; - Value corresponding to "`use as speed`" disabled is now the value appended to the `Frame Number` enum; - Value corresponding to "`Scale to Length`" enabled is now the value appended to the `Length` enum; - Except `Stretch` each mode has now its respective control values. Differential Revision: https://developer.blender.org/D11856
2021-07-22Geometry Nodes: Set Bezier Handle Type NodeJohnny Matthews
This node takes a curve and a point selection and allows you to set the specified (or all) points left/right or both handles to a given type. Differential Revision: https://developer.blender.org/D11992
2021-07-21Cleanup: Centralize/unify asset library reference from/to enum codeJulian Eisel
This was an open TODO, I wanted to have code for translating asset library references from and to enum values in a central place, and access that in the same way from both the Asset Browser and the Workspace RNA code. * Adds own file for the related functions. * Adds doxygen comments. * Updates RNA callbacks to properly use these functions. * Let these functions call each other, avoid duplicating logic.
2021-07-21Assets: Rename workspace active asset library DNA variableJulian Eisel
This new variable was introduced with 7898089de3f2. We don't usually use an `active` prefix variable. Plus, this makes the name match the one of the Asset Browser active library variable, so we can use the `rna_def_asset_library_reference_common()` helper for both. This will cause Asset Views to open with the default "Current File" Asset Library. We could avoid that, but it's a minor issue really.
2021-07-21Cleanup: replace BLI_assert(0 && "text") with BLI_assert_msgCampbell Barton
2021-07-21Cleanup: replace NB with NOTE in commentsCampbell Barton
2021-07-20Cleanup: Getters for asset-handle dataJulian Eisel
While the asset-handle design is supposed to be temporary (see 35affaa971cf), I prefer keeping the fact that it's nothing but a file entry pointer an implementation detail that is abstracted away. So this introduces getters for the file data we typically access for asset-handles.
2021-07-20Cleanup: Use const for internal file data of asset-handleJulian Eisel
Note that the current asset-handle design is temporary, see 35affaa971cf. I still prefer this to be const, as code outside the asset-list/file-list code should never mess with the file data of an asset.
2021-07-20Asset: Clearly describe RNA property description as temporaryJulian Eisel
The asset handle design is only temporary (see 35affaa971cf) and this RNA property is only needed for internal, technical reasons of the asset view template. So although not nice, at least make it clear in the RNA property description that this should not be used.
2021-07-20Cleanup: Correct asset TODO comment, move setter next to getterJulian Eisel
2021-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-20LineArt: UI cleanups.YimingWu
Wording on the UI, slider consistency and material mask switches layout. Reviewed By: Sebastian Parborg (zeddb) Differential Revision: http://developer.blender.org/D11839
2021-07-20Cleanup: spellingCampbell Barton
2021-07-18Geometry Nodes: Curve Trim NodeAngus Stanton
This node implements shortening each spline in the curve based on either a length from the start of each spline, or a factor of the total length of each spline, similar to the "Start & End Mapping" panel of curve properties. For Bezier curves, the first and last control points are adjusted to maintain the shape of the curve, but NURB splines are currently implicitly converted to poly splines. The node is implemented to avoid copying where possible, so it outputs a changed version of the input curve rather than a new one. Differential Revision: https://developer.blender.org/D11901
2021-07-16VSE: Fix multicam splitting all selected stripsRichard Antalik
`split_multicam` used split operator, where if more strips than multicam were selected, all would be split, which is undesirable. Add `Sequence.split()` RNA API function. to split individual strips. Function accepts `frame` and `split_method arguments`. Returns right strip after splitting. In case when strip being split have effects, these will be split too, so no invalid state should be created. Selection is not handled, this is by design up to user. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11926
2021-07-16Fix T89899: Crashes when accessing vertex groups from objectsHans Goudey
We need to be more strict about trying to retrieve a list of vertex group names from objects now, as only three object types support them. This commit adds a check for vertex group support in a few places, the data transfer operator/modifier, copying vertex groups to selected objects, and the vertex group remove and clear functions. Differential Revision: https://developer.blender.org/D11947
2021-07-16Surface Deform: support sparse binding mode for improving performance.Alexander Gavrilov
When a vertex group is used to limit the influence of the modifier to a subset of vertices, binding data for vertices with zero weight is not needed. This wastes memory, disk space and CPU cycles. If the vertex group contents is known to be final and constant, it is reasonable to optimize by only storing data group vertices. This has to be an option in case the group can change. Supporting this requires adding a vertex index field and spliting the vertex count into mesh and bind variants, but both happen to fit in available padding. The old numverts field is renamed to the new bound vertex count field to maintain the array length invariant. Versioning is used to initialize the other new fields. If a file with sparse binding is opened in an old blender version, it is corrupted into a non-sparse bind with vertex count mismatch, preventing the modifier from working until rebind. Differential Revision: https://developer.blender.org/D11924
2021-07-16Merge branch 'master' into node-group-single-socket-nodesLukas Tönne
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-16Cleanup: compiler warningsCampbell Barton
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-15UI: Support defining UI lists in CJulian Eisel
So far all UI lists had to be defined in Python, this makes it possible to define them in C as well. Note that there is a whole bunch of special handling for the Python API that isn't there for C. I think most importantly custom properties support, which currently can't be added for C defined UI lists. The upcoming asset view UI template will use this, which needs to be defined in C. Adds a new file `interface_template_list.cc`, which at this point is mostly a dummy to have a place for the `ED_uilisttypes_ui()` definition. I plan a separate cleanup to move the UI-list template to that file.
2021-07-15UI: Support UI list tooltips, defined via Python scriptsJulian Eisel
Makes it possible to create tooltips for UI list rows, which can be filled in .py scripts, similar to how they can extend other menus. This is used by the (to be committed) Pose Library add-on to display pose operations (selecting bones of a pose, blending a pose, etc). It's important that the Python scripts check if the UI list is the correct one by checking the list ID. For this to work, a new `bpy.context.ui_list` can be checked. For example, the Pose Library add-on does the following check: ``` def is_pose_asset_view() -> bool: # Important: Must check context first, or the menu is added for every kind of list. list = getattr(context, "ui_list", None) if not list or list.bl_idname != "UI_UL_asset_view" or list.list_id != "pose_assets": return False if not context.asset_handle: return False return True ```
2021-07-15UI: UI list refactor & preparations for asset view templateJulian Eisel
This is more of a first-pass refactor for the UI list template. More improvements could be done, but that's better done separately. Main purpose of this is to make the UI list code more manageable and ready for the asset view template. No functional changes for users. * Split the huge template function into more manageable functions, with clear names and a few structs with high coherency. * Move runtime data management to the template code, with a free callback called from BKE. This is UI data and should be managed at that level. * Replace boolean arguments with bit-flags (easily extendable and more readable from the caller). * Allow passing custom-data to the UI list for callbacks to access. * Make list grip button for resizing optional. * Put logic for generating the internal UI list identifier (stored in .blends) into function. This is a quite important bit and a later commit adds a related function. Good to have a clear API for this. * Improve naming, comments, etc. As part of further cleanups I'd like to move this to an own file.
2021-07-15Animation: apply pose to all or selected bones of armatureSybren A. Stüvel
New function `BKE_pose_apply_action_all_bones()`, which will be necessary for the upcoming pose library v2.0. This renames the function `BKE_pose_apply_action` to `BKE_pose_apply_action_selected_bones`, to reflect that it only works on selected bones, to contrast it to the new function.
2021-07-15File/Asset Browser: Extend file-entry and asset handle Python APIJulian Eisel
Adds the following to `bpy.types.FileSelectEntry`: * `id_type`: The data-block type the file represenets, if any. * `local_id`: The local data-block it represents, if any (assets only). And the following to `bpy.types.AssetHandle`: * `local_id`: The local data-block the asset represents, if any. This kind of information and the references are important for asset related operators and UIs. They will be used by upcoming Pose Library features.
2021-07-15Assets: Initial Asset List as part of the Asset System designJulian Eisel
Implements a basic, WIP version of the asset list. This is needed to give the asset view UI template asset reading and displaying functionality. See: * Asset System: Data Storage, Reading & UI Access - https://developer.blender.org/T88184 Especially the asset list internals should change. It uses the File/Asset Browser's `FileList` API, which isn't really meant for access from outside the File Browser. But as explained in T88184, it does a lot of the stuff we currently need, so we (Sybren Stüvel and I) decided to go this route for now. Work on a file-list rewrite which integrates well with the asset system started in the `asset-system-filelist` branch. Further includes: * Operator to reload the asset list. * New `bpy.types.AssetHandle.get_full_library_path()` function, which gets the full path of the asset via the asset-list. * Changes to preview loading to prevent the preview loading job to run eternally for asset views. File Browsers have this issue too, but should be fixed separately.
2021-07-15Assets: AssetHandle type as temporary design to reference assetsJulian Eisel
With temporary I mean that this is not intended to be part of the eventual asset system design. For that we are planning to have an `AssetRepresentation` instead, see T87235. Once the `AssetList` is implemented (see T88184), that would be the owner of the asset representations. However for the upcoming asset system, asset browser, asset view and pose library commits we need some kind of asset handle to pass around. That is what this commit introduces. Idea is a handle to wrap the `FileDirEntry` representing the asset, and an API to access its data (currently very small, will be extended in further commits). So the fact that an asset is currently a file internally is abstracted away. However: We have to expose it as file in the Python API, because we can't return the asset-handle directly there, for reasons explained in the code. So the active asset file is exposed as `bpy.context.asset_file_handle`.
2021-07-15Assets: Add an active asset library per workspace, for the UI to useJulian Eisel
This per-workspace active asset library will be used by the asset views later. Note that Asset Browsers have their own active asset library, overriding the one from the workspace. As part of this the `FileSelectAssetLibraryUID` type gets replaced by `AssetLibraryReference` which is on the asset level now, not the File/Asset Browser level. But some more work is needed to complete that, which is better done in a separate commit. This also moves the asset library from/to enum-value logic from RNA to the editor asset level, which will later be used by the asset view.
2021-07-15Fix T88188: Allow keyframing vertex mass in cloth simRobert Sheldon
Update vertex weights between simulation steps if they have changed. This allows for animated vertex weights in the cloth sim. Reviewed By: Sebastian Parborg Differential Revision: http://developer.blender.org/D11640
2021-07-15Keymap: use Shift-Tab to toggle snap in the sequencerCampbell Barton
Match the same shortcut for the 3D view & UV editor.
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
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-14Fix (unreported) LibOverride diffing generating operations for non-editable ↵Bastien Montagne
properties. Non-pointer-like properties that are not editable should never generate override operations. While harmless (those would never be applied back anyway), better not clutter override operations list, and also enjoy the symbolic performances improvement here. NOTE: Pointer-like properties (pointers and collections) remain processed as usual here since they usually imply recursivity. We could make an exception to the exception for ID pointers, but for now I don't think this is worth it.
2021-07-14Fix crash displaying invalid enum value with translations enabledBrecht Van Lommel
Found loading a cycles-x .blend file saved with different integer values for enum items.
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-12Geometry Nodes: Curve Primitive QuadrilateralJohnny Matthews
This commit adds a curve primitive node for creating squares, rectangles, trapezoids, kites, and parallelograms. It also includes a mode where the four points are just vector inputs. Differential Revision: https://developer.blender.org/D11665
2021-07-09Merge branch 'master' into node-group-single-socket-nodesLukas Tönne
2021-07-09Nodes: Moved group interface panel code to python.Lukas Tönne
The node group interface panels were still implemented in C. Now they ported over to python for easier maintenance. Differential Revision: https://developer.blender.org/D11834
2021-07-09Cleanup: rename BKE_animdata_{add=>ensure}_idCampbell Barton
Use the term `ensure` as existing data is used when present.
2021-07-08Single-socket input/output nodes in node groups.Lukas Tönne
Changes the default group input/output nodes in groups to show only a single socket. This is more convenient for keeping connections short and put parameters closer to where they are used inside a group. For input nodes this is purely a UI feature: they can already be duplicated and unused sockets can be hidden (ctrl+h). The patch only makes this the default setup of input nodes by providing all inputs separately in the "Add Node" menu. For output nodes the situation requires some functional changes, because outputs have to be unique. The "virtual" extension socket on group input/output nodes is now disabled by default, since it adds a lot of visual noise without saving much work (see discussion in T68733). The feature can be enabled with a per-node flag. Todo: - [ ] Implement unique output handling across different node systems. Differential Revision: https://developer.blender.org/D11853
2021-07-08Cleanup: spellingCampbell Barton
2021-07-07Fix crash accessing sequencer stripsSergey Sharybin
Was caused by recent clange sequences_all iterator in RNA (D11793).
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-07Cleanup: clang-tidy, unused functionCampbell Barton