nybrandnewschool / tk-aftereffects-queue

An After Effects render queue for ShotGrid Toolkit.
Other
8 stars 1 forks source link

Launching App #16

Open enriquedlgm opened 3 weeks ago

enriquedlgm commented 3 weeks ago

First of all, Thank you for making this available! This is so cool.

This is definitely user error, but once I have made the changes to my toolkit how do I launch the app inside AE? I only see the Flow Production window panel and cant seem to find any other window under extensions. In addition to that I modified my templates.yml and added these values to define the root folders: ` #AE QUEUE ADDS

ae_shot_renders:
    definition:'@shot_root/renders/{Shot}_{task_name}[_{name}].v{version}/'
ae_shot_review:
    definition:'@shot_root/renders/{Shot}_{task_name}[_{name}].v{version}/review/'`

Is this the right place to add those values mentioned in info.yml?

I'm using AE version 24.4.1 and Flow Production Tracking v 1.9.1 with python 3.10.13

danbradham commented 3 weeks ago

Hey @enriquedlgm ,

Once configured, it should show up in the Flow/ShotGrid Adobe Panel as Render and Review. If it's not appearing, perhaps you haven't entered a shot context yet? Did you save a working file into a Shot in Flow yet?

enriquedlgm commented 3 weeks ago

image

This is how it looks on my end. I wonder if it has anything to do with the version of one of the toolkits, perhaps tk-multi-shotgunpanel? Running this version with tk-core v0.21.1 :

shotgun panel

apps.tk-multi-shotgunpanel.location: type: app_store name: tk-multi-shotgunpanel version: v1.8.0

danbradham commented 3 weeks ago

It should work with that configuration of toolkit core / shotgun panel as far as I know. What does the entry for the tk-aftereffects-queue app look like in your app_locations.yml?

enriquedlgm commented 3 weeks ago

---- Mari apps

project manager

apps.tk-mari-projectmanager.location: name: tk-mari-projectmanager type: app_store version: v1.3.0

AE Queue

apps.tk-aftereffects-queue.location: type: github_release organization: nybrandnewschool repository: tk-aftereffects-queue version: v0.2.0

################################################################################

reference all of the common frameworks

frameworks: '@frameworks'

danbradham commented 3 weeks ago

Ah, looks like I forgot to update the version in the example app_locations.yml. The latest release is v0.6.5, so let's see what happens if you change the version from v0.2.0 to v0.6.5.

If it still doesn't appear in your adobe panel after that, would you mind sending your tk-aftereffects.log file? Make sure to turn debugging on in your Flow Desktop app prior to launching After Effects. Hopefully there will be an actionable error message in the log.

enriquedlgm commented 3 weeks ago

Same issue still I did see these two errors on the log file.

2024-09-23 14:24:32,857 [3792 ERROR sgtk.env.project.tk-aftereffects] Cannot start app! tk-aftereffects-queue v0.6.5 does not exist on disk. 2024-09-23 14:24:32,989 [3792 ERROR sgtk.env.project.tk-aftereffects] App C:\Volumes\experiments\Socials_Shotgrid\6_ShotgunConfig\install\app_store\tk-multi-publish2\v2.6.0 failed to initialize. It will not be loaded.

Attaching the log file. I really appreciate your time on this, thank you so much! tk-aftereffects.log

danbradham commented 3 weeks ago

No problem, hopefully we can get you sorted.

I think the pertinent one to start with is tk-aftereffects-queue does not exist on disk yet. That suggests to me that it's not being downloaded while toolkit is loading. Do you have git installed and available from your command line? Since the app uses a github_release it needs to use git to download the repository during startup. One alternative, if you can't deploy git on your artists workstations, would be to download the repository and extract it to your SG config into this folder bundle_cache/app_store/tk-aftereffects-queue/v0.6.5. That should allow toolkit to skip the download and use the version in your bundle_cache instead.

You may want to look at upgrading all of your toolkit apps as well. I see you have an older version of tk-multi-publish2 and tk-multi-workfiles2 that are both failing to load due to python 2 errors. These should be fixed in newer versions of the toolkit apps.

enriquedlgm commented 3 weeks ago

Okay.. Got it to finally load( I was trying to deploy on an existing project and forgot to run the tank cache_apps...) Rookie mistake.

Once I load in the comp into the queue and click render, I see it added to the render queue, but then immediately disappears and I get stuck on this screen with the RUNNING icon just spinning. Is this because maybe i'm missing some of the output presets on disk? or could it be an error with my templates.yml?

Not sure what the best way to output logs for this would be.

image

enriquedlgm commented 3 weeks ago

This is the log btw, sorry!

2024-09-23 15:46:43,631 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] Showing UI... 2024-09-23 15:46:43,631 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] Loading UI options... 2024-09-23 15:46:44,052 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] Applying UI option defaults... 2024-09-23 15:46:44,136 [600 DEBUG sgtk.env.project.tk-aftereffects] Heartbeat restarted. 2024-09-23 15:46:47,077 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] Resetting Render Queue... 2024-09-23 15:46:56,666 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] Constructing Render Flows... 2024-09-23 15:46:59,224 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] FILE INFO: {'Full Flat Path': 'C:\\Users\\enrique\\__NAME__\\__NAME___[####].tif', 'File Name': '__NAME___[####].tif'} 2024-09-23 15:46:59,224 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] PATH INFO: {'padding': 4, 'padding_str': '[####]', 'is_sequence': True, 'extension': 'tif', 'version': None, 'version_number': 1, 'published_file_type': 'Rendered Image'} 2024-09-23 15:46:59,246 [600 DEBUG sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] PATH TEMPLATE: {folder}/{name}/{name}.[####].tif 2024-09-23 15:46:59,318 [600 ERROR sgtk.env.project.tk-aftereffects.tk-aftereffects-queue] Failed to create render flows... Traceback (most recent call last): File "C:\Volumes\experiments\Socials_Shotgrid\6_ShotgunConfig\install\github\nybrandnewschool\tk-aftereffects-queue\v0.6.5\python\aequeue\app.py", line 282, in render flow = self.new_render_flow( File "C:\Volumes\experiments\Socials_Shotgrid\6_ShotgunConfig\install\github\nybrandnewschool\tk-aftereffects-queue\v0.6.5\python\aequeue\app.py", line 324, in new_render_flow render_folder = self.tk_app.get_render_template().apply_fields(sg_fields) File "C:\Volumes\experiments\Socials_Shotgrid\6_ShotgunConfig\install\core\python\tank\template.py", line 260, in apply_fields return self._apply_fields(fields, platform=platform) File "C:\Volumes\experiments\Socials_Shotgrid\6_ShotgunConfig\install\core\python\tank\template.py", line 603, in _apply_fields relative_path = super(TemplatePath, self)._apply_fields( File "C:\Volumes\experiments\Socials_Shotgrid\6_ShotgunConfig\install\core\python\tank\template.py", line 305, in _apply_fields raise TankError( tank.errors.TankError: Tried to resolve a path from the template <Sgtk TemplatePath aftereffects_shot_renders: sequences/{Sequence}/{Shot}/{Step}/renders/{Shot}_{task_name}[_{name}].v{version}> and a set of input fields '{'Shot': 'AE_TEST', 'Sequence': 'RnD', 'Step': '05_GFX', 'task_name': 'GFX'}' but the following required fields were missing from the input: ['version']

danbradham commented 3 weeks ago

Wow great progress! Yes it looks like your templates are including an additional render token, {version}. I may need to add more details about this in the README as well but the templates for the settings template_render_area and template_review_area are meant to be simple folders. With the intention that they will likely house all the renders for a given pipeline step. For example you might prefer using the base renders and review folders within your shot folder. Something like this based on your above template.

aftereffects_shot_renders: `sequences/{Sequence}/{Shot}/{Step}/renders`
aftereffects_shot_review: `sequences/{Sequence}/{Shot}/{Step}/review`

This would cause your base render output to go into the renders folder, and the gif and mp4 output to go into the review folder. The files are named based on the Comp in your scene to disambiguate them from working file name, since it's very common to output many comps from one working file.

I should point out now, that there is another dependency for this app ffmpeg. It's used to compress the mp4 and gif output. You will need to install it separately and make the ffmpeg binaries available on your systems PATH environment variable. I will update the README to include all the details from debugging with you when I get a chance. I apologize for the lack of details in the installation instructions.

enriquedlgm commented 3 weeks ago

Removing the version got the the renders going and outputting their image sequences to right path!

Now the only odd behavior I'm noticing with this is that the output files are exporting like so "AUD_0010_COMP_v007._1002.exr" And i believe that the underscore is causing ffmpeg to fail the encoding since its looking for ".%04d.ext"

I am not really sure where or why that extra underscore is getting added.

danbradham commented 3 weeks ago

Yeah that is interesting. We don't normally render EXR's out of After Effects, so I haven't bumped into this issue yet. I'll make a new issue for this and see if I can't take a look this week.

In regards to EXR sequences, this tool was built with sRGB / rec709 in mind, so there is no built-in color management in tk-aftereffects-queue at this time. It would be possible to do a conversion from Linear rec709 via FFMPEG, but for more complex color systems like ACEScg another step would need to be added to the render pipeline for tk-aftereffects-queue, probably using ociotool.exe to convert HDR exrs to SDR pngs. Not out of the question but it would require some additional development time. We typically render Prores as our AE outputs.