Interactive/DisableThemeSwitch.py

#-
# (C) Copyright 2012 Autodesk, Inc.  All rights reserved.
#
# This computer source code and related instructions and comments are
# the unpublished confidential and proprietary information of
# Autodesk, Inc. and are protected under applicable copyright and
# trade secret law.  They may not be disclosed to, copied or used by
# any third party without the prior written consent of Autodesk, Inc.
#+


# Some of the visual desktop themes supported under Microsoft Windows
# can cause severe performance degradations for interactive applications
# such as Showcase. For this reason, Showcase currently asks the operating
# system to disable these visual themes when it first starts running. This
# typically causes the desktop them to be changed to the "Windows Basic" theme
# for the duration of the Showcase session.
#
# Users can disable this switch at startup time by loading this add-in named
# "DisableThemeSwitch.py". Note that Showcase must be restarted after loading
# this add-in. When this add-in is active some workflows may cause Showcase
# to become unresponsive (or very slowly responsive) to user inputs.

from UserCustomization  import UserCustomBase
from RTFapi             import SystemInformation

class NoThemeSwitch( UserCustomBase ):
    def __init__( self ):
        print "Disabling switch to Windows Basic Theme"
        SystemInformation.instance().setDisableThemeSwitch(True)


def instantiate():
    return NoThemeSwitch()