Hi guys, I have a few question on the Event plugin api.
- There doesn’t seem to have a api command to the an extraInfoKeyValue with default.
There is this command: GetJobExtraInfoKeyValue(‘key’) and I tried this one GetJobExtraInfoKeyValueWithDefault(‘key’) but it failed.
I would like to be able to do similar to the python dictionary get method.
ex.:
a = {‘keyOne’: ‘value1’, ‘keyTwo’: ‘value2’}
print a.get(‘keyOne’, ‘’)
value1
print a.get(‘keyThree’, ‘default’)
‘default’
Right now my workaround is to use try/except in each GetJobExtraInfoKeyValue calls, but I am not a fan of this workaround.
-
Is there a way to get all the extraInfoKeyValue dictionary in one command instead of querying each key separately?
-
I notice that the Shotgun plugin is using the ClientUtils.LogText(‘Doing stuff…’) instead of the self.LogInfo() command.
Both seem to log in the console and the event log file, so I am not sure why would the ClientUtils.LogText() would be better.
Could you explain why I should use one over the other?
Thanks