Jump to content

Accessing Extra Data


lloydwood

Recommended Posts

Hello,

When you create a object it's possible to pass a dictionary of extra data through with the data optional argument but where does this data go? I'm creating a file component and want to pass extra data through to enable my structure plugin to correctly determine the path but I can't find where to access this extra data?

Link to comment
Share on other sites

Hi @lloydwood, I'm not quite sure what you mean with passing extra data.

In case you want to get your feet wet I suggest to have a look a the entity base class :
https://bitbucket.org/ftrack/ftrack-python-api/src/9db96facf4e7ae94f5c30152dab2944b7dfa8f7a/source/ftrack_api/entity/base.py#lines-41

to see how the data argument is used.
Here an extract from the docs ( hoping is what you are referring to with
data optional argument)

*data* is a mapping of key, value pairs to apply as initial attribute
values.

If you can provide more information about what you are after, maybe I can be of better help.

looking forward to hear more from you.

Cheers.

L.

Link to comment
Share on other sites

Hi Lorenzo,

 

Sorry. This is me misunderstanding the data argument. I see now that it is for providing a dictionary to populate the field on the database when the object is created. That makes sense now and I've got the metadata field being populated correctly.

Thanks for the link. It helped me see where I was going wrong!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...