Jump to content

Starting a public repo here- learning tool for running Ftrack from source


Mike

Recommended Posts

I've started this public repo as a learning tool. I'm not sure if other people will be able to use this in the future just by running it. I'd like others to be able to use this as a learning tool and give people who are helping me more context when they're helping me out.  I'm also making this because I just don't know the best practices for setting up a pipeline like this, so please if you could offer any critiques or pointers for Python/PySide in general that'd be great.

This is a VS 2015 project for windows and will require the user to download their ftrack_api from the ftrackapp website and place the contents of the .tar file in the [root_folder]\modules\ftrack\pythonpath folder.  More details will be in the README.

The repo: https://github.com/mikebourbeauart/ftrack-from-source

Link to comment
Share on other sites

I'm getting Connect to launch properly, and the Maya action shows up, but when I launch Maya the Ftrack Plugin doesn't show up on the menu bar.  It looks like Maya isn't picking up on the userSetup.py even though it's connected to the Scripts and PYTHONPATH.

I've set up my env vars similar to @tokejepsen's example, so I'm not sure where things are going wrong.

When I go to the plug-in manager, I can see ftrackMayaPlugin.py. However, it's not auto-loaded, and when I click "load" I get this message: "Loading ftrack plugin - version 1.0"-- but it doesn't actually load.  Here's a printout of relevant env vars from within Maya:

PYTHONPATH
C:/Program Files (x86)/ngSkinTools/Maya2016-64bit/scripts
C:/Program Files/Autodesk/Maya2016/FumeFX/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/bifrost/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/bifrost/scripts/presets
C:/Program Files/Autodesk/Maya2016/plug-ins/fbx/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/substance/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/cafm
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/brushes
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/dialogs
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/fxmodules
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/tabs
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/util
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/widgets
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/xmaya
C:/Program Files/Autodesk/Maya2016/vray/scripts
C:/Program Files/PlayblastVR/maya/scripts
C:/Program Files/Side Effects Software/Houdini 15.0.393/engine/maya/maya2016/scripts
C:/ProgramData/Autodesk/ApplicationPlugins/MayaBonusTools/Contents/scripts
C:/Users/mike.bourbeau/Documents/maya/2015-x64/scripts/diament/scripts
C:/solidangle/mtoadeploy/2016/scripts
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/envs/ftrack-api-env/Lib/site-packages
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/connect/ftrack-connect-maya/resource/scripts
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/connect/ftrack-connect-maya/source
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/connect/ftrack-connect/source
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/pythonpath/ftrack-python-api/source
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/pythonpath/ftrack_api
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/pythonpath/ftrack_api

_____________________________________________________________________
PATH

C:/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler
C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/NativeBinaries/x86
C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common
C:/Program Files (x86)/QuickTime/QTSystem/
C:/Program Files (x86)/Skype/Phone/
C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/
C:/Program Files/Autodesk/Maya2016/bin
C:/Program Files/Autodesk/Maya2016/bin/Cg
C:/Program Files/Autodesk/Maya2016/plug-ins/bifrost/bin
C:/Program Files/Autodesk/Maya2016/plug-ins/substance/bin
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/bin
C:/Program Files/Git/cmd
C:/Program Files/Microsoft DNX/Dnvm/
C:/Program Files/Microsoft Network Monitor 3/
C:/Program Files/Microsoft SQL Server/130/Tools/Binn/
C:/Program Files/Microsoft/Web Platform Installer/
C:/Program Files/Side Effects Software/Houdini 15.0.393/engine/maya/maya2016/../../../bin
C:/ProgramData/Oracle/Java/javapath
C:/Python27
C:/Python27/Scripts
C:/Users/akash.sheladia/.dnx/bin
C:/Windows
C:/Windows/System32/Wbem
C:/Windows/System32/WindowsPowerShell/v1.0/
C:/Windows/system32
C:/solidangle/mtoadeploy/2016/bin
_____________________________________________________________________
MAYA_SCRIPT_PATH
C:/Program Files (x86)/ngSkinTools/Maya2016-64bit/scripts
C:/Program Files/Autodesk/Maya2016/FumeFX/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/bifrost/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/bifrost/scripts/presets
C:/Program Files/Autodesk/Maya2016/plug-ins/fbx/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/substance/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/cafm
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/brushes
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/dialogs
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/fxmodules
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/tabs
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/util
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/ui/widgets
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/scripts/xgenm/xmaya
C:/Program Files/Autodesk/Maya2016/scripts
C:/Program Files/Autodesk/Maya2016/scripts/AETemplates
C:/Program Files/Autodesk/Maya2016/scripts/FBX
C:/Program Files/Autodesk/Maya2016/scripts/cloth
C:/Program Files/Autodesk/Maya2016/scripts/fluidEffects
C:/Program Files/Autodesk/Maya2016/scripts/fur
C:/Program Files/Autodesk/Maya2016/scripts/hair
C:/Program Files/Autodesk/Maya2016/scripts/live
C:/Program Files/Autodesk/Maya2016/scripts/mayaHIK
C:/Program Files/Autodesk/Maya2016/scripts/muscle
C:/Program Files/Autodesk/Maya2016/scripts/others
C:/Program Files/Autodesk/Maya2016/scripts/paintEffects
C:/Program Files/Autodesk/Maya2016/scripts/shelves
C:/Program Files/Autodesk/Maya2016/scripts/startup
C:/Program Files/Autodesk/Maya2016/scripts/turtle
C:/Program Files/Autodesk/Maya2016/scripts/unsupported
C:/Program Files/Autodesk/Maya2016/vray/scripts
C:/Program Files/PlayblastVR/maya/scripts
C:/Program Files/Side Effects Software/Houdini 15.0.393/engine/maya/maya2016/scripts
C:/ProgramData/Autodesk/ApplicationPlugins/MayaBonusTools/Contents/scripts
C:/ProgramData/Autodesk/ApplicationPlugins/MayaBonusTools/Contents/scripts-2016
C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/shelves
C:/Users/mike.bourbeau/Documents/maya/2015-x64/scripts/diament/scripts
C:/Users/mike.bourbeau/Documents/maya/2016/prefs/markingMenus
C:/Users/mike.bourbeau/Documents/maya/2016/prefs/scripts
C:/Users/mike.bourbeau/Documents/maya/2016/prefs/shelves
C:/Users/mike.bourbeau/Documents/maya/2016/presets
C:/Users/mike.bourbeau/Documents/maya/2016/scripts
C:/Users/mike.bourbeau/Documents/maya/scripts
C:/solidangle/mtoadeploy/2016/scripts
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/connect/ftrack-connect-maya/resource/scripts
S:/__FTRACKTEST/Proj_Mountain_Dew/Episodes/Ep_Dewcision_12345/Seq_CharacterAnimation/Production/Shot_Bikers/TaskRig/Maya/scripts
_____________________________________________________________________
MAYA_PLUG_IN_PATH
C:/Program Files (x86)/ngSkinTools/Maya2016-64bit/plug-ins
C:/Program Files/Autodesk/Maya2016/FumeFX/plug-ins
C:/Program Files/Autodesk/Maya2016/bin/plug-ins
C:/Program Files/Autodesk/Maya2016/plug-ins/bifrost/plug-ins
C:/Program Files/Autodesk/Maya2016/plug-ins/fbx/plug-ins
C:/Program Files/Autodesk/Maya2016/plug-ins/substance/plug-ins
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/plug-ins
C:/Program Files/Autodesk/Maya2016/vray/plug-ins
C:/Program Files/PlayblastVR/maya/plug-ins
C:/Program Files/Side Effects Software/Houdini 15.0.393/engine/maya/maya2016/plug-ins
C:/ProgramData/Autodesk/ApplicationPlugins/MayaBonusTools/Contents/plug-ins
C:/ProgramData/Autodesk/ApplicationPlugins/MayaBonusTools/Contents/plug-ins/win64-2016
C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/plug-ins/windows-maya2016-64bit
C:/Users/mike.bourbeau/Documents/maya/2015-x64/scripts/diament/plug-ins
C:/Users/mike.bourbeau/Documents/maya/2016/plug-ins
C:/Users/mike.bourbeau/Documents/maya/plug-ins
C:/solidangle/mtoadeploy/2016/plug-ins
D:/Git_Stuff/ftrack-from-source/mb_tests/mb_tests/modules/ftrack/connect/ftrack-connect-maya/resource/plug_ins
_____________________________________________________________________
FTRACK_CONNECT_MAYA_PLUGINS_PATH
D:\Git_Stuff\ftrack-from-source\mb_tests\mb_tests\modules\ftrack\connect\ftrack-connect-maya\resource

 

Link to comment
Share on other sites

Sure, I've added this to the repo README. 

  1. Clone the project
  2. Download the API package and place it in the pythonpath folder (like your setup, except I'm using subfolders under pythonpath):
    1. Go to yourstudioname.ftrackapp.com site.  
    2. Go to your account icon in the upper right > System Settings
    3. Download the API package
    4. Extract the contents of the python-api.tar into this folder
    5. It should look like this:
      • +[root_dir]
        • +modules
          • +ftrack
            • +pythonpath
              • +frack_api
                • +clique
                • +requests
                • ftrack.py
                • FTrackCore.egg
                • pyparsing.py
                • six.py
                • websocket.py
  3. Manually install the virtual env packages in this dir: [root_dir]/venv/ftrack-api-env (Important because the "site-packages" folder is being added in an env var)
    1. In VS you can do this by utilizing the "requirements.txt" file.
      • right clicking on Python Environment
      • "Add Virtual Env" 
      • Create it in the proper dir: [root_dir]/venv/ftrack-api-env
      •  Right click the new ftrack-api-env
      • "Install from requirements.txt"
    2. Just a note-- I tried installing from requirements.txt at home on my laptop and I got an error around the installation of connect which was related to cmake.  I ended up having to install the PySide package first and then manually installing the ftrack-connect package through a cmd prompt.
  4. Go to [root_dir]/bin/launcher.py> right click and set it as your Startup File.
  5. Hit the Start button to launch.

I think that's it.  Let me know if it something goes wrong. 

A few notes about the launcher.py:

  1. I build an env variable path dictionary there
  2. I'm also outputting a log ([root_dir]\logs) that prints out all of the env vars during Ftrack launch so you can see what is being set.

 

 

Link to comment
Share on other sites

1 hour ago, tokejepsen said:

What do you mean by "build"?

 I open a console in the ftrack-connect path and run 'python setup.py build'.  Otherwise, I get this error:

Press any key to continue . . . Traceback (most recent call last):
  File "C:\Python27\Lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\Git_Stuff\ftrack-from-source\mb_tests\mb_tests\modules\ftrack\connect
\ftrack-connect\source\ftrack_connect\__main__.py", line 31, in <module>
    import ftrack_connect.ui.application
  File "D:\Git_Stuff\ftrack-from-source\mb_tests\mb_tests\modules\ftrack\connect
\ftrack-connect\source\ftrack_connect\ui\__init__.py", line 10, in <module>
    from . import resource as _resource
ImportError: cannot import name resource

 

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...