Skip to content
Snippets Groups Projects
Commit 0a8f309a authored by stefan's avatar stefan
Browse files

Fixes: BZDNG-102 (Make it easier: always display solution in thin lines/transparent)

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2144 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 92aa6d63
Branches
Tags
No related merge requests found
......@@ -3,6 +3,7 @@ NAME: Glyoxalase
DIFFICULTY: Chuck Norris like..
TIME: 60000
SAVE: 1
SHOW_SOLUTION: 0
GOAL: 0.0
[Intro]
......
......@@ -3,6 +3,7 @@ NAME: Tutorial 1
DIFFICULTY: Einfhrungs Training
TIME: 60000
SAVE: 0
SHOW_SOLUTION: 0
GOAL: 1.0
[Intro]
......
......@@ -3,6 +3,7 @@ NAME: Tutorial 2
DIFFICULTY: Fortgeschrittenes Training
TIME: 60000
SAVE: 0
SHOW_SOLUTION: 0
GOAL: 1.0
[Intro]
......
......@@ -5,6 +5,16 @@ class Ligand:
def __init__(self, ligand, config=None):
self.handle=ligand
self.solution=ligand.Copy().CreateFullView()
try:
show_sol = bool(int(config.Level["SHOW_SOLUTION"]))
except KeyError:
show_sol = True
if show_sol:
self.sol_go=gfx.Entity("Solution", gfx.SIMPLE, self.solution)
self.sol_go.SetColor(gfx.GREEN, 'ele=C')
else:
self.sol_go = None
gfx.Scene().Add(self.sol_go)
self.go=gfx.Entity("Ligand", gfx.CPK, self.handle)
self.go.SetColor(gfx.GREEN, 'ele=C')
self.go.cpk_options.SetSphereDetail(7)
......@@ -93,6 +103,8 @@ class Ligand:
self.go.UpdatePositions()
def Close(self):
if self.sol_go:
gfx.Scene().Remove(self.sol_go)
gfx.Scene().Remove(self.go)
del(self.go)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment