Design task for shot tools #83591
Labels
No Label
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Content
Type
Design
Type
Report
Type
To Do
Type
Web Development
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/blender-studio#83591
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Project Description
Shot Builder is an Add-on that helps studios to work with task specific
Blend-files. The shot builder is part of the shot-tools repository. The main functionalities are
edit.blend
.Design Principles
The main design principles are:
Connectors
Connectors are components that can be used to read or write to files or
systems. The connectors will add flexibility to the add-on so it could be used
in multiple productions or studios.
In the configuration files the TD can setup the connectors that are used for
the production. Possible connectors would be:
Layering & Hooks
The configuration of the tool is layered. When building a work file for a sequence
there are multiple ways to change the configuration.
For any combination of these configurations hooks can be defined.
Data
All hooks must have Python’s
**kwargs
parameter. Thekwargs
containsthe context at the moment the hook is invoked. The context can contain the
following items.
production
:shot_tools.Production
: Include the name of the productiontask
:shot_tools.Task
: The task (combination of task_type and shot)task_type
:shot_tools.TaskType
: Is part of thetask
.sequence
:shot_tools.Sequence
: Is part ofshot
.shot
:shot_tools.Shot
Is part oftask
.asset
:shot_tools.Asset
: Only available during asset loading phase.asset_type
:shot_tools.AssetType
: Only available during asset loading phase.Execution Order
The add-on will internally create a list containing the hooks that needs to be
executed for the command in a sensible order. It will then execute them in that
order.
By default the next order will be used:
A hook with a single ‘match’ rule will be run in the corresponding phase. A hook with multiple ‘match’ rules will be run in the last matching phase. For example, a hook with ‘asset’ and ‘task type’ match rules will be run in the ‘task type’ phase.
Events
Order of execution can be customized by adding the optional
run_before
or
run_after
parameters.Events could be:
shot_tools.events.BuildStart
shot_tools.events.ProductionSettingsLoaded
shot_tools.events.AssetsLoaded
shot_tools.events.AssetTypeOverrides
shot_tools.events.SequenceOverrides
shot_tools.events.ShotOverrides
shot_tools.events.TaskTypeOverrides
shot_tools.events.BuildFinished
shot_tools.events.HookStart
shot_tools.events.HookEnd
During usage we should see which one of these or other events are needed.
shot_tools.events.BuildStart
,shot_tools.events.ProductionSettingsLoaded
and
shot_tools.events.HookStart
can only be used in therun_after
parameter.
shot_tools.events.BuildFinished
,shot_tools.events.HookFinished
can only be used in the
run_before
parameter.API
The shot builder has an API between the add-on and the configuration files. This
API contains convenience functions and classes to hide complexity and makes
sure that the configuration files are easy to maintain.
This API is structured/implemented in a way that it keeps track of what
is being done. This will be used when an error occurs so a descriptive
error message can be generated that would help the TD to solve the issue more
quickly. The goal would be that the error messages are descriptive enough to
direct the TD into the direction where the actual cause is. And when possible
propose several solutions to fix it.
Setting up the tool
The artist/TD can configure their current local project directory in the add-on preferences. This can then be used for new blend files. The project associated with an opened (so existing) blend file can be found automatically by iterating over parent directories until a Shot Builder configuration file is found. Project-specific settings are not configured/stored in the add-on, but in this configuration file.
The add-on will look in the root of the production repository to locate the
main configuration file
shot-builder/config.py
. This file contains generalsettings about the production, including:
tasks.py
,assets.py
) relative to theshot-builder
directory of the production.Usage
Any artist can open a shot file via the
File
menu. A modal panel appearswhere the user can select the task type and sequence/shot. When the file
already exists, it will be opened. When the file doesn't exist, the file
will be built.
In the future other use cases will also be accessible, such as:
Open Issues
Security
Added subscribers: @Jeroen-Bakker, @dr.sybren, @fsiddi, @eyecandy
Use Module.
Unload modules at the end.
production_settings
hook.Design task for shot tools [DRAFT]to Design task for shot toolsChanged status from 'Needs Triage' to: 'Resolved'