0

Getting the actual Shotgun context

 Hi, I'm trying to access the current Shotgun project in RV, but engine.context.project returns None. What would be the correct way of getting this kind of information?

Thanks in advance,
Edgard 

5 comments

  • 0
    Avatar
    (Michael) Kessler

    Hi Edgard,

     

    Because RV is a multi-context application that could potentially be bringing up content from multiple projects, you won't have a context set application-wide; however, you can get at the source information, which includes the project.

    To get at the current source's project, you can use the following:

    engine.apps['tk-rv-shotgunreview']._rv_activity_stream.version_data_from_source()['project']
  • 0
    Avatar
    Edgard Damiani

    Hi Michael,

    Thank you for your prompt reply, it worked!

    If possible, let me ask you another thing: I'm trying to get the cut in and cut out points defined inside RV based on its current context so I can store them inside the related Shotgun project -- should I use some method from _rv_activity_stream to reach the cut points?

     

    Thanks!
    Edgard

  • 0
    Avatar
    (Michael) Kessler

    Hi Edgard,

    How are the cut in/cut out points defined?  Is this media already loaded with SG Review?

    If you want to share a session file of what you were thinking of trying to capture, you can submit a ticket with the session file and I can help you there.

    Thanks,

    -Kessler

  • 0
    Avatar
    Edgard Damiani

    Hi Michael,

    In theory, the media would be already loaded in Shotgun and opened in RV. What the artists are asking for is a way of defining the cut points using the time slider (using "Set In Frame to X" and "Set Out Frame to X") and then saving these newly-defined points together with the media inside Shotgun. As a starting point, I'm analyzing an isolated cut item loaded in RV and trying to figure out how to reach both its ID and the added cut points so I can update the cut item inside Shotgun.

    Does it make sense? I'm fairly new to Shotgun/RV, so there's a chance that I'm messing up with the terminology.

    Thank you for your patience,
    Edgard

  • 0
    Avatar
    Edgard Damiani

    Hi Kessler (I realized that your name is inside parenthesis, so I suppose you might prefer being called by your surname :-),

    Just to let you know that I've opened a ticket (#84596) as you suggested.

    Thanks,
    Edgard

Please sign in to leave a comment.