-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add frame range to Blender command in CueSubmit #1337
Changes from 9 commits
2009e12
2ff33f5
29fdbeb
507a11a
ce618a0
3c0f2ff
d3d7c6d
2d254c7
2d4ba88
a17be62
ee2af1e
41b6e81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,25 @@ | |
'services': ['nuke'], | ||
} | ||
|
||
BLENDER_MULTI_LAYER_DATA = { | ||
'name': 'arbitraryBlenderLayer_name', | ||
'layerType': cuesubmit.JobTypes.JobTypes.BLENDER, | ||
'cmd': {'outputPath': '/path/to/output', | ||
'blenderFile': '/path/to/scene.blend', | ||
'outputFormat': 'PNG'}, | ||
'layerRange': '3-9', | ||
'cores': '2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need to add a I think this is causing the job to default to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bcipriano noted, didn't catch that one. 😄 A new set of unit test failures seem to be coming from some unrelated changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry about that, I'm fixing the pipeline on muster There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pipeline fixed by #1360 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted @DiegoTavares, thanks for the update! |
||
} | ||
|
||
BLENDER_SINGLE_LAYER_DATA = { | ||
'name': 'arbitraryBlenderLayer_name', | ||
'layerType': cuesubmit.JobTypes.JobTypes.BLENDER, | ||
'cmd': {'outputPath': '/path/to/output', | ||
'blenderFile': '/path/to/scene.blend', | ||
'outputFormat': 'PNG'}, | ||
'cores': '2' | ||
} | ||
|
||
SHELL_LAYER_DATA = { | ||
'name': 'arbitraryShellLayer_name', | ||
'layerType': cuesubmit.JobTypes.JobTypes.SHELL, | ||
|
@@ -109,6 +128,55 @@ def testSubmitNukeJob(self, launchMock): | |
self.assertEqual(NUKE_LAYER_DATA['layerRange'], layer.get_frame_range()) | ||
self.assertEqual('nuke', layer.get_service()) | ||
|
||
def testSubmitSingleFrameBlenderJob(self, launchMock): | ||
cuesubmit.Submission.submitJob({ | ||
'name': 'arbitrary-blender-job', | ||
'shot': 'arbitrary-shot-name', | ||
'show': 'arbitrary-show-name', | ||
'username': 'arbitrary-user', | ||
'layers': [cuesubmit.Layer.LayerData.buildFactory(**BLENDER_SINGLE_LAYER_DATA)], | ||
}) | ||
|
||
ol = launchMock.call_args[0][0] | ||
self.assertEqual(1, len(ol.get_layers())) | ||
layer = ol.get_layer(BLENDER_SINGLE_LAYER_DATA['name']) | ||
self.assertEqual(BLENDER_SINGLE_LAYER_DATA['name'], layer.get_name()) | ||
self.assertEqual( | ||
[ | ||
'blender', '-b', '-noaudio', BLENDER_SINGLE_LAYER_DATA['cmd']['blenderFile'], | ||
'-o', BLENDER_SINGLE_LAYER_DATA['cmd']['outputPath'], | ||
'-F', BLENDER_SINGLE_LAYER_DATA['cmd']['outputFormat'], | ||
'-f', '#IFRAME#' | ||
], | ||
layer.get_arg('command') | ||
) | ||
self.assertEqual('blender', layer.get_service()) | ||
|
||
def testSubmitMultiFrameBlenderJob(self, launchMock): | ||
cuesubmit.Submission.submitJob({ | ||
'name': 'arbitrary-blender-job', | ||
'shot': 'arbitrary-shot-name', | ||
'show': 'arbitrary-show-name', | ||
'username': 'arbitrary-user', | ||
'layers': [cuesubmit.Layer.LayerData.buildFactory(**BLENDER_MULTI_LAYER_DATA)], | ||
}) | ||
|
||
ol = launchMock.call_args[0][0] | ||
self.assertEqual(1, len(ol.get_layers())) | ||
layer = ol.get_layer(BLENDER_MULTI_LAYER_DATA['name']) | ||
self.assertEqual(BLENDER_MULTI_LAYER_DATA['name'], layer.get_name()) | ||
self.assertEqual( | ||
[ | ||
'blender', '-b', '-noaudio', BLENDER_MULTI_LAYER_DATA['cmd']['blenderFile'], | ||
'-o', BLENDER_MULTI_LAYER_DATA['cmd']['outputPath'], | ||
'-F', BLENDER_MULTI_LAYER_DATA['cmd']['outputFormat'], | ||
'-s', '#FRAME_START#', '-e', '#FRAME_END#', '-a' | ||
], | ||
layer.get_arg('command') | ||
) | ||
self.assertEqual(BLENDER_MULTI_LAYER_DATA['layerRange'], layer.get_frame_range()) | ||
self.assertEqual('blender', layer.get_service()) | ||
|
||
def testSubmitMayaAndShellJob(self, launchMock): | ||
cuesubmit.Submission.submitJob({ | ||
'name': 'arbitrary-maya-shell-job', | ||
|
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.
It would be great if you could add unit tests to cover both the single-frame and start/end frame cases.
https://github.com/AcademySoftwareFoundation/OpenCue/blob/master/cuesubmit/tests/Submission_tests.py
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.
Added in 2d4ba88
@bcipriano however, I'm having a bit of trouble with lines #178 and #153 of Submission_tests.py
The test fails when I set it to
blender
but passes when I set it toshell
. This is despite the layerType being set as Blender. Any thoughts on this?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.
Ping @bcipriano