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-26LayerCollections: Add a way to prevent their resync with Collection hierarchy.Bastien Montagne
This is an easy & safe, yet not-so-nice way to address the LayerCollections vs. Collections hierarchy resync problem. Currently this resync is enforced everytime something changes in the Collections hierarchy, which is extremely inneficient, and can even produce 'loss' of LayerCollection data during complex Collection processes. Current example is during Library Overrides resync process. New code: * Makes resync significantly faster (between 10 and 15%). * Fixes 'disappearing' layer collections settings on sub-collections' layers. NOTE: This is not a proper fix for the underlying issue. However, implementing and testing the 'lazy update' solution as proposed by {T73411} requires a significant amount of time (especially in testing and tracking all places where code would need to ensure LayerCollections are up-to-date), which is not possible currently. Differential Revision: https://developer.blender.org/D11889
2021-07-26Mantaflow: Remove Noise Type OptionAaron Carlisle
Mantflow only supports wavelet noise, thus the parameter with only one option is no longer useful. Differential Revision: https://developer.blender.org/D6770
2021-07-25Fix T89391, etc. Boolean bugs when objects have negative scale.Howard Trickey
The old modifier code, now just used for Fast, has code in it to flip faces of arguments when their tranform's negativity differs from the main object's transform's negativity. I had neglected to put that logic in when I made the change that skipped the round trip through BMesh. Fixing this means that the results are more what the user expects when some or all operands have negative scales.
2021-07-23Fix T89393: crash when selecting edges when geometry nodes has "on cage" ↵Jacques Lucke
turned on The core problem is that the geometry nodes modifier sometimes support "mapping" (i.e. it remembers which new vertices correspond to edit mode vertices) and sometimes it does not, depending on what the nodes are doing. Also see rB07ce9910f7cc. The solution here is that the fallback case in `BKE_mesh_foreach_mapped_edge` does not call the callback with "invalid" indices. Differential Revision: https://developer.blender.org/D12007
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-23Edit Mesh: multi-thread auto-smooth & custom normal calculationsCampbell Barton
Supported multi-threading for bm_mesh_loops_calc_normals. This is done by operating on vertex-loops instead of face-loops. Single threaded operation still loops over faces since iterating over vertices adds some overhead in the case of custom-normals as the order used for accessing loops must be the same as iterating of a faces loops. From isolated timing tests of bm_mesh_loops_calc_normals on high poly models, this gives between 3.5x to 10x speedup, with larger gains for meshes with custom-normals. NOTE: this is part one of two patches for multi-threaded auto-smooth, tagging edges as sharp is still single threaded. Reviewed By: mont29 Ref D11928
2021-07-23Cleanup: Add function to check a curve's spline typesHans Goudey
The need for this has come up a few times.
2021-07-22Fix T90026: attributes added in editmode are lost on modeswitchPhilipp Oeser
When exiting editmode, customdata [and thus attributes] are copied from **BMesh** to **Mesh** (in `BM_mesh_bm_to_me`). When adding attributes, these were always added via `CustomData_add_layer_named` only. Instead (if we are in mesh editmode), we need to go through `BM_data_layer_add_named` to properly update the **BMesh** (see `update_data_blocks`) so we have stuff available to copy back to **Mesh** when exiting editmode. Same is done for removing (also going through BMesh). This is now done, DomainInfo is updated to point to BMesh (instead of Mesh) customdata when in editmode. Maniphest Tasks: T90026 Differential Revision: https://developer.blender.org/D11998
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-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-21Fix incorrect use of BLI_assert with error stringsCampbell Barton
Some asserts were never raised because of invalid checks.
2021-07-21Cleanup: replace BLI_assert(test || !"text") with BLI_assert_msg(test, text)Campbell Barton
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-20Armature test: properly initialize bone hierarchySybren A. Stüvel
Fix segfault in `BKE_armature_find_selected_bones_test` by property initializing the bone hierarchy listbases. No functional changes to Blender.
2021-07-20Pose Library: remove assumption about Action group namesSybren A. Stüvel
Remove the assumption of the pose library that Action groups are named after the bones in the armature. Even though this assumption is correct when the keys are created by Blender, action groups can be renamed. Keys created by Python scripts can also use arbitrary group names. Since there is more code in Blender making this assumption, and looping over selected bones is also a common occurrence, this commit contains some generic functionality to aid in this: - `BKE_armature_find_selected_bones`: function that iterates over all bones in an armature and calls a callback for each selected one. It returns a struct with info about the selection states (all or no bones selected). - `BKE_armature_find_selected_bone_names(armature)` uses the above function to return a set of selected bone names. - `BKE_pose_find_fcurves_with_bones()` calls a callback for each FCurve in an Action that targets a bone, also passing it the bone name.
2021-07-20Fix T89979: Assert in edit mode with curve to mesh nodeHans Goudey
The node tagged polys normals dirty, but the function to calculate the normals didn't clear the dirty flags for polys. Now clear the poly and corner dirty normal flags.
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-20Cleanup: reserve C++ comments for disabled codeCampbell Barton
Use C comments for plain text.
2021-07-20Cleanup: use '#if 0' for disabling multiple linesCampbell Barton
2021-07-20Cleanup: Make function static, use const object argumentHans Goudey
Also use `const Curve *` instead of `const Object *`, since the function works at a lower level than objects anyway. And also remove another unused function. Since this section of code for converting curves to meshes will likely be replaced, it's nicer to see which parts actually remain used at this point.
2021-07-20Cleanup: spellingCampbell Barton
2021-07-20Cleanup: Remove unused functionHans Goudey
2021-07-19Cleanup: Remove unused function, unused declarationHans Goudey
2021-07-19Revert "Depsgraph: Implement 'ID_RECALC_GEOMETRY_DEFORM'"Germano Cavalcante
This reverts commits bfa3dc91b75407b063f2ac991b176d98c050f92d, 52b94049f2a71a74f52247f83657cf3a5c8712b4, ae379714e4f1eca74f5f77532a6e959f29445236, a770faa811ee62837eb540b0bd83ca0770f16663, 4ed029fc02b022cb5ff28ed3ce70992c450d2be5, 101a493ab556c6597ac91fba204059be67b35990 and 62a2faa7ef39130446716d7a06215cd1df1eb2ac. And fixes T89955. Changing the dependency graph is a can of worms and the result is a kind of unpredictable. A different solution will be planned.
2021-07-19Object update: Remove fallback from batch_cache_deform_tagGermano Cavalcante
Falback is not really necessary, and causes `BKE_object_data_batch_cache_dirty_tag` to run multithreaded in an unsafe way. No functional changes.
2021-07-19Cleanup: remove unused MTex.pmapto, pmaptoneg & definesCampbell Barton
These have not been in use since 2.57 fafbd9d71b95776d1c7583476de74fccefab7f10.
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-18Fix: Incorrect logic in spline lookup functionAngus Stanton
This section of code deals with evaluated points, so that is the size it should use.
2021-07-16Cleanup: Simplify realizing of pointcloud instancesHans Goudey
Just a small change to make the function slightly shorter.
2021-07-16Cleanup: Simplify logic, use C++ typesHans Goudey
Also remove an unecessary null check, and make inner loop simpler.
2021-07-16Cleanup: Move gpencil_geom.c to C++Hans Goudey
This will help enable development on optimizations to the perimeter calculation here. Using C++ data structures like Array can make the code easier to read as well. Longer term, this can help improve integration with attributes and possibly the new curve code (since strokes and curves are quite similar in theory). Differential Revision: https://developer.blender.org/D11941
2021-07-16Cleanup: Remove redundant logicHans Goudey
The object type was checked twice unnecessarily. Also use a function for the check to be more explicit.
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-16Cleanup: spelling in commentsCampbell Barton
2021-07-15Fix failing tests from vertex group name parameter copyHans Goudey
It turns out `BKE_mesh_copy_parameters` can be called while other tools are running calculations, which meant that it was called at the same time as `armature_deform_coords_impl`. Beause of that, we shouldn't do any freeing (of the old vertex group names) there. Since the materials are copied in the "for_eval" version anyway, it seems to make sense to copy the vertex group name list there also. Fixes T89877, and also the failing `deform_modifiers` test. Differential Revision: https://developer.blender.org/D11936
2021-07-15Animation/add-ons: Enable the poselib add-on by defaultSybren A. Stüvel
The new Asset Browser-based pose library is partially implemented in an add-on. This commit enables the add-on by default, as the old pose library was built-in and thus always enabled. The ability to disable the add-on is there mostly for cases where people/studios want to use their own custom pose library.
2021-07-15Fix T88281: Pose Library 'flip pose' sometimes flips wrongSybren A. Stüvel
Correct cases where the X-axis of the bone (in pose space) aligns with the pose-space Y or Z-axis. In these cases the decomposition of the matrix fails, and a negative scale of the X-axis turns into a 180° rotation around the Y-axis. An extra -1 scale to the X and Z axes of the resulting matrix seems to fix things.
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: add function to blend Action into poseSybren A. Stüvel
Add function `BKE_pose_apply_action_blend()`, which blends a given Action into current pose. The Action is evaluated at a specified frame, and the result is applied to the armature's pose. A blend factor can be given to blend between the current pose and the one in the Action. Quaternions are interpolated with SLERP; it is assumed that their FCurves are consecutively stored in the Action. This function will be used in the upcoming new Pose Library.
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-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: Expose active asset library in contextJulian Eisel
For the Asset Browser, this returns the active asset library of the Asset Browser, otherwise it returns the one active in the workspace. This gives simple access to the active asset library from UI code and Python scripts. For example the upcoming Pose Library add-on uses this, as well as the upcoming asset view template.
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-15Cleanup: LayerCollection resync: Proper `r_` prefix for return function ↵Bastien Montagne
parameter.
2021-07-15Cleanup: improve comments, remove debug printfCampbell Barton
2021-07-15Cleanup: LayerCollection resync code.Bastien Montagne
Mainly naming (also droping the `layer_collection` in favor of just `layer` for internal code, this is clear enough and much shorter). Add proper parent/child identifiers, `r_` prefix for parameters also used as return values, etc. Also made some parameters const.
2021-07-15Fix: missing null checkJacques Lucke
This was a regression in rB3b6ee8cee7080af200e25e944fe30d310240e138.
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.