diff --git a/studio/studio_scriptLayer.py b/studio/studio_scriptLayer.py index 66e86ae..4770444 100644 --- a/studio/studio_scriptLayer.py +++ b/studio/studio_scriptLayer.py @@ -1690,6 +1690,10 @@ def layer(win): # Selecting the shot if win.current["script_shot_higlight"] and win.previous["LMB"] and not win.current["LMB"]: win.cur = "/"+scene+"/"+win.current["script_shot_higlight"] + + win.current["shot_left_side_scroll_please_work_omg_wtf"] = True + + # Going to that asset if win.current["script_asset_higlight"] and win.previous["LMB"] and not win.current["LMB"]: @@ -2076,16 +2080,28 @@ def layer(win): "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: + + + + + # Getting the color. It's not always works. - + if "shot_colors" not in win.story: win.story["shot_colors"] = {} 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"]: @@ -2421,7 +2437,7 @@ def layer(win): def do(): for i in list_of_folders_to_generate: try: - os.mkdir(win.project+"/rnd"+win.cur+"/"+i) + os.makedirs(win.project+"/rnd"+win.cur+"/"+i) except: pass 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 # even if I can't find it in the text of the script. + def do(): win.cur = surl win.current["scroll_shot_to_in_script"] = True - + win.current["shot_left_side_scroll_please_work_omg_wtf"] = True UI_elements.roundrect(layer, win, x, @@ -3039,7 +3056,30 @@ def layer(win): fill=False) 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