0

Where is a list of Shotgun Fields?

There's an example for the template file how to set up a human user key, I've used that successfully, but I'm wondering if there is a comprehensive list somewhere of Shotgun fields and their entity types?  I've looked all over and can't seem to find it.  Embarrassingly, all I really want is the name for the current project, which I noticed is defined for Hiero but doesn't appear to be useable outside of that.  For instance, I want to insert the name of the current project into a file name.

Of course, knowing this particular example is useful, but in the big picture I'm assuming this list lives somewhere.  :)

 

Thanks

 

J.C.

댓글 7개

  • 0
    Avatar
    Ryan Mayeda

    Hi John!

    Shotgun has an Fields page that you can access via the Admin menu in the top right (see below).  This lets you filter and search for fields and in your case, easily find their field codes.  :)

    You can also create a new page of type Field and get the same result as a private page if you don't or can't use the Admin page for whatever reason.

    Screen_Shot_2014-02-19_at_8.40.36_PM.png

    Hope this helps!

    Ryan.

  • 0
    Avatar
    John Coldrick

    Ah cool, thanks Ryan!

     

    J.C.

  • 0
    Avatar
    Ryan Mayeda

    No prob!

  • 0
    Avatar
    John Coldrick

    I do have access to that page(pseudo-admin), and I'm having trouble getting it to work.  I'm putting:

     

    test_name:
    type: str
    shotgun_entity_type: Asset
    shotgun_field_name: project

     

    in the templates file(the only reason I'm using test_name was a concern I was colliding with a reserved name), and if I have a nuke output such as:

     

    RS_jpg:
    definition: '@shot_shallow/{name}_{channel}_v{version}/{test_name}_{Shot}_{name}_{channel}_v{version}.{SEQ}.jpg'
    root_name: Render Drive

     

    it pooches all the custom nodes, i.e. none of them show up.  I don't get an error, they just don't 'take', something seems to be stopping the parsing. None of the custom write nodes show up.  I tried doing something deliberately wrong such as Project instead of project, and that actually gives me an error on launching nuke, which tells me it's working on some level, it just doesn't seem to carry through.

     

    I'm trying to use whatever the project name is as part of a file name, which I would have thought exists in the context of a shot, but is that correct?

     

    Thanks

     

    J.C.

  • 0
    Avatar
    Ryan Mayeda

    Hi John!

    Try defining your template key like this instead:

    test_name:
        type: str
        shotgun_entity_type: Project
        shotgun_field_name: name

    You always have access to the Project entity so you shouldn't have to get a field from it indirectly (i.e. via Asset, for example).  I suppose it might be more intuitive to just let you use {Project} as a token, like you can with other entity folders.  But at the very least, you can get to fields on the Project entity via the Shotgun mappings in template keys.

    Give this a try and let me know how it goes!

    Ryan.

  • 0
    Avatar
    John Coldrick

    That did it, thanks Ryan!

     

    J.C.

  • 0
    Avatar
    Ryan Mayeda

    Great!

댓글을 남기려면 로그인하세요.