Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

bugfix/image plane load error #4222

Merged
merged 16 commits into from
Dec 22, 2022

Conversation

moonyuet
Copy link
Member

Brief description

Fix the image plane load error

Description

Fix the bugs and remove some attributes according to #3256

Additional info

No additional info

Testing notes:

  1. Openpype -> Load and select exr sequence
  2. right mouse click to load the exrs as image plane sequence
  3. create a new camera

@ynbot
Copy link
Contributor

ynbot commented Dec 13, 2022

Task linked: OP-3304 Maya: image plane load error

@moonyuet moonyuet self-assigned this Dec 13, 2022
@moonyuet moonyuet added type: bug Something isn't working host: Maya labels Dec 13, 2022
@LiborBatek
Copy link
Member

Following the testing steps, it shows this error msg:
image

however the image sequence get connected to the selected cam (chosen during the loading action co connect imagePlane to my shot cam)
image

@LiborBatek
Copy link
Member

gives me the error even when creating new camera during loading action of imagePlane not trying to attach it to the existing camera (creating new one)
image

@moonyuet
Copy link
Member Author

gives me the error even when creating new camera during loading action of imagePlane not trying to attach it to the existing camera (creating new one) image
I have updated the PR to fix the setAttr issue. This could be because time1 node, which connects to the frameExtension of the image plane, doesn't allow to be deleted in maya. I can only disconnect the nodes instead of deleting it.

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

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

The error with frame.extension is not showing anymore so its fixed but there is still other issue with frame offset being wrong set to 1000.
PR4222_imagePlane_offset01
When manually set to correct value (zero) the image sequence being correctly set and visible.
image
Could be also just an issue in maya2023 not maya2022.
I think its necessary to keep default frame offset at zero value.

@LiborBatek
Copy link
Member

LiborBatek commented Dec 16, 2022

Tested it again in maya2022 frame offset being set to 1000 it shows image seq despite the offset value (it shouldnt be visible because of that offset) and behaves differently than in maya2023 were the image seq is not visible as its out of frame range (seq 1001-1005 being offset by another 1000). Seems like maya2022 bug to me which was fixed in maya2023. Anyways I propose to keep/set the offset at zero by defaults. User can offset it manually when needed...

@m-u-r-p-h-y
Copy link
Member

@LiborBatek can you check all items mentioned in the original issue #3256

set the frame offset to zero by default
@moonyuet
Copy link
Member Author

Tested it again in maya2022 frame offset being set to 1000 it shows image seq despite the offset value (it shouldnt be visible because of that offset) and behaves differently than in maya2023 were the image seq is not visible as its out of frame range (seq 1001-1005 being offset by another 1000). Seems like maya2022 bug to me which was fixed in maya2023. Anyways I propose to keep/set the offset at zero by defaults. User can offset it manually when needed...

I will remove or set the frameoffset to zero but maybe need to wait because currently i can't really commit to the code and it seems that I dont have the access right to push the latest codes to the PR

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

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

Did all tests in maya2022 and maya2023 now all correct. frame offset being kept at zero value. Also tested to load multiple imagePlanes on the same camera and all worked fine.
Went through old PRs to see if anything was not left out for consideration. Seems ok to me.

@LiborBatek LiborBatek marked this pull request as ready for review December 16, 2022 15:51
Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

The cancel button is still not working
image

Traceback (most recent call last):
  File "D:\REPO\OpenPype\openpype\tools\loader\widgets.py", line 1578, in _load_representations_by_loader
    options=options
  File "D:\REPO\OpenPype\openpype\pipeline\load\utils.py", line 299, in load_with_repre_context
    return loader.load(repre_context, name, namespace, options)
  File "D:\REPO\OpenPype\openpype\hosts\maya\plugins\load\load_image_plane.py", line 112, in load
    camera = camera_names[window.camera]
KeyError: None

Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

Now there is no error appearing after pressing the Cancel button, but nothing is happening, the dialog is still there.

image

@moonyuet
Copy link
Member Author

moonyuet commented Dec 20, 2022

Now there is no error appearing after pressing the Cancel button, but nothing is happening, the dialog is still there.

image

let's try the simplest way to just close the dialog to see if it can be "closed" by cancel button and also cancel to choose any camera. It is in the updated PR, and it is supposed that the cancelButton can be closed as usual.

Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

the Cancel button works now . . . :)

Comment on lines 111 to 114
try:
camera = camera_names[window.camera]
except KeyError:
pass
Copy link
Member

@iLLiCiTiT iLLiCiTiT Dec 20, 2022

Choose a reason for hiding this comment

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

Suggested change
try:
camera = camera_names[window.camera]
except KeyError:
pass
# Skip if no camera was selected (Dialog was closed)
if window.camera not in camera_names:
return
camera = camera_names[window.camera]

@antirotor antirotor merged commit e377b03 into develop Dec 22, 2022
@github-actions github-actions bot added this to the next-patch milestone Dec 22, 2022
@antirotor antirotor deleted the bugfix/OP-3304_maya-image_plane_load_error branch December 22, 2022 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants