tokejepsen Posted May 23, 2016 Report Posted May 23, 2016 Hey, I've got a fork of lucidity that I would like to use with Ftrack Connect, but the built-in version of lucidity is interfering. How might I go about this, without having to use absolute paths?
Mattias Lagergren Posted May 24, 2016 Report Posted May 24, 2016 17 hours ago, tokejepsen said: I've got a fork of lucidity that I would like to use with Ftrack Connect, but the built-in version of lucidity is interfering. How might I go about this, without having to use absolute paths? Hey, I'm not sure what the solution is here if you do not want to use absolute imports or imp.load_module/imp.find_module. Please let me know what you find out
tokejepsen Posted May 25, 2016 Author Report Posted May 25, 2016 I'm looking at running from source, which should mean that I can decide on which lucidity to use. I can't find any information about how to setup the environment for ftrack-connect-nuke. Are we meant to just add https://bitbucket.org/ftrack/ftrack-connect-nuke/src/7970cb53fed1805a5b2c70e3c72807aa1920a652/resource/?at=master to FTRACK_CONNECT_PLUGIN_PATH?
Mattias Lagergren Posted May 26, 2016 Report Posted May 26, 2016 22 hours ago, tokejepsen said: I'm looking at running from source, which should mean that I can decide on which lucidity to use. I can't find any information about how to setup the environment for ftrack-connect-nuke. Are we meant to just add https://bitbucket.org/ftrack/ftrack-connect-nuke/src/7970cb53fed1805a5b2c70e3c72807aa1920a652/resource/?at=master to FTRACK_CONNECT_PLUGIN_PATH? That is our longterm goal, to refactor our plugins to work with the ftrack connect plugin eco system. As of now they we a private repository where we build the ftrack connect package that you download from our website. As a part of the build process it packages together plugins, e.g ftrack-connect-nuke and takes the hooks in the resource/ folders and put them in the build package's resource hook folders. It then goes ahead and generates the .exe, .dmg for the platform using cx_Freeze. One problem of running this from source is that the launch actions in ftrack-connect-nuke and other repos assumes that they're inside the built package. This can of course be fixed by modifying the hook. Not as simple as we would like it to be but we're heading in the direction of having them run as any other plugin.
Mattias Lagergren Posted May 27, 2016 Report Posted May 27, 2016 A quick follow up on this. We started discussing this again after my previous reply and we're now planning to accelerate the refactoring of the plugins so that they work better standalone, outside of Connect package. We're now discussing approaches and I will follow up on this when I have more information.
tokejepsen Posted May 27, 2016 Author Report Posted May 27, 2016 I should have replied earlier, but it turns out I was able to just add the resources path to FTRACK_CONNECT_PLUGIN_PATH. It works now, I just need to make it a bit simpler to setup.
Mattias Lagergren Posted May 27, 2016 Report Posted May 27, 2016 On 5/27/2016 at 4:11 PM, tokejepsen said: I should have replied earlier, but it turns out I was able to just add the resources path to FTRACK_CONNECT_PLUGIN_PATH. It works now, I just need to make it a bit simpler to setup. Just to clarify, you: * Checked out ftrack-connect and ftrack-connect-nuke sources * Add ftrack-connect-nuke/resource/ to FTRACK_CONNECT_PLUGIN_PATH And nothing more? Didn't you change the FTRACK_CONNECT_NUKE_PLUGINS_PATH?
tokejepsen Posted May 27, 2016 Author Report Posted May 27, 2016 I'll send an update when I have something ready, but essentially I'm using conda to build the environment for ftrack-connect; https://github.com/Bumpybox/pipeline I used pip to install from source in this order; ftrack-connect, ftrack-connect-foundry and ftrack-connect-nuke. ftrack-connect-nuke/resource gets added to the root environment directory when using conda, but essentially it was the same as adding it to FTRACK_CONNECT_PLUGIN_PATH. When I have a complete install script, I'll share for you to test out.
tokejepsen Posted May 30, 2016 Author Report Posted May 30, 2016 Got a working version of setting up ftrack-connect and running from source. 1. Clone https://github.com/Bumpybox/pipeline 2. Copy the ftrack api into pythonpath 3. Run environments\ftrack-connect.bat What I don't understand is that it seems to require the ftrack module to run, but ftrack-connect-package can run without. Is ftrack-connect-package bundled with the ftrack api?
Mattias Lagergren Posted May 31, 2016 Report Posted May 31, 2016 Ah, I don't have windows on my workstation so can't try it out right now. And yes - the ftrack-connect-package bundles the ftrack api, if that was the question.
tokejepsen Posted May 31, 2016 Author Report Posted May 31, 2016 5 minutes ago, Mattias Lagergren said: And yes - the ftrack-connect-package bundles the ftrack api, if that was the question. How does ftrack connect use the api without specifying an api key?
Mattias Lagergren Posted May 31, 2016 Report Posted May 31, 2016 11 minutes ago, tokejepsen said: How does ftrack connect use the api without specifying an api key? It uses api keys - they are retrieved when you start Connect and it asks you to login to the browser. You can see some of that magic here: https://bitbucket.org/ftrack/ftrack-connect/src/06eaec219026c9b973f9031040d0cc0199c05f4c/source/ftrack_connect/ui/login_tools.py?at=master&fileviewer=file-view-default It involves setting up a tiny webserver on localhost that ftrack redirects to when you're logged in.
tokejepsen Posted June 2, 2016 Author Report Posted June 2, 2016 Guessing there aren't any git repo for the ftrack api? If not, what would the problems with including it in a git repo?
Mattias Lagergren Posted June 3, 2016 Report Posted June 3, 2016 18 hours ago, tokejepsen said: Guessing there aren't any git repo for the ftrack api? If not, what would the problems with including it in a git repo? You mean the legacy api? We've been discussing putting it into a separate repo but nothing we've got to.
tokejepsen Posted June 3, 2016 Author Report Posted June 3, 2016 Yup, the legacy api. Would be good to be able to pull that when needed, instead of downloading it from the ftrack site.
tokejepsen Posted July 16, 2016 Author Report Posted July 16, 2016 I finally got around to getting this running. Got ftrack-connect-nuke and ftrack-connect-maya running from source now, which should be enough for me for now. Maya was a pain to work out, as it didn't like the PySide version required by ftrack-connect, but the lovely feature of modifying the environment of an application launch really helped here by prepending Maya's PySide version. The code is pretty much python, but a couple of command lines to set some environments, but it should be fairly simple to port to OS if anyone's interested.
Mike Posted August 2, 2016 Report Posted August 2, 2016 I'm trying to launch Maya from the source, but I'm running into the same PySide issues (I think). I'm getting missing DLL errors and such from Maya's script editor (more info here): I'm not sure how to fix this. I've been looking through the difference between the os.environ output from a standard Maya launch and an Ftrack Maya launch, but I can't make out the key differences. Any suggestions?
tokejepsen Posted August 3, 2016 Author Report Posted August 3, 2016 11 hours ago, Mike said: Any suggestions? Seems like you might on the right track. I didn't get those "dll" errors, as far as I remember, but its definitely about which PySide version Maya is using when you are running from source. Basically you need to have the PySide version (1.2.2, < 2) that ftrack-connect supports on the "PYTHONPATH" environment variable, while also having the PySide shipped with Maya on the "PYTHONPATH" environment variable. The trick is to make sure that when you launch Maya to have its "site-packages" first in the "PYTHONPATH" environment variable, so Maya loads its own modules first.
tokejepsen Posted August 3, 2016 Author Report Posted August 3, 2016 BTW @Mike you are welcome to try out my pipeline environment for ftrack-connect. It is isolated to ftrack-connect, so nothing else will be downloaded. It runs miniconda, so your system environment is left alone.
Mike Posted August 3, 2016 Report Posted August 3, 2016 4 hours ago, tokejepsen said: BTW @Mike you are welcome to try out my pipeline environment for ftrack-connect. It is isolated to ftrack-connect, so nothing else will be downloaded. It runs miniconda, so your system environment is left alone. Thanks, @tokejepsen! I was wondering how to do it, but I see your github link above, I'll give it a shot. UPDATE I'm running into issues with setting this up. Sorry for my inexperience, but I'm not sure what I have to do exactly. I installed miniconda.exe Then ran install_environment.bat (this console just popped up and disappeared, not sure if that's ok) Then ran update_environment.bat and that's when I got this error: Windows cannot find 'path\to\repo\pipeline\miniconda\envs\git\Library\bin\git.exe.' Make sure you typed the name correctly, and then try again. Here's the output: D:\Git_Stuff\pipeline>cd D:\Git_Stuff\pipeline\ D:\Git_Stuff\pipeline>call conda_environment 'conda_environment' is not recognized as an internal or external command, operable program or batch file. D:\Git_Stuff\pipeline>REM creates a known environment to use git from D:\Git_Stuff\pipeline>IF EXIST D:\Git_Stuff\pipeline\miniconda/envs/git GOTO GIT EXISTS D:\Git_Stuff\pipeline>conda env create --force -f D:\Git_Stuff\pipeline\environm ents/git.yml Fetching package metadata ......... Solving package specifications: .......... Linking packages ... [ COMPLETE ]|##################################################| 100% No psutil available. To proceed, please conda install psutil# # To activate this environment, use: # $ source activate git # # To deactivate this environment, use: # $ source deactivate # D:\Git_Stuff\pipeline>REM updating repo D:\Git_Stuff\pipeline>start /W D:\Git_Stuff\pipeline\miniconda\envs\git\Library\ bin\git.exe pull The system cannot find the file D:\Git_Stuff\pipeline\miniconda\envs\git\Library \bin\git.exe. D:\Git_Stuff\pipeline>REM create requested environment D:\Git_Stuff\pipeline>conda env create --force -f usage: conda-env-script.py create [-h] [-f FILE] [-n ENVIRONMENT | -p PATH] [-q] [--force] [--json] [remote_definition] conda-env-script.py create: error: argument -f/--file: expected one argument D:\Git_Stuff\pipeline>pause Press any key to continue . . .
tokejepsen Posted August 3, 2016 Author Report Posted August 3, 2016 Sorry @Mike I should have guided you a bit more:) I do also have to warn you that the repository is a work-in-progress so I constantly fiddling with it, though the ftrack-connect environment should be fairly solid. I would advise you to start from scratch again, and uninstall miniconda. All you should need to do is follow these steps to get ftrack-connect running, bear in mind that you will be downloading a lot to begin with; 1. Clone https://github.com/Bumpybox/pipeline 2. Copy the ftrack api into pythonpath 3. Run environments\ftrack-connect.bat Now you should expect to have ftrack-connect running with ftrack-connect-nuke and ftrack-connect-maya, and you should be able to launch Maya from Ftrack. On Maya launch there is an environment modification using; https://github.com/Bumpybox/pipeline/blob/672efe0529039ffa563ea4a11fa18b3d0c5ade1d/environments/ftrack_connect_hooks/hook/app_launch_environment.py, to make sure Maya's default modules gets loaded first.
Mike Posted August 3, 2016 Report Posted August 3, 2016 It's not picking up the ftrack api. Here is where I put it, I'm guessing this isn't correct:
tokejepsen Posted August 3, 2016 Author Report Posted August 3, 2016 8 minutes ago, Mike said: It's not picking up the ftrack api. Here is where I put it, I'm guessing this isn't correct: That is the correct location. Is the python api configured? Is "ftrack.py" filled in with the site address and api key?
Mike Posted August 3, 2016 Report Posted August 3, 2016 No, but I just did it and I'm still getting the error. After running it a few times, the console disappears now and connect won't show up (I tried to get the log).
tokejepsen Posted August 3, 2016 Author Report Posted August 3, 2016 Try opening a terminal (cmd), and drag'n'drop "ftrack-connect.bat" into it and execute. That will ensure the terminal stays open for you to debug.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.