December 16, 2021, 16:27 (GMT) |
LibOverride: Improve speed of resync and creation of liboverrides. `BKE_collection_object_find` has extremely bad performances (very high time complexity). While ideally this should be fixed in that API, for now cache its results once at the beginning of the resync/creation process. This makes loading of complex production files with a lot of liboverrides to resync three to four times faster. Thanks to @brecht for the profiling in T94059. |
December 16, 2021, 15:48 (GMT) |
LibOverride: Cleanup log about unfound subitems. Not finding subitem when its name and index are invalid/unset is expected behavior, and does happen when e.g. inserting a new constraint or modifier at the begining of the stack. |
December 16, 2021, 12:40 (GMT) |
Fix T94115: Selecting current action in undo history undoes all When selecting the current undo step there is no need to do anything. Fix and minor refactor to de-duplicate refreshing after running undo/redo & undo history. |
December 16, 2021, 12:18 (GMT) |
UI: deduplicate code for Copy To Selected and Alt-button tweaking This resolves an old TODO to deduplicate code in copy_to_selected_button & ui_selectcontext_begin. This is also in hindsight of adding id-property support [incl. Geometry Nodes modifier properties] for this in the next commit. No behavior change expected here. ref T93983 & D13573 |
December 16, 2021, 12:18 (GMT) |
UI: support Copy To Selected for id-properties [GN modifier properties] Both {key Alt} editing behavior as well as `Copy To Selected` were not working on geometry nodes modifiers (even if these matched exactly - having the same nodegroup - on multiple objects) Reason is that code checks pointer equality on the discovered properties [geometry nodes modifier properties are stored as ID properties], but these are not the same across objects (since these are fetched from NodesModifierSettings - which are different on different objects). note: if general custom properties are "API defined" on existing classes, this was working, we are getting the exact property for different IDs in this case Now be more permissive with ID properties not defined on classes in general and dont check pointer equality for them. For ID properties on specific IDs (not the ones defined on classes) this //might// be undesired (havent spotted issues though, even if equally named ID properies with different types existed -- this then simply does nothing). For geometry nodes modifiers, new code also checks if the nodegroups are the same [since generic naming "Input_XXX" is shared for all modifiers -- and starting to copy over things to unrelated modifiers is not desired here]. Fixes T93983. Maniphest Tasks: T93983 Differential Revision: https://developer.blender.org/D13573 |
December 16, 2021, 11:54 (GMT) |
Cleanup: correct docstring for `driver_variable_name_validate` No functional changes. |
December 16, 2021, 10:58 (GMT) |
Docs: add doc-strings for BLI_path functions |
December 16, 2021, 10:26 (GMT) |
Animation: send notifier when keyframe is inserted `<some_id>.keyframe_insert()` now sends a notifier that animation data was changed, so that animation-related editors can properly refresh. Since this function is quite high-level (if necessary it creates the Action and FCurves), I thought this would be a suitable location for the notifier. If high keyframing speed is required, it is still recommended to use `FCurveKeyframePoints.insert(options={'FAST'})` instead. |
December 16, 2021, 09:08 (GMT) |
Fix compile error on Windows. |
December 16, 2021, 05:27 (GMT) |
Cleanup: simplify file saving logic Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8 that initialized the file-path on first save as it's no longer needed. Also remove relbase argument to BLI_path_normalize as the destination file paths shouldn't use relative locations. |
December 16, 2021, 05:27 (GMT) |
WM: various changes to file writing behavior Saving with only a filename (from Python) wasn't being prevented, while it would successfully write the file to the working-directory, path remapping and setting relative paths wouldn't work afterwards as `Main.filepath` would have no directory component. Disallow this since it's a corner case which only ever occurs when path names without any directories are used from Python, the overhead of expanding the working-directory for all data saving operations isn't worthwhile. The following changes have been made: - bpy.ops.wm.save_mainfile() without a filepath argument fails & reports and error when the file hasn't been saved. Previously it would write to "untitled.blend" and set the `G.main->filepath` to this as well. - bpy.ops.wm.save_mainfile(filepath="untitled.blend") fails & reports and error as the filename has no directory component. - `BLI_path_is_abs_from_cwd` was added to check if the path would attempt to expand to the CWD. |
December 16, 2021, 02:30 (GMT) |
Nodes: Begin splitting composite node buttons into individual files Currently, most node buttons are defined in `drawnode.cc` however, this is inconvenient because it requires editing many files when adding new nodes. The goal is to minimize the number of files needed to add or update a node. This commit moves most of the node layout functions for composite nodes into their respected `source/blender/nodes/composite/nodes` file. In the future, these functions will be simplified to `node_layout` once files have their own namespace. See {D13466} for more information. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13523 |
December 16, 2021, 00:41 (GMT) |
Remove G.relbase_valid In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564 |
December 16, 2021, 00:38 (GMT) |
Cleanup: spelling |
December 16, 2021, 00:38 (GMT) |
Cleanup: clang-format |
December 16, 2021, 00:38 (GMT) |
Cleanup: unused variable warning |
December 16, 2021, 00:05 (GMT) |
Fix various cases of incorrect filtering in node link drag search Some nodes didn't check the type of the link's socket for filtering. Do this with a combination of manually calling the node tree's validate links function and using the helper function for declarations. Also clean up a few cases that added geometry sockets manually when they can use the simpler helper function. |
December 15, 2021, 23:37 (GMT) |
Fix: Compare node missing from link drag search This was missing from rB11be151d58ec0ca955f. It uses the same approach as the quadrilateral node. |
December 15, 2021, 21:00 (GMT) |
Fix: Crash in nodes modifier with missing node group We cannot depend on node->id being non-null for group nodes. |
December 15, 2021, 20:51 (GMT) |
Cleanup: Use const arguments, references Also slightly change naming to avoid camel case. |
|