Extensions
You can now create custom extensions for PoseWrangler so you can introduce new features without having to edit the core code base.
Custom extensions can be created by inheriting from the following class:
- class pose_wrangler.v2.model.base_extension.PoseWranglerExtension(display_view=False, api=None)
Bases:
object
Base class for extending pose wrangler with custom utilities that can be dynamically added to the UI
- property api
Get the current API
- Returns
Reference to the main API interface
- Return type
- property view
Get the current view widget. This should be overridden by custom extensions if you wish to embed a UI for this extension into the main PoseWrangler UI
- Returns
Reference to the PySide widget associated with this extension
- Return type
QWidget or None
- execute(context=None, **kwargs)
Generic entrypoint for executing the extension
- Param
context: pose wrangler context containing current solver and all solvers
- on_context_changed(new_context)
Context event called when the current solver is set via the API
- Parameters
new_context (pose_wrangler.v2.model.context.PoseWranglerContext or None) – pose wrangler context containing current solver and all solvers
When PoseWrangler loads up, it will automatically detect and load any classes that inherit from PoseWranglerExtension
on startup.
Note
To make sure that your extension loads, please make sure that it is imported before you start PoseWrangler.
Example extensions can be found under pose_wrangler.v2.extensions