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

Publisher: Add thumbnail sources #4042

Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Oct 28, 2022

Brief description

Added option to enter a thumbnail in Publisher UI.

Description

Publisher UI has thumbnail widget in create and publish pages. By dropping image/video source file to the area is created thumbnail. In Publish view is the thumbnail assigned to all selected instances (or context) and in create view is passed to create method with pre create data. Creators can enable/disable option to drop thumbnail before creation which is disabled by default -> this is new feature which is not ready to use by default and creators must be ready for that. Thumbnails are kept until publisher UI is closed. At that moment are thumbnails removed (only thumbnails created by Publisher).

Thumbnails are stored to CreatedContext because it's only place that can be accessed in UI and during publishing. They're stored by instance id and each value should have path to a file.

It is possible to set thumbnail on context. In that case is the context thumbnail used as default for all instances. This logic is handled in integration part. Thumbnail integrator was changed to context plugin without any family filters.

Additional information

Publisher UI can't know which instances after creation should have the thumbnail because creator can create 0-∞ instances.
Dropped files are converted using oiiotool or ffmpeg. If the conversion cannot be done an error message is shown.

For precreate data was prepared constant PRE_CREATE_THUMBNAIL_KEY under which is stored the path to thumbnail during creation. Creator (if want's to use the value) should call set_instance_thumbnail_path with instance id and thumbnail path where the thumbnail should be created.

Hover color of buttons is now defined with RGB instead of RGBA (alpha did some bad behavior).

Testing notes:

  1. Open TrayPublisher
  2. Select one of creators which support thumbnail drop (e.g. Image)
  3. Fill representation files (Do not fill review representation)
  4. Drop the thumbnail to widget
  5. Create instance
  6. Hit publish
  7. Check if thumbnail is integrated

The UI should be tested in Nuke and Houdini as the Thumbnail logic may not show right way.

Copy link
Member

@mkolar mkolar left a comment

Choose a reason for hiding this comment

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

Pretty good overall, just a few notes for the first version of this.

  1. We need a small corner button to clear the thumbnail once it was added.
  2. Use the same border as on other drag-n-drop areas to communicate to option clearly.
  3. Let's change the thumbnail not applicable image to something more subtle. I'd remove the placeholder completely if it's not supported

@iLLiCiTiT
Copy link
Member Author

image
image

Changed background color of thumbnails widget to look like input (with dashes). Added checkerboard under transparent images (only under their size). Added clear button to "remove" thumbnail -> has same backgroung color as thumbnails widget (dark) and icon is selected card color (blue). The default image is scaled down.

@iLLiCiTiT iLLiCiTiT requested a review from mkolar October 31, 2022 17:56
mkolar
mkolar previously requested changes Oct 31, 2022
Copy link
Member

@mkolar mkolar left a comment

Choose a reason for hiding this comment

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

Looking good. We should however deal with the thumbnail integrator. it currently only triggers on review, which is really confusing with this update.

@iLLiCiTiT iLLiCiTiT requested a review from mkolar November 1, 2022 10:36
Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

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

If a reload button is pushed at publisher a previously dropped thumbnail is lost and it needs to be dropped again.

@iLLiCiTiT
Copy link
Member Author

If a reload button is pushed at publisher a previously dropped thumbnail is lost and it needs to be dropped again.

Should be fixed

@jakubjezek001 jakubjezek001 dismissed mkolar’s stale review November 1, 2022 19:21

change for review family filter was removed

@iLLiCiTiT iLLiCiTiT merged commit 39f9737 into develop Nov 3, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/OP-4185_TrayPublisher-Only-thumbnail-as-review branch November 3, 2022 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants