-
-
Save derekbrokeit/1b84b2ad3503395f1041 to your computer and use it in GitHub Desktop.
Set mono as default for pymol. Pymol stereo can still be run with `pymol -S`
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
diff --git a/modules/pymol/__init__.py b/modules/pymol/__init__.py | |
index 3b95856..a28970a 100644 | |
--- a/modules/pymol/__init__.py | |
+++ b/modules/pymol/__init__.py | |
@@ -163,6 +163,12 @@ if pymol_launch != 3: # if this isn't a dry run | |
# or via execfile(".../pymol/__init__.py",...) from main | |
if not hasattr(__main__,"pymol_argv"): | |
+ try: | |
+ # check if explicitly stereo | |
+ idx_explicit_stereo = sys.argv.index("-S") | |
+ except ValueError: | |
+ # force mono | |
+ sys.argv += ["-M"] | |
__main__.pymol_argv = sys.argv | |
pymol_launch = -1 # non-threaded launch import flag | |
@@ -530,6 +536,12 @@ if pymol_launch != 3: # if this isn't a dry run | |
args = pymol_argv+["-K"] # keep PyMOL thread alive | |
else: | |
args = list(args) | |
+ try: | |
+ # check if explicitly stereo | |
+ idx_explicit_stereo = args.index("-S") | |
+ except ValueError: | |
+ # force mono | |
+ args += ["-M"] | |
if pymol_launch == 2: # spawn thread -- 'import pymol' | |
global glutThreadObject | |
cmd.reaper = threading.currentThread() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment