Jump to content

Working with Attributes


mitch.s

Recommended Posts

Posted
 
How do you use custom attributes with the API ? Create/Delete/Edit, Get/Set, formulas, ...
 
We could work with metadata but it would be nice to use custom attributes in some cases.
 
I tried using the private functions but it doesn't work (as expected) :
Attribute with name 'anAttr' was created using the FTrack UI
sh.attributes.__getattr__('anAttr')AttributeError: 'NoneType' object has no attribute '__getattr__'sh.attributes__setattr__('anAttr','POOO')AttributeError: 'NoneType' object has no attribute 'anAttr'

 

Posted

You use them in the same way as regular attributes. If you have a custom attribute, use its name from the api.

 

For example and attribute named fps.

 

project.get('fps') or project.set('fps',25)

 

 

You wont see the custom attributes when you print the object because they are fetched on demand.

 

 

Cheers

  • 6 months later...
Posted

Is it possible to create custom attributes using the API?

 

eg.

 

If I had a enumeration custom attribute and I would like to add more options for the user to select.

Archived

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

×
×
  • Create New...