boredstiff / protio

Premiere Pro Open Timeline IO App
31 stars 4 forks source link

Solidify configuration #7

Open boredstiff opened 6 years ago

boredstiff commented 6 years ago

It's a bit shaky right now, not very capable of being customized.

Ideally, I want the configuration to populate the fields in the view to point to where the Python interpreter it is using is, and where the used shell is - I need to ensure that this can work with venvs as well as shells that I don't use.

boredstiff commented 6 years ago

Possible paths: /Users/alex/protio.cfg /Library/Application Support/Adobe/CEP/extensions/protio/protio.cfg

The default .cfg file will be dependent on the platform, and constructed at build-prod and ... packaged? The package data should be accessible and loadable inside the .zxp.

I can allow a .cfg file in the user directory, and if provided, that takes precedence over all other configuration files, in the event that multiple configurations are allowed in the future. But I don't see a need for more than two levels.

The configuration can point to a specific shell to use in place of the one declared in the default config, along with a different interpreter to use. No need to source a virtualenv, just calling the specific interpreter directly is sufficient.

Allowing the user to provide the interpreter will allow the user to declare where OTIO is on their system. If the configuration states 'python' instead of providing a full path, then it will use the Python that is on the $PATH.

Upon initialization, I will call the Python that is provided and check that opentimelineio is indeed available. If not available, we want to error on the status line and prevent buttons from being able to run.

The line edits themselves should be uneditable. We don't want accidental clicking to fuck it up.

timlehr commented 5 years ago

Hey Alex,

I wanted to check out your project and managed to build it in production mode and load it in Premiere CC 2018.

However, when I press any of the buttons nothing happens. Looking through your code, it seems I'm missing the ".protio" config JSON. I created it with the four expected key - still nothing however. Can you share an example config with us? I didn't find anything like that in the repo.

Thanks! Tim

boredstiff commented 5 years ago
{
    "terminal": "C:/Users/alex/.babun/cygwin/bin/bash.exe",
    "terminal_args": ["-lc"],
    "python_interpreter": "C/dev/OpenTimelineIO/venv/Scripts/python.exe",
    "python_args": []
}

If you're on Windows, CMD will not work.

I don't have a Mac configuration anymore because I wiped my computer a few months back, but it should be easy to figure out the difference. I don't remember if lc needs to be passed to bash on Mac.

Additionally, I don't pay for Adobe stuff anymore, so I can't do any troubleshooting.

If you continue to have issues, I would suggest building and running with the debug steps and reading the output in the browser console until you've ironed everything out. The workflow should be that once it works in dev, it should work in production.

timlehr commented 5 years ago

Thanks Alex!

I am indeed developing for Windows and have some trouble getting the dev build to work. gulp watch seems to get stuck. The readme also refers to that issue on Windows, right? The result is however an incomplete build that does not load in Premiere and is not debuggable.

$ make build-dev
gulp watch
[21:17:45] Using gulpfile ~\Documents\scarif-dev\protio\gulpfile.js
[21:17:45] Starting 'build-dev'...
[21:17:45] Starting 'clean'...
[21:17:45] Finished 'clean' after 48 ms
[21:17:45] Starting 'build-css'...
[21:17:45] Starting 'build-sass'...
[21:17:45] Finished 'build-sass' after 751 μs
[21:17:45] Starting 'build-docs'...
[21:17:45] Starting 'build-dev-html'...
[21:17:45] Finished 'build-dev-html' after 11 ms
[21:17:45] Starting 'build-dev-config'...
[21:17:45] Starting 'build-premiere-debug'...
[21:17:45] Starting 'build-dev-symlinks'...
[21:17:45] Starting 'build-dev-copy-jspm-config'...
[21:17:45] Finished 'build-premiere-debug' after 53 ms
[21:17:46] Finished 'build-dev-config' after 924 ms
[21:17:46] Finished 'build-dev-copy-jspm-config' after 927 ms
[21:17:47] Finished 'build-dev-symlinks' after 1.57 s
[21:17:47] Finished 'build-css' after 2.31 s
[21:17:48] Finished 'build-docs' after 2.51 s
[21:17:48] Finished 'build-dev' after 2.57 s
[21:17:48] Starting 'watch'...
[21:17:48] Finished 'watch' after 53 ms

Any suggestions. I think I'm close to getting things working, but kind of screwed without debug logs.

Cheers!