Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Retrieve samples parameter on 'comp.task' RPC #4115

Merged
merged 3 commits into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/blender/task/blenderrendertask.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ class BlenderRenderTaskBuilder(FrameRenderingTaskBuilder):
def build_dictionary(cls, definition):
dictionary = super().build_dictionary(definition)
dictionary['options']['compositing'] = definition.options.compositing
dictionary['options']['samples'] = definition.options.samples
return dictionary

@classmethod
Expand Down
12 changes: 11 additions & 1 deletion tests/apps/blender/task/test_blenderrendertask.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ def _task_dictionary(self):
"resolution": [
320,
240
]
],
"samples": 150
}
}

Expand All @@ -666,6 +667,15 @@ def test_build(self):
blender_task = builder.build()
self.assertIsInstance(blender_task, BlenderRenderTask)

def test_build_dictionary_samples(self):
task_type = BlenderTaskTypeInfo()
task_dict = self._task_dictionary
samples = task_dict.get('options').get('samples')
dictionary = BlenderRenderTaskBuilder.build_full_definition(
task_type, task_dict)
result = BlenderRenderTaskBuilder.build_dictionary(dictionary)
self.assertEqual(result['options']['samples'], samples)

def test_build_correct_format(self):
task_type = BlenderTaskTypeInfo()
task_dict = self._task_dictionary
Expand Down