-
Posts
6 -
Joined
-
Last visited
-
Days Won
1
Content Type
Events
Profiles
Forums
Downloads
Posts posted by Andriy Pogribniy
-
-
So the location description itself has no mechanism to trigger itself or not, based on type of request?
What's the reason of having several locations, if I can't switch them interactively or automate their selection
without mumbo-jumbo? -
-
-
import functools import logging import ftrack_api import ftrack_api.accessor.disk as _disk import ftrack_api.structure.standard as _standard logger = logging.getLogger('ftrack_user_location') def configure_location(session, event): USER_DISK_PREFIX = 'C:/Users/andri/Desktop/Temp/' location = session.ensure('Location',{'name': 'Test_Location2'}) location.accessor = _disk.DiskAccessor(prefix = USER_DISK_PREFIX) location.structure = _standard.StandardStructure() location.priority = 10 logger.warning('Registering test location') def register(api_object, **kw): if not isinstance(api_object, ftrack_api.Session): return api_object.event_hub.subscribe('topic=ftrack.api.session.configure-location',functools.partial(configure_location, api_object)) if __name__ == '__main__': logging.basicConfig(level = logging.INFO) session = ftrack_api.Session(server_url = 'https://inque.ftrackapp.com/', api_key = MY_API_KEY_HERE, api_user = MY_USER_NAME, auto_connect_event_hub = True) register(session) session.event_hub.wait()
And nothing happens.
What am I doing wrong? -
Can I make some actions visible to particular user(s) only?
Thanks.
Trigger location based on asset type?
in API
Posted
Speaking short, there's no working solution to do that. OK