Last active
April 14, 2021 18:29
-
-
Save tcrowson/8275360 to your computer and use it in GitHub Desktop.
For Softimage. A quick snippet for running the text in an Annotation property as Python code. This allows you to store Python code in an Annotation property, as part of a scene or model, and run in later. Running this will drop you into a pick session, asking you to choose an Annotation property. No special error handling for now, it's brute-for…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Puts the user into a pick-session, asking you to select an Annotation property | |
# whose text it will then run as Python code. | |
from win32com.client import constants | |
annotation = Application.PickElement(constants.siPropertyFilter,'Choose an Annotation Property','Choose an Annotation Property')[2] | |
exec annotation.Text.Value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment