Working with Attributes
3 3

5 posts in this topic

 
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'

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
3 3