Revision 87e0220 by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 26, 2021, 10:17 (GMT) |
Revert "Action: flip action data using pose contents" This reverts commit d219b09a4802fff37189442de55720da6a03ea78. It was accidentally committed to this branch, and is superseded by the actual commits mentioned in D10781#274991 |
Revision c8f684e by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 26, 2021, 10:08 (GMT) |
Fix library linking for editors/asset Add missing libraries to fix a linker error. |
Revision 7fc48af by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 18:19 (GMT) |
Correct function names for changes in ui-asset-view-template branch |
Revision 4f36fb9 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 18:12 (GMT) |
Merge branch 'ui-asset-view-template' into asset-browser-poselib |
Revision 91b87d8 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 25, 2021, 18:10 (GMT) |
Cleanup: Improve naming of new temporary ID consumer functions |
Revision e7462cf by Sybren A. Stüvel / Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 25, 2021, 18:03 (GMT) |
Asset Browser: correct the declared context keys The file browser context (when in asset browser mode) was declaring the wrong context keys, making it impossible to use `context.copy()` in Python. |
Revision b0395ba by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 18:02 (GMT) |
Cleanup: Use new utils provided by the asset system to get temp asset IDs The operators are not exclusive to the File Browser anymore now. The logic to get the asset file information and use that to append the ID if necessary is abstracted away by the asset system now, see 10383566b800. |
Revision 6c9ce08 by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 17:02 (GMT) |
Asset Browser: correct the declared context keys The file browser context (when in asset browser mode) was declaring the wrong context keys, making it impossible to use `context.copy()` in Python. |
Revision d219b09 by Campbell Barton / Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 16:19 (GMT) |
Action: flip action data using pose contents This adds a new RNA method `Action.flip_with_pose(ob, frame)` to flip the action channels that control a pose. The rest-pose it's self is used to properly flip the bones transformation. This is useful as a way to flip actions used in pose libraries, so the same action need not be included for each side. API calls to cache F-curve look-ups have also been added, supporting a single hash lookup to access all channels controlling an RNA path. ---- **Motivation** This patch adds functionality to flip an entire action on the X axis using a symmetrical rig. This was written so the asset manager can apply poses flipped, see T86159, tested with spring.blend. **Alternative Solutions** It's possible to calculate this on the pose directly (see D10766), however operating on the action data makes this more useful as an API function, since the data can be flipped before it's applied to the pose. Instead of flipping on the pose, then writing back to the action. **Limitations** There is some information not easily available at the time of flipping, for example - it's possible the flipped data-path doesn't exist in all cases, although the ideal behavior isn't obvious when the RNA path only resolves on one side of the pose. - Currently the API function flips all channels, we could add an argument so it only operates on some of the channels. **Open Topics** - When some actions transform channels don't exist, they could be created (for example - if only X & Y rotation are set, it may be necessary to create a Z F-Curve to properly flip the rotation). - The key-framing API is currently part of the editors (it would be a bad-level call from the BKE), we could expose some keyframing functionality to BKE, or move this functionality to editors. For now there is a simple keyframe adjusting function. - Currently only the armature rest-matrices is used, not the pose. This API could take an armature instead of an object, although we might want to use pose content in the future, it doesn't seem like a big issue either way. - This could eventually be exposed as an operator. - Currently this re-orders channels which could have other frames keyed. A more comprehensive approach could be to operate on all keyed frames for an action, so an action that includes multiple poses will have them all properly flipped. ----- **Notes** - The F-Curve lookup cache can be committed separately. - This is an example script for testing with the pose object set active: ``` import bpy from bpy import context ob = context.object action = bpy.data.actions['07_040_A.spring'] action.flip_with_pose(ob, context.scene.frame_current) ``` Differential Revision: https://developer.blender.org/D10781 |
Revision 0cf3c86 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 12:56 (GMT) |
Merge branch 'ui-asset-view-template' into asset-browser-poselib |
Revision 0583a7e by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 25, 2021, 11:24 (GMT) |
Merge remote-tracking branch 'origin/master' into asset-browser-poselib |
Revision 2c65710 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 24, 2021, 13:35 (GMT) |
Merge branch 'master' into ui-asset-view-template |
Revision 01a5d3f by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 24, 2021, 12:54 (GMT) |
Support passing operator to invoke on activating or dragging an item An annoyance is that the operator names have to be passed to the template which makes the already long argument list even longer. Thought about a couple of ways to do this, unfortunately this is the only decent way to do this that I see. There's also no way to pass operator options currently. Getting the handling to work correctly took some effort, and the code is not exactly nice. Note that even though we activate the item when calling the custom drag operator (helps indicating the pose being blended for example), we only call the drag operator then, not the activate one. They are never executed both. Also note that this won't compile right now, I'll have to commit some changes to master first. |
Revision 1038356 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 24, 2021, 12:34 (GMT) |
Add utilities to temporarily append asset IDs Uses the new `BLO_library_temp_xxx` functions, but deals with all the asset specific file path building. This is a reasonable utility for the asset system to have, it will probably be needed by more asset types than IDs. |
Revision c6182a9 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 24, 2021, 12:25 (GMT) |
Require identifier for asset view template usages Needed if we want to support multiple different asset views in future. |
Revision 5a94ab9 by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 24, 2021, 12:25 (GMT) |
Allow getting asset library and active asset handle via context `CTX_wm_asset_library()` returns the active asset library from the workspace, or the the Asset Browser one while inside that. The active asset handle is set by the Asset Browser and the asset view UI template so that operators executed via the template can access it. |
Revision fd6015f by Julian Eisel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt, ui-asset-view-template) March 24, 2021, 11:22 (GMT) |
Merge branch 'master' into ui-asset-view-template |
Revision 471955e by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 23, 2021, 15:41 (GMT) |
Pose Library: expand blend operator poll function Expand the `POSELIB_OT_blend_pose` poll function to check whether there is an actively selected pose, and don't crash even if the operator gets called regardless. |
Revision 9ee890e by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 23, 2021, 15:38 (GMT) |
Pose library: prevent double report when no asset can be loaded |
Revision 8ec28af by Sybren A. Stüvel (asset-browser, asset-browser-poselib, asset-system-filelist, temp-pose-flipping-fix-attempt) March 23, 2021, 15:37 (GMT) |
Pose library: make reports translatable |
|