Hi all,
I am using this python snippet to get the latest version for a given shot id:
filters = [['entity', 'is', {'type':'Shot', 'id':shotID}]]
columns = ['code', 'sg_path_to_frames', 'sg_path_to_frames_assembly', 'sg_first_frame', 'sg_last_frame', 'sg_task']
order = [{'field_name':'created_at','direction':'desc'}]
version = self.CONNECT.find_one('Version', filters, columns, order)
I’d like to add a filter, e.g. to only return the latest comp version, i.e. a version linked to a comp task of the pipeline step “comp”.
I tried this filter as a test:
filters = [['entity', 'is', {'type':'Shot', 'id':shotID}], ['sg_task.Task.step.name', 'is', 'Comp']]
but the step.name causes this error:
shotgun_api3.shotgun.Fault: API read() Task.step expected [Hash,
HashWithIndifferentAccess,
ActionController::ParamsHashWithIndifferentAccess,
NilClass] data type(s) but got String:
"Comp"
I’m not sure why the data type for a pipeline step name is not a string, what am I missing?
Cheers,
frank