def _add_metadata_to_node(item, rv_node): """ Add metadata from otio "item" to rv_node """ if item.metadata: otio_metatada_property = rv_node + ".otio.metadata" commands.newProperty(otio_metatada_property, commands.StringType, 1) commands.setStringProperty(otio_metatada_property, [str(item.metadata)], True)
def launch_submit_tool(self): # Flag the session as "sgreview.submitInProgress" so JS submit tool # code can tell this is not Screening Room. # prop = "#Session.sgreview.submitInProgress" try: rvc.newProperty(prop, rvc.IntType, 1) except: pass rvc.setIntProperty(prop, [1], True) rv.runtime.eval( """ { require shotgun_mode; require shotgun_review_app; require shotgun_upload; if (! shotgun_mode.localModeReady()) { // Silence the mode first, then activate it. // shotgun_mode.silent = true; shotgun_mode.createLocalMode(); } if (! shotgun_review_app.localModeReady()) { // Silence the mode first, then activate it. // shotgun_review_app.silent = true; shotgun_review_app.createLocalMode(); } if (! shotgun_upload.localModeReady()) { // Silence the mode first, then activate it. // shotgun_upload.silent = true; shotgun_upload.createLocalMode(); } shotgun_review_app.theMode().internalLaunchSubmitTool(); } """, [])