Exemple #1
0
# when Rumba software version is above the tested one.
SHOW_COMP_DLG = "SGTK_COMPATIBILITY_DIALOG_SHOWN"

# this is the absolute minimum Rumba version for the engine to work. Actually
# the one the engine was developed originally under, so change it at your
# own risk if needed.
MIN_COMPATIBILITY_VERSION = 1.1

# this is a place to put our persistent variables between different documents
# opened
if not hasattr(rumba, "shotgun"):
    rumba.shotgun = lambda: None

# Although the engine has logging already, this logger is needed for logging
# where an engine may not be present.
logger = LogManager.get_logger(__name__)
logger.debug("Loading engine module...")


# detects if the application has be run in batch mode or not
def is_batch_mode():
    return rumbapy.args().no_gui


# logging functionality
def show_error(msg):
    from PySide2.QtWidgets import QMessageBox

    if not is_batch_mode():
        QMessageBox.critical(None, "Shotgun Error | %s engine" % APPLICATION_NAME, msg)
    else:
Exemple #2
0
def get_logger():
    # This is present for backwards compatibility with older tk-core's.
    # Lazy import to avoid poluting the module's namespace.
    import tank.authentication
    from tank.log import LogManager
    return LogManager.get_logger(tank.authentication.__name__)