OpenPype icon indicating copy to clipboard operation
OpenPype copied to clipboard

Maya: "Look" instance inside "Render" Instance causes Collecting errors during Pyblish of the Look/Render

Open LiborBatek opened this issue 3 years ago • 1 comments

I wanted publish look instance and also render turntable of the look via "Render" instance. So I did following...

Creating Look instance and Render instance using Creator in maya scene and then afterwards putting "Look" instance inside "Render" instance in Outliner (see Hierarchy below)

-RenderingMain -LookMain

...caused following collecting errors:

image

Message: 
'NoneType' object has no attribute 'group'
Line: 
115
Traceback: 
Traceback (most recent call last):
  File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
    runner(*args)
  File "D:\REPO\OpenPype\openpype\hosts\maya\plugins\publish\collect_render.py", line 115, in process
AttributeError: 'NoneType' object has no attribute 'group'

[cuID:OP-3941]

LiborBatek avatar Sep 08 '22 12:09 LiborBatek

Good catch!

To fix your particular case - that lookMain should go into the actual layer you'd like to attach it to. So for example into that Main set inside.

Nonetheless - this shows that the logic and error logging can be improved for the end user.

Likely it's best to log a clearer message self.log.warning("Ignoring invalid member of 'renderingMain': {}".format(layer)) or alike. And potentially highlight to the user that it should maybe be moved into the layer-specific sets inside of it.

BigRoy avatar Sep 08 '22 13:09 BigRoy

@LiborBatek was this issue resolved with #3816 and did that improve the logging message enough to be clear for the user?

image

BigRoy avatar Mar 26 '23 18:03 BigRoy

I did try both cases putting Look instance into RenderMain and next to it and gives no warning at all :) just publishes ok in both cases.

But I think it was resolved to work in both cases.

LiborBatek avatar Mar 27 '23 08:03 LiborBatek