Jump to content

Bypassing the Launcher


mitch.s

Recommended Posts

If you wan't to use what is available in the ftrackplugins without the launcher the easiest is to download the linux package and just use the code (it also contains PySide for windows Maya).

The README file contains information of what environment variables need to be setup for each software to work.

 

After that ftrackplugins can be extended with your own Asset Types for the applications or you can write your own Connector for a new app.

For inspiration to Connectors and Asset Types you can look at the existing ones but there is also an examples folder in the linux package that contains a skeleton for an custom asset type.

The README contains info on how the Connectors finds the custom asset types.

 

For batch creation of shots and various CLI jobs it's easiest to write your own scripts against the API.

Link to comment
Share on other sites

For now I only used 'import ftrack' to submit assets and manipulate tasks, shots, ....

 

We have our own submit/publish and AssetManagment tools in Maya, Modo, ... 
'import ftrack' seems to have everything I need for now. So I (think I) don,t need all of the ftrackplugins functionality

 

I presume that adding the ftrack.py path to the sys.path should suffice?

Link to comment
Share on other sites

I have some trouble though.

 

using the path 'C:/Temp/Ftrack/Ftrack_Plugins_winx64_b17/ftrackplugins/libdir' where ftrack.py and ftrack.pyc are located

ftrackLibPath = 'C:/Temp/Ftrack/Ftrack_Plugins_winx64_b17/ftrackplugins/libdir';if not ftrackLibPath in sys.path:    sys.path.append(ftrackLibPath);   import ftrack;# Error: # Traceback (most recent call last):#   File "<maya console>", line 1, in <module>#   File "C:/Temp/Ftrack/Ftrack_Plugins_winx64_b17/ftrackplugins/libdir\ftrack.py", line 12, in <module>#     from FTrackCore import *#   File "C:\Temp\Ftrack\Ftrack_Plugins_winx64_b17\ftrackplugins\libdir\FTrackCore.egg\FTrackCore\__init__.py", line 1, in <module>#   File "C:\Temp\Ftrack\Ftrack_Plugins_winx64_b17\ftrackplugins\libdir\FTrackCore.egg\FTrackCore\api\client.py", line 18, in <module># FTrackError: 'Message: Environment variable FTRACK_SERVER was not found....' # 

any help ?

Link to comment
Share on other sites

Sorry I was unclear about that. Some more quick notes. If not using the launcher you need to set these environment variables as well. 

 

Either as environment variables or with os module

set FTRACK_SERVER=https://youradress.ftrackapp.comset FTRACK_APIKEY=crazy-numbers-and-letters-stringset LOGNAME=yourusername
os.environ['FTRACK_SERVER'] = 'https://youradress.ftrackapp.com'os.environ['FTRACK_APIKEY'] = 'crazy-numbers-and-letters-string'os.environ['LOGNAME'] = 'yourusername'

Cheers,

Erik

Link to comment
Share on other sites

import os;import sys;# FTrack stuffftLibPath       = '########/Ftrack_Plugins_winx64_b17/ftrackplugins/libdir';  #path to ftrack.pyftServer        = 'https://##############.ftrackapp.com'                      #your ftrack ServerftApiKey        = '###################'                                       #your ftrack ApiKey  (Settings > apikeys)ftLogName    = '######'if not ftLibPath in sys.path:    sys.path.append(ftLibPath);    print '>> Added to sys.path :  '+ftLibPath;          os.environ['FTRACK_SERVER'] = ftServeros.environ['FTRACK_APIKEY'] = ftApiKeyos.environ['LOGNAME'] = ftLogNameimport ftrack;

Up and Atom!

Link to comment
Share on other sites

Hey,

 

if you are using an api-key you don't need to supply the password. When using the launcher you are logging in to a webpage, and therefore need to login as usual.

 

The api key gives full permissions for the current username. If you are looking to restrict each user more, there is the concept of user api keys. Each user has an api key associated with him/her that can be used instead. In the current version user api keys are hidden but you can access them from the api if using a regular api-key. They can be fetched on the user class for a user. 

 

ftrack.User(username).getApiKey() and also resetApiKey()

 

For testing we recommend using a regular api key. We require you to supply a username since we want to be able to present information correctly in ftrack, such as who did what and not just something generic.

 

 

Let me know if you have more questions about this.

 

Cheers

Link to comment
Share on other sites

  • 9 months later...

Hi gentleman,

ignore this please, it works now....

 

 

 

---------------------------------------------------------------------------------------------

I'm new to ftrack api and trying to connect. I'm not able to..... :(

 

I did all the above and got this:

 

>> Added to sys.path :  S:/bin/ftrack/api

>>> ftrack.getProjects()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "S:\bin\ftrack\api\FTrackCore.egg\FTrackCore\api\client.py", line 932, in getProjects
  File "S:\bin\ftrack\api\FTrackCore.egg\FTrackCore\api\xmlserver.py", line 295, in action
FTrackCore.api.ftrackerror.FTrackError: Unable to connect on YOUR-FTRACK-SERVER
 
 
checked and double checked the api key and the address... do not know what I'm doing wrong.
 
any help would be appreciated
thanks, Gyuri
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...