0

Allow SG Review initialization to occur from an internal signal

Hi,

It seems that currently there's no way to initialize the SG Review programmatically.

Based on Michael Kessler suggestion you can do a hack:

commands.sendInternalEvent( "external-sgtk-launch-app",  '{"server":"https://example.shotgunstudio.com", "app":"none"}')

 

But as he told me this will throw an error:

ERROR: sgtk_rv_bootstrap don't know how to launch app 'none'.

 

It could be possible to fix that in order to accept a "none" app?

 

Thanks.

 

7 comments

  • Avatar
    Alan Trombla Official comment

    Hi Manuel,

    If you're OK with the sendEvent path (which seems nice and tidy to me), I think the easiest/clearest thing to do would be for us to add an "external-sgtk-initialize" event.   Does that sound right ?

    Cheers,

    Alan

  • 0
    Avatar
    Manuel Agost

    Hi Alan,

    The new event looks fine to me.

     

    Thanks,

    Manu.

     

  • 0
    Avatar
    (Michael) Kessler

    Manuel,

     

    This event is fairly easily patched in if you are willing to override your sgtk_bootstrap higher on your RV_SUPPORT_PATH.

     

    --- /Applications/RVSDI.app/Contents/PlugIns/Python/sgtk_bootstrap.py 2017-04-16 20:38:26.000000000 -0700
    +++ /Applications/RV64.app/Contents/PlugIns/Python/sgtk_bootstrap.py 2017-04-20 16:16:04.000000000 -0700
    @@ -62,6 +62,7 @@
    ("external-gma-play-entity", self.pre_process_event, ""),
    ("external-gma-compare-entities", self.pre_process_event, ""),
    ("external-sgtk-launch-app", self.pre_process_event, ""),
    + ("external-sgtk-initialize", self.pre_process_event, ""),
    ("license-state-transition", self.license_state_transition, "")
    ],
    None
    @@ -129,6 +130,9 @@
    elif name == "external-launch-submit-tool":
    rvc.sendInternalEvent("launch-submit-tool", "")
    rve.displayFeedback2("", 0.1)
    +
    + elif name == "external-sgtk-initialize":
    + rve.displayFeedback2("", 0.1)

    def process_queued_events(self):
    if self.event_queue:

     

    I've started the process to get this incorporated into a future release, but you should be able to apply that to a local copy for the time being.

     

    -Kessler

  • 0
    Avatar
    (Michael) Kessler

    It looks like the forum ate my spacing, but should be easy enough to see that the displayFeedback line should be indented.

  • 0
    Avatar
    Manuel Agost

    Hi Michael,

    Sorry but I have been working in other stuff and I had no time to look into this. I hope to be able to take a look at this again in a couple of weeks.

    When do you think this will be released?

    Thanks,

    Manu.

     

  • 0
    Avatar
    (Michael) Kessler

    Hi Manu,

    Sorry for the delay,
    I've gotten this rolled into the approval process, my hope is to get this out for an upcoming patch release, but I don't have a definitive date.  Once it is in a pre-release I'd like to get you to try it out if you are willing.

    Thanks,
    -Kessler

  • 0
    Avatar
    Manuel Agost

    Cool!

    Thanks for looking into this.

    Manu.

Please sign in to leave a comment.