aws-deadline / deadline-cloud-for-maya

AWS Deadline Cloud for Maya
Apache License 2.0
11 stars 16 forks source link

Bug: Submitter not updating render settings after saving scene #167

Open alichiba opened 2 months ago

alichiba commented 2 months ago

Expected Behaviour

A Maya scene is opened and the integrated submitter for Deadline Cloud is opened. User closes the integrated submitter window, goes back to the scene and make changes to the render settings (add a new camera and change image size), saves the scene, then opens the integrated submitter for Deadline Cloud again. The changes to the render settings should be reflected in the integrated submitter after saving the scene.

Current Behaviour

A Maya scene is opened and the integrated submitter for Deadline Cloud is opened. User closes the integrated submitter window, goes back to the scene and make changes to the render settings (add a new camera and change image size), saves the scene, then opens the integrated submitter for Deadline Cloud again. The new renderable camera is not listed as an option in the integrated submitter. After submitting the scene to Deadline Cloud after opening the submitter the second time, it shows that the image size was not updated in the job parameters either. These changes will only be reflected in the submitter if Maya is closed and reopened, or if the scene is saved under a different name.

First image shows the newly added camera1 is listed in the render settings, but not listed in the submitter after saving the scene. Second image shows the job parameters of the job submitted after saving the scene in the Deadline Cloud monitor beside the Maya render settings. Screenshot 2024-08-08 at 3 33 30 PM image

Reproduction Steps

Recreated using Maya 2024 on Windows and MacOS, using current version of deadline-cloud-for-maya.

  1. Open a Maya scene
  2. Open the Deadline Cloud integrated submitter from within Maya (does not matter whether you submit a job or not)
  3. Close the integrated submitter window
  4. Make changes to the scene. Add a camera, open the render settings window and add that new camera as a renderable camera, and change the image size.
  5. Save the scene.
  6. Open the Deadline Cloud integrated submitter again to see if the camera list has been updated.
  7. Submit the job from the submitter and look at the job parameters in the Deadline Cloud monitor to see if the image dimensions have been updated.

Code Snippet

Tried running the commands of get_renderable_camera_names() from cameras.py in Maya's script editor which returned the correct list of renderable cameras.

get_renderable_camera_names() is called from within show_maya_render_submitter() in maya_render_submitter.py

show_maya_render_submitter() is created in line 66 of mel_commands.py. From adding logger.info() to each section of the if else block starting on line 63, it appears that when the integrated submitter is opened for the first time, it enters the else block, but after closing, saving the scene and reopening, it enters the if block despite the submitter being closed. This means, it does not make a call to show_maya_render_submitter() which would fetch the new render settings.