#
# This example demonstrates how to temporarily change the user's
# AutoInspect preference (if enabled, property pages always pop
# up for objects newly created via command). It also illustrates
# how Softimage automatically reverts any scripting change to this
# preference after the script runs.
#
from win32com.client import constants as cns
app = Application
# Current value of AutoInspect
app.LogMessage( app.Preferences.GetPreferenceValue("Interaction.autoinspect") )
# Toggle the orginal value and re-log the value
app.Preferences.SetPreferenceValue(
"Interaction.autoinspect",
not( app.Preferences.GetPreferenceValue("Interaction.autoinspect") )
);
app.LogMessage( app.Preferences.GetPreferenceValue("Interaction.autoinspect") )
# If your AutoInspect preference was enabled originally, the History Log
# would display the following:
# INFO : True
# INFO : False
# VERBOSE : Restoring preference changed by script: Interaction.autoinspect
# If your AutoInspect preference was disabled originally, the History Log
# would display the following:
# INFO : False
# INFO : True
# VERBOSE : Restoring preference changed by script: Interaction.autoinspect |