Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workfile Templates: add event system to Workfile Template Builder #426

Merged

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Apr 17, 2024

Changelog Description

Add an EventSystem to the workfile template builder for placeholder plug-ins to register to.

From a placeholder plug-in you can now register to events:

def callback(event):
    print(event.data["depth"])
    print(event.data["placeholders_by_scene_id"])

class MyPlaceholderPlugin(...):
    def populate_placeholder(self, placeholder):
        self.register_on_finished_callback(placeholder, callback)
        self.register_on_depth_processed_callback(placeholder, callback)

Additional info

This is separated from #327 to make smaller PRs. Due to the event system being implemented here in isolation it may be hard to do a test run.

Once this is merged and #425 is merged I'll make follow-up PRs for Maya for plug-ins that actually use the event system.

Testing notes:

  1. Workfile templates should still work.
  2. Code should be reviewed.

@BigRoy BigRoy requested a review from iLLiCiTiT April 17, 2024 22:02
@ynbot ynbot added size/XS type: enhancement Improvement of existing functionality or minor addition labels Apr 17, 2024
@BigRoy BigRoy changed the title Workfile templates: add event system to Workfile Template Builder Workfile Templates: add event system to Workfile Template Builder Apr 17, 2024
@BigRoy BigRoy requested a review from iLLiCiTiT April 18, 2024 10:11
@iLLiCiTiT iLLiCiTiT merged commit 8e7913f into ynput:develop Apr 30, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants