ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
11 stars 9 forks source link

Houdini: Load products in active panel instead of a container group #13

Open MustafaJafar opened 5 months ago

MustafaJafar commented 5 months ago

Is there an existing issue for this?

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

Loading AYON products in Houdini is not much intuitive. As loaders put the loaded data in the container group instead of the current active panel.

Currently most Loaders load into a global AVALON_CONTAINERS subnetwork and you can't load them easily into your current working area.

Image Image

However, a Houdini artist would just expect to be able to load a product directly in the graph they are working.

Image

Also, let me quote BigRoy's comment:

makes me wonder a bit whether it's still worth it to put it inside that container group instead of trying to put it in an active matching panel or alike.

How would you imagine the implementation of the feature?

we can use something like this.

pane = stateutils.activePane(kwargs)
if isinstance(pane, hou.NetworkEditor):
    pwd = pane.pwd()
    pwd .createNode(node_type, node_name)

    # Imprint it manually
        data = {
            "schema": "openpype:container-2.0",
            "id": AVALON_CONTAINER_ID,
            "name": node_name,
            "namespace": namespace,
            "loader": str(self.__class__.__name__),
            "representation": context["representation"]["id"],
        }

        # todo: add folder="Avalon"
        lib.imprint(container, data)

Note that similar logic currently already exists for the Load Asset LOP loader and Load Shot LOP loader. Because there we 'load' into the current active panel, with just using a 'fallback' if needed - see the code here: https://github.com/ynput/ayon-houdini/blob/5443afad34cce11f79e7e6395b1417ee48ce4ce9/client/ayon_houdini/plugins/load/load_shot_lop.py#L23-L29

Are there any labels you wish to add?

Describe alternatives you've considered:

No response

Additional context:

No response

antirotor commented 1 month ago

This needs some more concrete plan

BigRoy commented 1 month ago

The dedicated Load Asset LOP has been doing this already.

Using the loader tries to find the "active LOP network", see code here. But of course, it being a dedicated HDA already helps tons, because you can just create the "loaded container" using TAB menu and configure it fully on the HDA.

This needs some more concrete plan

Could you elabore what part is lacking for you to plan this?

Lypsolon commented 2 weeks ago

@BigRoy i think ondra is not wrong there a simple screenshot or mock up would be great. i think i know what this is about from a talk a few days back but given the description i thing in a month time i would not be able to find it out without asking around.

BigRoy commented 2 weeks ago

@Lypsolon updated the description. Is it clear now?