-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.py
More file actions
23 lines (18 loc) · 715 Bytes
/
ui.py
File metadata and controls
23 lines (18 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from ui_graphics import UIGraphics
from Node_Types import *
DEBUG = False
class UI:
def __init__(self, scene, nodetypes):
self.scene = scene
self.console = self.scene.console
self.nodeTypeList = nodetypes
self.graphics = UIGraphics(self, scene)
self.nodeChoice = nodetypes[0]
def addNode(self):
nodeChoice = self.nodeChoice
nodeClassName = "NT_" + nodeChoice
nodeGenString = nodeChoice + "." + nodeClassName + "(self.scene)"
if DEBUG: self.console.log("Creating Instance for Node Type: " + str(self.nodeChoice))
eval(nodeGenString)
def nodeChoice(self, text):
self.nodeChoice = text