-
Notifications
You must be signed in to change notification settings - Fork 129
Conversation
Task linked: OP-3102 Maya image plane load error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why these error popped up, but I've tested it in Maya 2020 and 2022. This fixes them by sort of ignoring.
I think this might be due to some Maya version having a bug where the Frame extension expression just didn't get created correctly - I believe it was on some Maya 2020 and 2022 versions but not all of them.
The fix seems a bit too unspecific. These seems more explicit:
expressions = image_plane_shape.listConnections(type="expression")
if expressions:
pm.delete(expressions)
if not image_plane_shape.frameExtension.isFreeToChange():
raise RuntimeError("Can't set frame extension for {}".format(image_plane_shape))
image_plane_shape.frameExtension.set(start_frame)
Also, I'd even recommend making sure we get the right expression:
expressions = image_plane_shape.frameExtension.inputs(type="expression")
if expressions:
pm.delete(expressions)
if not image_plane_shape.frameExtension.isFreeToChange():
raise RuntimeError("Can't set frame extension for {}".format(image_plane_shape))
image_plane_shape.frameExtension.set(start_frame)
Thoughts?
If the user is expecting a frame hold I'd like it to be explicit if it can't perform what the loader was expected to do, like setting the start frame.
try: | ||
image_plane_shape.frameExtension.set(start_frame) | ||
except RuntimeError: | ||
# happens when frame extension is locked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is this ever locked on load?
I somewhat agree - as long as "update" doesn't change it again it seems like something that the user can somewhat manage themselves. However, selecting that initial camera you'd want to add it to - you might still need that. |
Sure. I meant only the two options below the camera selection
the first one is crashing (at least in Maya2023 |
How do you mean? It should do something. If it doesn't it's a bug. You can set up a Maya image plane to only show in one viewport to which it is connected or whether to show in all viewports so I'm suspecting that's what it was intended for. |
Think you'll need to battle it out with @ClementHector |
I don't agree to delete them, of course the user can do it manually. |
I agree with @m-u-r-p-h-y with this one. Interface wise it is arbitrarily picking two attributes out of dozens and showing them in the loading process. The fact that these two are important for studio A, doesn't mean they are important for studio B. Hence it is more of a clutter than efficiency increase I feel. Regarding leaving them in code, but removing in the interface. I'm ok doing that at this point considering they are already used in production and you are most probably using it in the templates. However, it is the same problem with arbitrarily picking attributes and promoting them to the templates. I'd say that it uncovers the fact that using locators as the placeholders in the templates might not be enough and we should consider allowing other nodes to be placeholders too. In this case it would be much better to have |
@mkolar did you mean to close the issue? |
@mkolar If this is annoying for you I will make another specific loader for our studio. This may be the best solution? |
Sorry guys. I misclicked and totally didn't realise I closed this. My bad and it wasn't the intention at all. |
It's not annoying, but it is quite arbitrary and I'd say better solved by custom loader as you say. |
@antirotor could we have a look at finishing this up please? |
Closing this PR as it doesn't solve issues with it and it needs to be solved another way. |
Fix
This is fixing some error when trying to load exr sequence as image plane in Maya.
Testing:
Not sure why these error popped up, but I've tested it in Maya 2020 and 2022. This fixes them by sort of ignoring.