Integrating Shotgun into Premiere Workaround

Thanks for replying. No I checked, there is 25+ Gigs of free space on hard disk , even Memory usage in Task Manager is around 50-60% Used, and I ran Command Prompt as Administrator.

Perhaps the path length is too long.
Try setting the env variable SHOTGUN_HOME to somewhere on another drive, preferably closest to the root possible.

Then start a new Sg desktop (it will be completely fresh as it will look at the new dir).
Then try your method.

On Windows theer is a 255 character path limit by default (which can be disabled via the policy editor or registry).
This has caused me issues before as well.

1 Like

Thank you so much @Ricardo_Musch , that trick worked.
build_plugin.log (30.6 KB)

I then installed the plugin using tool from aescripts site. On launching Premiere directly from Start Menu, I faced the attached error. I am unable to get the full path in error. Read couple of log files of Premiere, but no luck.

Please guide. Thank you.

1 Like

I wonder if you need to load premiere from sg desktop?
(With the engine defined as tk-premiere)

Thanks Ricardo, I tried to configure, but I am not able to get Premiere icon visible in Shotgun Desktop App UI. I did the steps mentioned tk-premiere(wiki) . Thank you for helping me reach this far.

Did you configure Premiere in the Software Entities on your site?

Yes, from that wiki page, I did these steps
5. Add Premiere Project item to Shotgun’s Published File Types page.
6. Add Adobe Premiere Pro CC to Shotgun’s Software page. Upload the Pr icon.

Is there anything more to be done on Site ? I am being a bit naïve.


This should definitely show the Premiere icon somewhere in Sg desktop.
Take a look at your tk-desktop.yml settings and potentially remove any edits you did for tk-premiere.

Also, obviously, reload the project for this to show.

Thank you, there was a typo in tk-desktop.yml. I missed the second * before "

groups:
  matches:
   - "*Premiere*"

Now, Premiere is launched from SG Desktop, however that error is still coming related to sg_constants when Premiere startup as I posted before. I felt this file is related but seems ok to me. (changed .js to .log)
constants_js.log (2.9 KB)

2 Likes

I’m trying to get this up and working too, but I’ve hit an issue.
I’ve made the package, all my pipeline config setup looks good, but when I launch Premier, my extensions menu looks wrong.
After doing “make sign” are there any missing steps to intall the extension?
Thanks in advance for your help!
p.

1 Like

Looks like I’m close. After moving the framework to the C: root so it has a small path, Premier is now loading from SG Desktop and the panel is available.
When I open it, I get this error now :

1 Like

Checking the manifest in my appdata location, it doesn’t have the manifest from the custom framework (the reference to ppro is missing)… how do I force update the com.sg.basic.adobe folder?

1 Like

I got it working. There are a few typos in the wiki of that repo that causes the engine to fail to load.
(missing ; and } )
I also had to run 2to3 on some of the modules.
So… it works!
I’m not trying to debug window parenting. Currently the SG windows aren’t getting parented to the premier window. Has anyone any experience getting this to work? Without having a python console in Premier, it’s hard for me to debug the code being used to get the premier hwnd.
If I run the code from the engine.py (_win32_get_proxy_window()) from a SG Python console it does appear to return a hwnd for my premier window, but for some reason, when premier launches, I’m getting an error which suggests the engine isn’t able to get the hwnd on startup as it’s erroring with

                "not be parented to Premiere, but they will still function "
                "properly otherwise."

which suggests the _win32_get_proxy_window() method is returning None.

This is my test code which does return a hwnd, but I can’t verify the same result in Premier. Can anyone suggest how to proceed to debug this?

import sys
import os
sys.path.insert(0, r"C:\cache\sg\bundle_cache\app_store\tk-framework-adobe\v1.1.6\python")
import tk_framework_adobe_utils.win_32_api
found_hwnds=tk_framework_adobe_utils.win_32_api.find_windows(class_name="Premiere Pro", stop_if_found=True,)
_WIN32_PREMIER_MAIN_HWND = found_hwnds[0]
2 Likes

I have it working. I spent quite some time debugging the old build, and adopting the code to python3.
The framework “tk-framework-adobe-ppro” also should be updated including rebuilding Adobe CEP.
And finally, one more problem appeared, when you’re able to only run any toolkit application in premier or ae once. After that, it stops responding. Basically what happens is that the event server stops. Now I have to force it to start back again by injecting in every app hook before doing anything.

engine._HEARTBEAT_DISABLED = False

Otherwise both premier and ae stop being able to run any app.
Hope that helps anyone.

1 Like

Hello

This was an interesting read, and I’ mtrying to learn how to integrate Premiere into Shotgrid. I am getting the following error when launching Premiere. Could you help me out ?


2023-07-16 20:01:59,579 [   ERROR] [PROXY] Error calling __commands::adobe_premiere_pro((), {}):
Traceback (most recent call last):
  File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-desktop\v2.6.7\python\tk_desktop\desktop_engine_project_implementation.py", line 225, in _trigger_callback
    callback(*args, **kwargs)
  File "C:\Users\sreyeeshgarimella\AppData\Roaming\Shotgun\kavaleer\p122c364.basic.desktop\cfg\install\core\python\tank\platform\engine.py", line 1083, in callback_wrapper
    return callback(*args, **kwargs)
  File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\base_launcher.py", line 130, in launch_version
    self._launch_callback(
  File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\base_launcher.py", line 397, in _launch_callback
    self._launch_app(
  File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\base_launcher.py", line 189, in _launch_app
    (prepped_path, prepped_args) = prepare_launch_for_engine(
  File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\prepare_apps.py", line 44, in prepare_launch_for_engine
    launcher = sgtk.platform.create_engine_launcher(
  File "C:\Users\sreyeeshgarimella\AppData\Roaming\Shotgun\kavaleer\p122c364.basic.desktop\cfg\install\core\python\tank\platform\software_launcher.py", line 88, in create_engine_launcher
    raise TankError(
tank.errors.TankError: Cannot create tk-premiere software launcher! tk-premiere Undefined does not exist on disk.
Cannot create tk-premiere software launcher! tk-premiere Undefined does not exist on disk.

Seems like the engine does not exist on disk or not in the right location.

How are you pointing to the engine?

@Ricardo_Musch Thanks for the reply so I found the original error :

. ```
2023-07-16 21:29:46,948 [ ERROR] [PROXY] Error calling __commands::adobe_premiere_pro((), {}):
Traceback (most recent call last):
File “C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-desktop\v2.6.7\python\tk_desktop\desktop_engine_project_implementation.py”, line 225, in _trigger_callback
callback(*args, **kwargs)
File “C:\Users\sreyeeshgarimella\AppData\Roaming\Shotgun\kavaleer\p122c364.basic.desktop\cfg\install\core\python\tank\platform\engine.py”, line 1083, in callback_wrapper
return callback(*args, **kwargs)
File “C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\base_launcher.py”, line 130, in launch_version
self._launch_callback(
File “C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\base_launcher.py”, line 397, in _launch_callback
self._launch_app(
File “C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\base_launcher.py”, line 189, in _launch_app
(prepped_path, prepped_args) = prepare_launch_for_engine(
File “C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.2\python\tk_multi_launchapp\prepare_apps.py”, line 44, in prepare_launch_for_engine
launcher = sgtk.platform.create_engine_launcher(
File “C:\Users\sreyeeshgarimella\AppData\Roaming\Shotgun\kavaleer\p122c364.basic.desktop\cfg\install\core\python\tank\platform\software_launcher.py”, line 88, in create_engine_launcher
raise TankError(
tank.errors.TankError: Cannot create tk-premiere software launcher! tk-premiere Undefined does not exist on disk.


For some reason it's going to a hard coded path in the descriptor

hi, @Ricardo_Musch Just wanted to follow up on this one. I set the path to that user on my machine and Premiere launches now. The weird part is I can’t see the panels
image

Hello,
Has anyone had any issue getting the shotgun panel to show up in premiere pro 2024

There are no issues, all works fine (once you make it work of course)

People are having so many issues with premiere integration, that I think I’ll make a github fork with the working one or pull some changes to make the engine work out of the box. I will try to make it at the beginning of this year.

1 Like