0

tk-multi-workfiles: Where is the data for each task loaded?

Our rigging lead wants to be able to name a task in the Rigging pipeline step "Whole", "Body", "Face" or "Combine rigs" by just picking it from a dropdown (for reasons). I have admin access, but don't seem to be able to configure the 'task_name' field to be a list instead of text. So instead we've settled for naming all Rigging tasks "Rig", adding a column called 'Subtask' (code 'sg_subtask') to the Rigging step, and making that a list with the desired values.

Unfortunately, this means over in Maya, the Shotgun File Manager ends up with say 3 tasks associated with a given asset that all just say "Task: Rig". Instead, I want those with subtasks to say something like "Task: Rig, Subtask: Body" so the artist knows which one they're loading into the scene.

I've located the process_result(self, result) method in task_browser.py and altered the way that particular display string is concatenated.

# figure out the name to display for the task
task_name = "<b>Task: %s" % d.get("content", "") #where d is extracted from the results param a bit higher up
subtask_name = d.get("sg_subtask", "")
if subtask_name != "":
task_name += " Subtask: " + subtask_name + "</b>"
else:
task_name += "</b>"

But of course it turns out that d does not contain the sg_subtask key. I want to find where results is constructed (ie where process_results is called from) so I can tell it to load in that field too, but I can't seem to locate it in the code. Can you point me to it?

Also, thinking about it now, I'm wondering if I need to decant this somewhow into a hook so that it remains after an app update. Any pointers here also welcome! :)

 

6 comments

  • 0
    Avatar
    Permanently deleted user

    Hey Katherine!

    There is a config parameter called task_extra_display_fields that I think you could potentially use. Do you think this would work in your case?

    Check it out here: https://support.shotgunsoftware.com/entries/95440857#toc_configuration

    If that doesn't work, we can discuss adding a hook. Also, have you guys started to try out the new file manager? That has got many options for configuration and structuring your view into Shotgun. I suspect this may be the best way forward! We are about to officially release it very shortly.

     

  • 0
    Avatar
    Katherine Rix

    Hey Manne,

    Just letting you know I've seen this. The field you suggested will probably work great for us, so no worry about a hook (phew!). I may have another question or two once I get on to this, just swamped for the next couple of days. I'll get back to you as soon as I've tried it with my questions or to mark as solved.

    Thanks so much for your help! You guys have been great with us and we really appreciate it!

  • 0
    Avatar
    Katherine Rix

    Hi Manne,

    Actually, after speaking to the production team some more, what they'd really like is a way to pick the task name from a dropdown so that the input can be constrained. So they don't want the task "Rig" with subtask "Body", "Face", "Hands' etc. They want the task name itself to actually be "Rig body", "Rig face", "Rig hands" picked from a dropdown.

    What I've thought of is:

    - rename the sg_subtask list field I made from "Subtask" to "Task"

    - configure the layout of the task form to hide "Task" (secretly task_name), and in its place display "Task" (secretly sg_subtask) so the creator can pick from a dropdown

    - somehow populate the task_name field with the selected dropdown value after they click Create Task button

    - on the shotgun site, hide sg_subtask column and display the now populated task_name column

     

    I think this approach could work as it wouldn't interfere with the way Shotgun already works, would constrain input as desired, but would still retain teh ability to click on a task and go to its detail view (something we'd lose if I just hid task_name and displayed sg_subtask).

    How can I populate task_name from another field in the form?

  • 0
    Avatar
    Katherine Rix

    NB: this has also now moved from a priority 3 issue to a priority 1 issue as we've realised we need to nail down the interface production interacts with

  • 0
    Avatar
    Permanently deleted user

    Hey! Sounds good - as long as you push a value to the task_name field, things should work ok. (The task name is used everywhere both in the shotgun web interface and in Toolkit, so leaving it empty will be very confusing.)

    We don't currently have a built-in solution for value propagation like you describe. However, I suggest you check out the Shotgun Event Trigger framework - http://developer.shotgunsoftware.com/shotgun.html - using this, it is fairly straightforward (programming involved!) to set up automation recipes that can for example be used to propagate a value change like this. 

    Thanks!
    Manne

     

  • 0
    Avatar
    Katherine Rix

    Hi Manne, this is fantastic, thanks so much!

Please sign in to leave a comment.