From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

[edit] Pose Library rework

The goal of this document is to serve as a foundation for a refresh of the Pose Library.


[edit] Creating / editing a pose library

Currently there are two workflows for pose library creation.

  • Via the Pose Library panel.
    1. User creates a new Pose Library action
    2. User poses the armature
    3. User clicks the + button (bpy.ops.poselib.pose_add())
    4. Blender keys all bones
    5. User cleans up the created keyframes (in the action editor)
    6. User doubleclicks the name of the pose
    7. User enters a new name
    8. Repeat from step 2 until all poses are created
  • Via the Action Editor.
    1. User creates a new action
    2. User poses the armature
    3. User creates keyframes, one frame per pose
    4. User adds & names a Pose Marker in the Action Editor
    5. Repeat from step 2 until all poses are created
    6. User selects the action in the Pose Library panel
    7. User presses the Make action suitable for use as Pose Library button (bpy.ops.poselib.action_sanitize())
    8. User names all the poses

The advantage of the first approach is that it's explicit from the start that the user is working on a Pose Library. The user can also name a pose as soon as (s)he adds it to the pose library.

The advantage of the second approach is that the majority of the workflow uses familiar tools also used in other animation tasks. Furthermore, the user is free to key only those bones that need keying.

[edit] Issues and solutions

  • Bone selections. Currently the + creates a key for every single bone in the entire rig. Not only is this slow, it also makes it impossible to tell which bones were actuall intended to be part of this pose. As a solution we suggest only creating keys for select bones. ✓ In Master 601ce6a89c4f7ecc
  • Ordering. Currently poses cannot be ordered. This should be simple to implement by reordering the action markers. They can still mark the same frame in the action, only the internal ordering in the linked list needs to change. ✓ In Master 19268fbad

[edit] Preview generation

Currently the Pose Libary Preview system is an external add-on, and requires a lot of manual work.

A new system should use either OpenGL or Cycles/BI rendering.

  • Cycles/BI rendering could be done in background by another Blender process.
  • Since OpenGL is not available when running in background mode, OpenGL rendering happens on the animator's machine.
  • The choice between OpenGL and Cycles/BI needs to be made per scene or per pose library.

[edit] UI notes

Proposals for changes are shown in bold.

The Pose Library panel should show:

  • Pose library selector, filtered to only show Pose Library actions. This filter makes it impossible to select an existing non-pose-library action and press the Make action suitable for use as a Pose Library button. We suggest moving this button/operator to the Action Editor, as this is where all actions are available.
  • List of poses
  • Buttons to add/remove poses
  • Button to apply a pose (always to selected bones only) ✓ In Master 601ce6a89c4f7ecc
  • Buttons to reorder poses in this list ✓ In Master 19268fbad

When selecting a pose, show:

  • An empty preview, possibly defaulting to an OpenGL preview.
  • A camera selector (possibly defaulting to the current scene default camera? Or to the camera of the last-added pose?)

[edit] New & improved workflow

The same two workflows as before, with changes in bold

  • Via the Pose Library panel.
    1. User creates a new Pose Library action
    2. User chooses OpenGL or Cycles/BI rendering
    3. User poses the armature
    4. User clicks the + button (bpy.ops.poselib.pose_add())
    5. Blender keys only selected bones (or all, if none)
    6. If OpenGL was chosen, Blender automatically creates the preview
    7. User doubleclicks the name of the pose
    8. User enters a new name
    9. User assigns a camera (or accepts the default camera)
    10. Repeat from step 3 until all poses are created
    11. User presses the Generate Previews button if Cycles/BI render is desired
    12. Blender renders all previews in the background
  • Via the Action Editor.
    1. User creates a new action
    2. User poses the armature
    3. User creates keyframes, one frame per pose
    4. User adds & names a Pose Marker in the Action Editor
    5. User assigns a camera to the Action Marker
    6. Repeat from step 2 until all poses are created (steps 4/5 can also happen later/interleaved with other steps, but before step 7)
    7. User selects the action in the Pose Library panel
    8. User presses the Make action suitable for use as Pose Library button (bpy.ops.poselib.action_sanitize())
    9. User chooses OpenGL or Cycles/BI rendering
    10. User presses the Generate Previews button
    11. Blender renders all previews in the foreground (if OpenGL) or background (if real render)


[edit] Using a pose library

Typical workflow is:

  • User selects a rig
  • User selects a pose library
  • User selects a pose
  • User presses the Apply specified Pose Library pose to the rig button
  • Blender applies all the keys in the pose to the rig
  • User further adjusts the pose

[edit] Issues and solutions

  • Bone selections. Currently the pose is always applied to all bones. A solution would be to only apply the pose to selected bones (and to all if none are selected). (was already in master) ✓ In Master
  • Apply mirrored. Currently a pose cannot be applied mirrored; if this intended, a workaround using copy & paste mirrored is required. This feature should be relatively simple to implement.
  • When selecting a pose library, all actions are listed. Showing only pose libraries would be a big improvement. Showing only those pose libraries that were created for the selected rig would be even better.

[edit] Preview presentation

Should use the Asset Engine system to display a panel of pose previews.

  • Group previews by camera
  • Show pose name, possibly overlayed on top of the image

[edit] Nice-to-haves

  • Rendering previews on a different machine.
  • Storing a hash of the pose, so that previews can be generated automatically when they are outdated. At least this can be used to show a "preview needs to be updated" warning.
  • Multiple previews per pose. So far the only useful application if this seems to be different resolutions.