I am trying colour code my version pages so that versions go red if their sg_frame_count field does not match the linked shot’s sg_working_duration. I thought I could achieve this by creating a calculated Version field (checkbox) that does the comparison and sets it’s value to true/false accordingly. Then I could set up a simple page rule based on the field’s value.
Turns out calculated fields don’t seem to allow accessing a linked entity’s field? At least it’s not apparent.
I could use the event listener but would rather not.
Any ideas?
Hey Frank,
Using the event daemon is your best option, right now. We will revisit calculated fields at some stage in the future, and hope to include linked fields as part of that v02, but we have no plans in the short term.
Cheers,
Ok, thanks for confirming Mason.
I do hope calculated fields will get a review sooner than later. In their current state they are of little more use to us than calculating frame ranges based on handles, and that is something that gets published via python anyway and could thus be calculated at the ingest stage stage.
I wonder what other people use those for with their current limitations of not being able to reference linked entities?!
We use a calculated field (converting frames to minutes) to calculate how many minutes of animation (or whatever stage - layout, etc.) we have completed to see if we’re on target for our project. The formula is a bit clunky and we never figured out how to get it to say “min” and not “hrs” but by golly, we know what it’s referring to and we love our little red-headed calculated field stepchild!
This is a really fundamental mechanism that Shotgun must be able to do better.
I’m just working on making Alembic caches’ frame ranges validating in much the same way.
Thorny subtopics (relating to the need for more robust ‘calculated’ metadata-fields) will present themselves… eg.: the need to be smart about not flagging pre-roll frame ranges (added for for simulations) throwing off any “this asset isn’t set to the right frame range”-red flags.
QC’ing assets can be done elsewhere but the notifications need to go right into Shotgun in the right dependency location, but, it’s a question of just how much of the surrounding metadata needs to be visible in Shotgun to help paint a contextual picture. It’s a “easything to add” metastasizing into a complete nightmare decision point when you get into the implementation – esp. when you have to decide if you need to add more fields – my pet peeve.
In my quest to avoid extra fields (specifically for “correct frame range” tracking) I prototyped using one field (link to a “Cut Item”) rather than adding two fields to Published File entities (start frame, end frame). Only some files have a timeline, after all.
The jury is still out – because there are costs and risks in polluting what ostensibly is an editorial entity into a general-purpose timeline entity.
that sounds cool for an animation project.
Though for us it’s more important to ensure that versions in Shotgun
are actually of the correct length as per the recorded timecodes for
the respective shot.
It has happened too many times that editorial ended up with
incorrect frame ranges when a delivery had to happen under pressure.
The calculate field seemed a perfect solution as versions could go
be drawn red (or whatever) immediately upon viewing and any mistakes
would be caught straight away - if it could reference linked
entities.
I didn’t mean to suggest you should use it similarly - I was just being sort of silly in response to your “what do people use this for?” I agree it’d would be great to have it calculate on linked entities.
So just to conclude this thread for posterity, my solution was this:
added a version checkbox field called “sg_matching_duration”
added a plugin to the event daemon to react to a Shot’s sg_head_in and sg_tail_out fields as well as a version’s frame count field.
if the event comes from a version field I compare it’s frame count to the shot’s working duration and assign a new value to the sg_matching_duration accordingly
if the event came from a shot I cycle through all the linked versions and run the check for each one
set up a global page filter that colour codes versions red if their sg_matching_duration is not checked (make sure it’s the top page rule so it won’t get overwritten by others)
This took a fair amount of time and has to wait for the event daemon to do it’s thing, but it seems to work.
It would be much preferable though if we could use a calculated field to do the above.
Just checking in on this as I had grief with my shotgun listener which of course toppled my workaround and my version colours went crazy.
Any chance to be able to use linked entities in calculated fields any time soon? Seems like a very powerful feature that SG is missing here.
Hey @frank - no plans at this time to include linked entities in Calculated fields, but if you haven’t submitted a feature request for this, you can head on over to the ole roadmap and Submit an Idea
Thanks Beth,
that is very disappointing to hear. I am pretty sure I added this to the roadmap in the past but I can’t find anything on that roadmap page except a handful of items, so I can’t check.
Hey @frank - we recognize the darkness around submitted features is still a bit of a pain point for our clients. Apologies for this. It’s something we have in mind for improvement, but no plan in place at this time. I’ve gone ahead and added the feature request under your name so it’s linked up for you.