Better naviation through shots
This commit is contained in:
parent
7a81c17415
commit
cab90e03ee
1 changed files with 44 additions and 4 deletions
|
@ -1690,6 +1690,10 @@ def layer(win):
|
||||||
# Selecting the shot
|
# Selecting the shot
|
||||||
if win.current["script_shot_higlight"] and win.previous["LMB"] and not win.current["LMB"]:
|
if win.current["script_shot_higlight"] and win.previous["LMB"] and not win.current["LMB"]:
|
||||||
win.cur = "/"+scene+"/"+win.current["script_shot_higlight"]
|
win.cur = "/"+scene+"/"+win.current["script_shot_higlight"]
|
||||||
|
|
||||||
|
win.current["shot_left_side_scroll_please_work_omg_wtf"] = True
|
||||||
|
|
||||||
|
|
||||||
# Going to that asset
|
# Going to that asset
|
||||||
|
|
||||||
if win.current["script_asset_higlight"] and win.previous["LMB"] and not win.current["LMB"]:
|
if win.current["script_asset_higlight"] and win.previous["LMB"] and not win.current["LMB"]:
|
||||||
|
@ -2076,16 +2080,28 @@ def layer(win):
|
||||||
"shot_5"
|
"shot_5"
|
||||||
]
|
]
|
||||||
|
|
||||||
# So let's itterate over a lit of shots we've got from the textview.
|
# So let's itterate over a list of shots we've got from the textview.
|
||||||
|
|
||||||
for shotis in shot_list:
|
for shotis in shot_list:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Getting the color. It's not always works.
|
# Getting the color. It's not always works.
|
||||||
|
|
||||||
if "shot_colors" not in win.story:
|
if "shot_colors" not in win.story:
|
||||||
win.story["shot_colors"] = {}
|
win.story["shot_colors"] = {}
|
||||||
|
|
||||||
surl = "/"+scene+"/"+shotis
|
surl = "/"+scene+"/"+shotis
|
||||||
|
|
||||||
|
if "shot_left_side_scroll_please_work_omg_wtf" not in win.current:
|
||||||
|
win.current["shot_left_side_scroll_please_work_omg_wtf"] = False
|
||||||
|
|
||||||
|
if win.current["shot_left_side_scroll_please_work_omg_wtf"] and win.cur == surl:
|
||||||
|
win.scroll["script_shots"] = 0-current_Y_shots+60
|
||||||
|
win.current["shot_left_side_scroll_please_work_omg_wtf"] = False
|
||||||
|
|
||||||
if surl not in win.story["shot_colors"]:
|
if surl not in win.story["shot_colors"]:
|
||||||
|
|
||||||
|
@ -2421,7 +2437,7 @@ def layer(win):
|
||||||
def do():
|
def do():
|
||||||
for i in list_of_folders_to_generate:
|
for i in list_of_folders_to_generate:
|
||||||
try:
|
try:
|
||||||
os.mkdir(win.project+"/rnd"+win.cur+"/"+i)
|
os.makedirs(win.project+"/rnd"+win.cur+"/"+i)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
UI_elements.roundrect(layer, win,
|
UI_elements.roundrect(layer, win,
|
||||||
|
@ -3023,11 +3039,12 @@ def layer(win):
|
||||||
|
|
||||||
# If the shot is not selected I want to be able to select it
|
# If the shot is not selected I want to be able to select it
|
||||||
# even if I can't find it in the text of the script.
|
# even if I can't find it in the text of the script.
|
||||||
|
|
||||||
def do():
|
def do():
|
||||||
win.cur = surl
|
win.cur = surl
|
||||||
|
|
||||||
win.current["scroll_shot_to_in_script"] = True
|
win.current["scroll_shot_to_in_script"] = True
|
||||||
|
win.current["shot_left_side_scroll_please_work_omg_wtf"] = True
|
||||||
|
|
||||||
UI_elements.roundrect(layer, win,
|
UI_elements.roundrect(layer, win,
|
||||||
x,
|
x,
|
||||||
|
@ -3039,7 +3056,30 @@ def layer(win):
|
||||||
fill=False)
|
fill=False)
|
||||||
layer.stroke()
|
layer.stroke()
|
||||||
|
|
||||||
|
|
||||||
|
# Then I want to show the user which state is the shot at the
|
||||||
|
# moment. By putting one of it's icons in the end of the of the
|
||||||
|
# shot choosing button.
|
||||||
|
|
||||||
|
fouricons = [
|
||||||
|
"storyboard",
|
||||||
|
"opengl",
|
||||||
|
"test_rnd",
|
||||||
|
"rendered"
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
for icon in reversed(fouricons):
|
||||||
|
try:
|
||||||
|
files = sorted(os.listdir(win.project+"/rnd"+surl+"/"+icon))
|
||||||
|
except:
|
||||||
|
files = []
|
||||||
|
|
||||||
|
if files:
|
||||||
|
UI_elements.image(layer, win,
|
||||||
|
"settings/themes/"+win.settings["Theme"]+"/icons/"+icon+".png",
|
||||||
|
width-50, y+win.scroll["script_shots"] + current_Y_shots+5, 40, 40)
|
||||||
|
break
|
||||||
|
|
||||||
current_Y_shots = current_Y_shots + 60
|
current_Y_shots = current_Y_shots + 60
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue