Python USD API: Getting .USD output path

   1615   2   2
User Avatar
Member
53 posts
Joined: 7月 2017
Offline
Hi all,

I'm working on an custom USD/Husk plugin and submitter for Deadline, but getting stuck on one of the last pieces of the puzzle.
On submission I'm using the USD API to open the .usd file and get the main render settings that I want to be able to customize and pass along to the husk command. Most of the attributes I get without issues, but not the output path/render file.

In the Scene Graph, under the RenderProduct primtype, the output path and file is displayed on the productName attribute. But this is the only attribute that return an empty string when I try to get it via Python code. I do assume it's because it's a dynamic token changing from frame to frame. I'm probably overlooking something simple - or perhaps making it overly complex..

Question is - how can I get the output path from the .USD file via Python?
User Avatar
Member
53 posts
Joined: 7月 2017
Offline
Found the solution. The usd attribute Get() function takes an optional time argument that evaluates the attribute at that given frame.
User Avatar
Member
6 posts
Joined: 3月 2016
Offline
I had to reply to say thank you as I was struggling with this, and for the same reason too (deadline submitter!) I noticed the attribute was green but didn't quite twig adding the argument to Get(), cheers!
  • Quick Links