Pose Library: temporarily load Action asset #86183
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#86183
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Pose Library system is going to perform the following steps:
This task is about implementing steps 1. and 3.
The idea behind the current pose library project is that its behaviour is seen from Blender's perspective as "custom use" of an asset; this means it's simply implemented in Python in a way that add-ons could also use. For now it's probably the simplest to have two functions exposed in RNA for respectively steps 1 and 3, so that Python code can use it.
By temporarily loading the Action datablock, pollution of the main database is prevented. At some point it'll be nice to have some form of caching, which is what #86184 is about.
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @dr.sybren
Added subscriber: @mont29
#Core module should have been tagged here, this falls directly under its umbrella.
While I am not especially thrilled to add even more complexity to ID management, I can see how this might be useful... But it should be fully decoupled/isolated from data in Main data-base. Would suggest the following requirements:
Main
container.session_uuid
(we do not want them to increase this global counter).You're right, thanks for doing so.
I intend to use the animation system FCurve evaluation functions for this, and not the depsgraph:
I agree, although it probably shouldn't be the only available API for this. It should be possible to do something like this in a modal operator:
Of course I agree with everything else you wrote that I didn't quote here.
OK then this should play nicely with action being fully outside of current Main data-base.
This should be doable with a context manager too? I mean, one can still
open()
a file, do whatever with the returned value, and close it themselves right?I would keep it hidden/advanced way to deal with it though (so just having to explicitly call
__enter__()
and__exit__()
functions).One could even argue that the underlying code should be the one to be smart here, caching the libs, so that re-creating the context would be almost for free?
On a side note, I don't think we should lock ourselves to Actions for PoseLib here. Can imagine similar needs/processes for e.g. pre-visualizing a texture in a shader, or a whole shader on an object, etc.?
Yes, but that's because
open()
returns an object that can be used both as a file and as a context manager. This isn't a property of context managers in general.I'm afraid that that'll produce some nasty mistakes, as I don't expect people to understand which parameters exactly to pass to
__exit()__
under which conditions. That could be solved with proper documentation & examples, though.For sure, that's what I wrote #86184 (Asset System: cache temp-loaded datablocks) for ;-)
With D10736: BLO: Functions for temporarily loading a single datablock having landed in master, this task is complete.
Changed status from 'Confirmed' to: 'Resolved'