Skip to content

Conversation

@henriknorin-ftrack
Copy link
Contributor

Resolves :

  • CLICKUP-
  • FT-
  • SENTRY-
  • ZENDESK-
  • I have added automatic tests where applicable.
  • The PR contains a description of what has been changed.
  • The description contains manual test instructions.
  • The PR contains update to the release notes.
  • The PR contains update to the documentation.

This PR has been tested on :

  • Windows.
  • MacOs.
  • Linux.

Changes

Test

@henriknorin-ftrack henriknorin-ftrack requested a review from a team as a code owner June 11, 2024 13:40
@henriknorin-ftrack henriknorin-ftrack changed the title Backlog/framework loader henrik feat: Backlog/framework loader henrik Jun 11, 2024
@github-actions
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  libs/framework-core/source/ftrack_framework_core/engine
  __init__.py 202
Project Total  

This report was generated by python-coverage-comment-action

@henriknorin-ftrack henriknorin-ftrack changed the base branch from main to backlog/framework-loader June 11, 2024 13:42
Comment on lines 201 to 210
self._event_hub_thread = _EventHubThread(self._remote_session)

if not self._event_hub_thread.is_alive():
self.logger.debug(
'Starting new hub thread for {}'.format(self)
)
self._event_hub_thread.start()

# Make sure it is shutdown
atexit.register(self.close)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can try to create a remote event manager so the _EventHugThread is handled there.

Comment on lines 17 to 24
if not entities and False:
# Mock for now
entities = [
{
'entity_id': 'a66902b4-987c-4ca0-ba39-87be4798f227',
'entity_type': 'Component',
}
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this now.

def build_ui(self):
# Check entities
# Select the desired tool_config
tool_config_message = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach decided on the meeting:
The dialog contains the function to filter out the tool_configs based on the compatible:file_types keys from the tool_config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving logic to a is_compatible class function

Comment on lines 4 to 18
options:
file_types:
- ".png"
- ".jpg"
- ".jpeg"
- ".exr"
- ".tif"
- ".tiff"
- ".tga"
- ".bmp"
- ".hdr"
- ".dpx"
- ".cin"
- ".psd"
- ".tx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace it by compatible....

Comment on lines 205 to 214
startup_tools.append(
[
name,
label,
run_on == "startup",
action,
dialog_name,
options,
]
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will improve this with the separated actions, and run_tool. But that will happen on the base branch.

henriknorin-ftrack and others added 9 commits June 12, 2024 13:50
…ialog.py

Co-authored-by: Lluis Casals Marsol <112543804+lluisFtrack@users.noreply.github.com>
…ialog.py

Co-authored-by: Lluis Casals Marsol <112543804+lluisFtrack@users.noreply.github.com>
…ialog.py

Co-authored-by: Lluis Casals Marsol <112543804+lluisFtrack@users.noreply.github.com>
…ialog.py

Co-authored-by: Lluis Casals Marsol <112543804+lluisFtrack@users.noreply.github.com>
…ialog.py

Co-authored-by: Lluis Casals Marsol <112543804+lluisFtrack@users.noreply.github.com>
Co-authored-by: Lluis Casals Marsol <112543804+lluisFtrack@users.noreply.github.com>
# Inject the entity data into the context plugin
if 'options' not in context_plugin:
context_plugin['options'] = {}
context_plugin['options'].update(self.dialog_options)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we try then to be more specific? so instead of passing the self.dialog_optins pass the self.dialog_options.get('event_data')

Comment on lines 32 to 33
options:
name: "Nuke image loader"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we passing name inside options? Is this really needed?
Can't you put logic inside the plugin or the widget to get the name instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to extract label from tool config name

Copy link
Contributor

@lluisCM lluisCM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to be tested on the final QA

@henriknorin-ftrack henriknorin-ftrack merged commit 721bb3c into backlog/framework-loader Jun 18, 2024
@henriknorin-ftrack henriknorin-ftrack deleted the backlog/framework-loader-henrik branch June 18, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants