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

Promote information to be shown on instance label in Publisher #136

Open
antirotor opened this issue Feb 28, 2024 · 6 comments · May be fixed by #167
Open

Promote information to be shown on instance label in Publisher #136

antirotor opened this issue Feb 28, 2024 · 6 comments · May be fixed by #167
Assignees
Labels
backlog added into backlog

Comments

@antirotor
Copy link
Member

antirotor commented Feb 28, 2024

We need to be able to display more information on instance label in publisher than just it's name.

image

In this case for example renderCompositingMain could show there also frame range or some badge that review will be created.

What information shown there could be decided by plugins themselves. But how to solve conflicting interests, available ways to show things, etc. is up to the implementation.

[cuID:AY-2474]

@jakubjezek001 jakubjezek001 added the backlog added into backlog label Feb 28, 2024
@MustafaJafar MustafaJafar added type: feature Adding something new and exciting to the product and removed feature labels Jul 11, 2024
@dee-ynput
Copy link

Related to #167 but not linked (yet?)

@iLLiCiTiT
Copy link
Member

Should the value change based on changes in creator attributes?
Should be the label stored in scene?
Do we have any other use-case in mind?

@BigRoy
Copy link
Collaborator

BigRoy commented Oct 18, 2024

Should the value change based on changes in creator attributes?

Yes, please.

Should be the label stored in scene?

I'm fine with the creator being able to compute/define it dynamically.

Do we have any other use-case in mind?

It may be more than 'label' but just showing metadata like start frame, end frame, colorspace or whatever would be nice to 'promote' and visually show on the instance for easy debugging. However, once we go down that route I feel we may first need some 'redesign' to pinpoint WHAT makes sense in design?

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Nov 1, 2024

I'm fine with the creator being able to compute/define it dynamically.

I can't do it dynamic if it would be based on transient data (I don't can't listen to changes there). So I guess it would be some additional key on instance data? Or it can be specific method on instance (that would store it to transient data, but also trigger event).

It may be more than 'label' but just showing metadata like start frame, end frame, colorspace or whatever would be nice to 'promote' and visually show on the instance for easy debugging. However, once we go down that route I feel we may first need some 'redesign' to pinpoint WHAT makes sense in design?

So it might be more than one line of information? Wouldn't that make the UI more "messy"?

This is how UI showed it in draft PR
Image

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 1, 2024

I can't do it dynamic if it would be based on transient data (I don't can't listen to changes there). So I guess it would be some additional key on instance data? Or it can be specific method on instance (that would store it to transient data, but also trigger event).

I meant that it could be up to the creator to just set attributes that are related to the label. I've tested this recently and it already works - I can set any custom label on a CreatedInstance and update that dynamically as a response from a registered callback.

For example I had this:

        # Add the folder path to the instance name as a label
        # if it does not match the current context to identify
        # it is publishing elsewhere. Especially useful with multi-shot
        # workflows
        folder_path = instance.get("folderPath", "")
        if folder_path != self.create_context.get_current_folder_path():
            product_name = instance.get("productName", "")
            instance["label"] = f"{product_name} ({folder_path})"

    def register_callbacks(self):
        """Register Houdini specific callbacks for context creation."""
        self.create_context.add_value_changed_callback(
            self._on_value_changed
        )

    def _on_value_changed(self, event):
        """Update the label of the instance on folder path changes"""
        for change in event.data["changes"]:
            if not change.get("instance"):
                continue

            instance: CreatedInstance = change["instance"]
            if instance.creator_identifier != self.identifier:
                continue

            if "folderPath" not in change["changes"]:
                continue
            self.read_custom_data(instance)

And the of course the creator's create() and collect_instances() also set the label initially.
Which looked like:
Image


I figured this issue initially was by making the cards more useful by default to e.g. always display things like frame metadata, folder, etc. so that one could easily spot the most common 'uniqueness'. Which I'd expect indeed be more of a design question then just textual update on the label?

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 5, 2024

Just wanted to mention this issue: ynput/ayon-houdini#155

It may overlap (or even be solved) by UX changes from this issue - if e.g. the instance cards could help identify which scene node/instance it would be.

So just referencing it as a potential production use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog added into backlog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants