-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshader_editor.py
More file actions
35 lines (28 loc) · 864 Bytes
/
shader_editor.py
File metadata and controls
35 lines (28 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys
import os,os.path
from net.cemetech.sfgp.freebuild.drivers import Drivers
from java.lang import System
def main(*argv):
print "//---------------------------------------------"
print
print "Parsing startup arguments for shader editor"
Drivers.clearMainDriver()
from net.cemetech.sfgp.freebuild.gfx import GFX
gfxCtx = GFX.init("Shader Editor Viz. Frame")
if gfxCtx != None:
print "Success!"
else:
print "Initialization failed."
print
print "---------------------------------------------//"
print
from scripts.editor import shaderUI
from java.util.concurrent import TimeUnit
compiler_hook = shaderUI.init_editor()
if gfxCtx != None:
while gfxCtx.open():
task = compiler_hook.tasks.poll(300,TimeUnit.MILLISECONDS) # This blocks too hard
if task != None:
task.run()
if __name__ == "__main__":
main(*sys.argv[1:])