Skip to content

Generalize "Increment Workfile" to core plug-in #1636

@BigRoy

Description

@BigRoy

Is there an existing issue for this?

  • I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?

A lot of DCCs have a "Save Scene" and an optional "Increment Workfile" context plug-in that just use the registered_host().save_workfile() calls - as such, this could be generalized to core without the need to duplicate that code to all hosts.

How would you imagine the implementation of the feature?

Likely have a global plug-in.

The complexity in is knowing for which hosts it's relevant or not. Because there may be some that would still want to roll their own. And we don't want to have hosts = [a, b, c, d] list in core we suddenly need to maintain for all hosts.

Another approach could be to just have a core library plug-in that you can just inherit from or expose in your plug-ins for a host. So that e.g. you just do:

# ayon-{dcc}/client/plugins/publish/core_plugins.py
from ayon_core.pipeline.plugins import SaveScene, IncrementWorkfile

So that you can expose them specifically for that host, but have the code shared from core instead so that if API changes we're more freely to move with it per DCC instead of having to change it 10s of places.

Are there any labels you wish to add?

  • I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

No response

Additional context:

Came up here: ynput/ayon-aftereffects#60 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementImprovement of existing functionality or minor addition

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions