Upload files to 'studio'
This commit is contained in:
parent
ce27337298
commit
1920944a5d
4 changed files with 154 additions and 23 deletions
|
@ -753,9 +753,15 @@ def draw(outlayer, win, path, back="story_editor"):
|
||||||
if task["fraction"]:
|
if task["fraction"]:
|
||||||
task["fraction"] = 0.0
|
task["fraction"] = 0.0
|
||||||
history.record(win, path, "[Un-Checked]", schedulepath)
|
history.record(win, path, "[Un-Checked]", schedulepath)
|
||||||
|
win.textactive = ""
|
||||||
|
try: del win.text["editing_task"]
|
||||||
|
except: pass
|
||||||
else:
|
else:
|
||||||
task["fraction"] = 1.0
|
task["fraction"] = 1.0
|
||||||
history.record(win, path, "[Checked]", schedulepath)
|
history.record(win, path, "[Checked]", schedulepath)
|
||||||
|
win.textactive = ""
|
||||||
|
try: del win.text["editing_task"]
|
||||||
|
except: pass
|
||||||
|
|
||||||
# Saving
|
# Saving
|
||||||
save(path, win.checklists[path])
|
save(path, win.checklists[path])
|
||||||
|
|
|
@ -1,7 +1,20 @@
|
||||||
# THIS FILE IS A PART OF VCStudio
|
####################################
|
||||||
# PYTHON 3
|
# #
|
||||||
|
# COPYRIGHT NOTICE #
|
||||||
# This a console project manager.
|
# #
|
||||||
|
# This file is a part of Victori- #
|
||||||
|
# ous Children Studio Organizer. #
|
||||||
|
# Or simply VCStudio. Copyright #
|
||||||
|
# of J.Y.Amihud. But don't be sad #
|
||||||
|
# because I released the entire #
|
||||||
|
# project under a GNU GPL license. #
|
||||||
|
# You may use Version 3 or later. #
|
||||||
|
# See www.gnu.org/licenses if your #
|
||||||
|
# copy has no License file. Please #
|
||||||
|
# note. Ones I used the GPL v2 for #
|
||||||
|
# it. It's no longer the case. #
|
||||||
|
# #
|
||||||
|
####################################
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -449,7 +462,7 @@ def layer(win):
|
||||||
x = win.current["w"]/4
|
x = win.current["w"]/4
|
||||||
y = 280
|
y = 280
|
||||||
width = win.current["w"] / 2
|
width = win.current["w"] / 2
|
||||||
height = (win.current["h"]-300)/2
|
height = 100
|
||||||
|
|
||||||
# Now let's make a layer.
|
# Now let's make a layer.
|
||||||
|
|
||||||
|
@ -570,6 +583,7 @@ def layer(win):
|
||||||
# how much stuff is done and how much stuff is not yet done. A kind of second
|
# how much stuff is done and how much stuff is not yet done. A kind of second
|
||||||
# graph, so to speak. But representing differnt kind of data.
|
# graph, so to speak. But representing differnt kind of data.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# OKAY. SETTINGS.
|
# OKAY. SETTINGS.
|
||||||
|
|
||||||
|
@ -647,7 +661,7 @@ def layer(win):
|
||||||
|
|
||||||
|
|
||||||
y = y + height + 60
|
y = y + height + 60
|
||||||
height = height - 100
|
height = win.current["h"]-500
|
||||||
|
|
||||||
# Making the layer
|
# Making the layer
|
||||||
graphsurface = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(width), int(height))
|
graphsurface = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(width), int(height))
|
||||||
|
@ -743,14 +757,15 @@ def layer(win):
|
||||||
node.show_text(theday.split("/")[2])
|
node.show_text(theday.split("/")[2])
|
||||||
|
|
||||||
UI_color.set(node, win, "dark_overdrop")
|
UI_color.set(node, win, "dark_overdrop")
|
||||||
if theday == today:
|
if theday >= today:
|
||||||
UI_color.set(node, win, "button_clicked")
|
if theday == today:
|
||||||
UI_elements.roundrect(node, win,
|
UI_color.set(node, win, "button_clicked")
|
||||||
5+current_X+win.scroll["days"],
|
UI_elements.roundrect(node, win,
|
||||||
67,
|
5+current_X+win.scroll["days"],
|
||||||
40,
|
67,
|
||||||
height-67,
|
40,
|
||||||
10)
|
height-67,
|
||||||
|
10)
|
||||||
|
|
||||||
if win.current["date"] == theday:
|
if win.current["date"] == theday:
|
||||||
UI_color.set(node, win, "progress_background")
|
UI_color.set(node, win, "progress_background")
|
||||||
|
@ -845,10 +860,48 @@ def layer(win):
|
||||||
offset=[x,y],
|
offset=[x,y],
|
||||||
fill=False)
|
fill=False)
|
||||||
node.stroke()
|
node.stroke()
|
||||||
|
|
||||||
|
##################### BOTTOM GRAPH #######################
|
||||||
|
|
||||||
|
# Blender-Organizer legacy had two graphs. One smaller
|
||||||
|
# that shows all the project from start to finish
|
||||||
|
# ( Implemented above ) and one bigger. That shows a
|
||||||
|
# Zoomed in version of the graph. Back then I made it
|
||||||
|
# executing the same code twice. Which was fine. Since
|
||||||
|
# I had to make a change only ones. Now it's a bit of a
|
||||||
|
# problem to do so. Since the graph above is baked. And
|
||||||
|
# need to be able to navigate with in the bottom graph.
|
||||||
|
|
||||||
|
# So instead I'm going to redo the graph, but since we
|
||||||
|
# are re-doing it. I gonna make a slightly different design.
|
||||||
|
# It will show the same exact data. But drawn with a bit more
|
||||||
|
# beauty, compared to the top graph.
|
||||||
|
|
||||||
|
for num, thing in enumerate(reversed(cat)):
|
||||||
|
if cat[thing][0]:
|
||||||
|
UI_color.set(node, win, cat[thing][2])
|
||||||
|
try:
|
||||||
|
fracs = win.analytics["dates"][theday]["fractions"]
|
||||||
|
gfraction = fracs[thing]
|
||||||
|
# For now I will implement only Linear mode
|
||||||
|
# other modes will come later
|
||||||
|
graphY = ((height-80) - (height-80) * gfraction)+60
|
||||||
|
|
||||||
|
UI_elements.roundrect(node, win,
|
||||||
|
8+current_X+win.scroll["days"],
|
||||||
|
graphY,
|
||||||
|
35,
|
||||||
|
8,
|
||||||
|
5)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Now here I want to draw the representations of scheduled
|
# Now here I want to draw the representations of scheduled
|
||||||
# tasks that are insife
|
# tasks that are inside
|
||||||
|
|
||||||
sch = []
|
sch = []
|
||||||
if theday in win.analytics["dates"]:
|
if theday in win.analytics["dates"]:
|
||||||
|
@ -887,7 +940,7 @@ def layer(win):
|
||||||
|
|
||||||
current_X = current_X + 50
|
current_X = current_X + 50
|
||||||
|
|
||||||
|
|
||||||
UI_color.set(node, win, "dark_overdrop")
|
UI_color.set(node, win, "dark_overdrop")
|
||||||
UI_elements.roundrect(node, win,
|
UI_elements.roundrect(node, win,
|
||||||
5+prevyear[1]+2,
|
5+prevyear[1]+2,
|
||||||
|
|
|
@ -61,7 +61,34 @@ def run(project, win):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Sometimes the projects could be corrupted. So we need to
|
||||||
|
# insure that they are alright.
|
||||||
|
|
||||||
|
|
||||||
|
fn = project
|
||||||
|
try: os.mkdir(fn)
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/rnd")
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/dev")
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/ast")
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/pln")
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/mus")
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/set")
|
||||||
|
except: pass
|
||||||
|
|
||||||
|
for f in ["chr","loc","veh","obj"]:
|
||||||
|
try: os.mkdir(fn+"/ast/"+f)
|
||||||
|
except: pass
|
||||||
|
try: os.mkdir(fn+"/dev/"+f)
|
||||||
|
except: pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Setting up the window
|
# Setting up the window
|
||||||
win = Gtk.Window()
|
win = Gtk.Window()
|
||||||
|
@ -241,12 +268,25 @@ def pmdrawing(pmdrawing, main_layer, win):
|
||||||
# Current frame (for animations and things like this)
|
# Current frame (for animations and things like this)
|
||||||
win.current["frame"] += 1
|
win.current["frame"] += 1
|
||||||
|
|
||||||
|
if not "scale" in win.settings:
|
||||||
|
settings.write("scale", 1) # Writing to file
|
||||||
|
win.settings = settings.load_all()
|
||||||
|
|
||||||
# Getting data about the frame
|
# Getting data about the frame
|
||||||
win.current['mx'] = win.get_pointer()[0]
|
win.current['mx'] = int(round(win.get_pointer()[0] / win.settings["scale"]))
|
||||||
win.current['my'] = win.get_pointer()[1]
|
win.current['my'] = int(round(win.get_pointer()[1] / win.settings["scale"]))
|
||||||
win.current['w'] = win.get_size()[0]
|
win.current['w'] = int(round(win.get_size()[0] / win.settings["scale"] ))
|
||||||
win.current['h'] = win.get_size()[1]
|
win.current['h'] = int(round(win.get_size()[1] / win.settings["scale"] ))
|
||||||
|
|
||||||
|
if 65451 in win.current["keys"]:
|
||||||
|
settings.write("scale", win.settings["scale"]+0.2)
|
||||||
|
win.settings = settings.load_all()
|
||||||
|
win.current["keys"] = []
|
||||||
|
|
||||||
|
elif 65453 in win.current["keys"]:
|
||||||
|
settings.write("scale", win.settings["scale"]-0.2)
|
||||||
|
win.settings = settings.load_all()
|
||||||
|
win.current["keys"] = []
|
||||||
|
|
||||||
win.cursors = {
|
win.cursors = {
|
||||||
"arrow":Gdk.Cursor.new(Gdk.CursorType.ARROW),
|
"arrow":Gdk.Cursor.new(Gdk.CursorType.ARROW),
|
||||||
|
@ -283,8 +323,8 @@ def pmdrawing(pmdrawing, main_layer, win):
|
||||||
main_layer.rectangle(
|
main_layer.rectangle(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
win.current['w'],
|
win.current['w']*win.settings["scale"],
|
||||||
win.current['h'])
|
win.current['h']*win.settings["scale"])
|
||||||
main_layer.fill()
|
main_layer.fill()
|
||||||
|
|
||||||
# Tooltips and other junk has to be defined here. And then drawn later to
|
# Tooltips and other junk has to be defined here. And then drawn later to
|
||||||
|
@ -355,6 +395,10 @@ def pmdrawing(pmdrawing, main_layer, win):
|
||||||
Layers.append([UI_testing.layer(win)])
|
Layers.append([UI_testing.layer(win)])
|
||||||
Layers.append([win.tooltip_surface])
|
Layers.append([win.tooltip_surface])
|
||||||
|
|
||||||
|
if win.settings["scale"] != 1:
|
||||||
|
main_layer.scale(win.settings["scale"],
|
||||||
|
win.settings["scale"])
|
||||||
|
|
||||||
# Combining layers
|
# Combining layers
|
||||||
for layer in Layers:
|
for layer in Layers:
|
||||||
if len(layer) > 1:
|
if len(layer) > 1:
|
||||||
|
|
|
@ -564,6 +564,34 @@ def layer(win):
|
||||||
layer.move_to(win.current["w"]/2-180,
|
layer.move_to(win.current["w"]/2-180,
|
||||||
current_Y + win.scroll["studio_settings"] + 135)
|
current_Y + win.scroll["studio_settings"] + 135)
|
||||||
layer.show_text(talk.text("Auto_De-Blur"))
|
layer.show_text(talk.text("Auto_De-Blur"))
|
||||||
|
|
||||||
|
current_Y += 50
|
||||||
|
|
||||||
|
# Pixelated Blur
|
||||||
|
|
||||||
|
ablur_ok = "unchecked"
|
||||||
|
if win.settings["PixelBlur"]:
|
||||||
|
ablur_ok = "checked"
|
||||||
|
|
||||||
|
def do():
|
||||||
|
win.settings["PixelBlur"] = not win.settings["PixelBlur"]
|
||||||
|
settings.write("PixelBlur", win.settings["PixelBlur"])
|
||||||
|
|
||||||
|
UI_elements.roundrect(layer, win,
|
||||||
|
win.current["w"]/2-240,
|
||||||
|
110 + current_Y + win.scroll["studio_settings"],
|
||||||
|
450,
|
||||||
|
40,
|
||||||
|
10,
|
||||||
|
button=do,
|
||||||
|
icon=ablur_ok,
|
||||||
|
tip=talk.text("PixelBlur"))
|
||||||
|
|
||||||
|
UI_color.set(layer, win, "text_normal")
|
||||||
|
layer.set_font_size(20)
|
||||||
|
layer.move_to(win.current["w"]/2-180,
|
||||||
|
current_Y + win.scroll["studio_settings"] + 135)
|
||||||
|
layer.show_text(talk.text("PixelBlur"))
|
||||||
|
|
||||||
current_Y += 50
|
current_Y += 50
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue