Upload files to 'studio'
This commit is contained in:
parent
5641117626
commit
da9dcb7d55
2 changed files with 59 additions and 1 deletions
|
@ -89,6 +89,14 @@ def file_select(win, name, call, force=False, IMAGE=True, BLEND=False, VIDEO=Tru
|
|||
FILE=False, CHR=True, VEH=True, LOC=True, OBJ=True, RND=False, FOLDER=False,
|
||||
SEARCH=""):
|
||||
|
||||
|
||||
# Forcing reload of the fileswin.current["AllFiles"] = []
|
||||
|
||||
try:
|
||||
del win.current["AllFiles"]
|
||||
except:
|
||||
pass
|
||||
|
||||
# This function will select files for any kind of stuff. It will search
|
||||
# through the files of the project. Similar to image searcher in the old
|
||||
# organizer.
|
||||
|
|
|
@ -1061,6 +1061,16 @@ def layer(win):
|
|||
|
||||
surl = "/"+scene+"/"+shotis
|
||||
|
||||
# Making it scroll to the selected shot in the story itself.
|
||||
# Thankyou very much...
|
||||
|
||||
if "scroll_shot_to_in_script" not in win.current:
|
||||
win.current["scroll_shot_to_in_script"] = True
|
||||
|
||||
if surl == win.cur and win.current["scroll_shot_to_in_script"]:
|
||||
win.scroll["script"] = (0 - current_Y) + (win.current["h"]/2)
|
||||
win.current["scroll_shot_to_in_script"] = False
|
||||
|
||||
if surl not in win.story["shot_colors"]:
|
||||
|
||||
|
||||
|
@ -2392,6 +2402,42 @@ def layer(win):
|
|||
|
||||
current_Y_shots = current_Y_shots + 50
|
||||
|
||||
# The user might want to add the subfolders if they do not
|
||||
# exist already.
|
||||
|
||||
at_least_one_missing = False
|
||||
list_of_folders_to_generate = ["storyboard", "opengl", "test_rnd", "rendered", "extra"]
|
||||
for i in list_of_folders_to_generate:
|
||||
if i not in os.listdir(win.project+"/rnd"+win.cur):
|
||||
at_least_one_missing = True
|
||||
|
||||
if at_least_one_missing:
|
||||
|
||||
def do():
|
||||
for i in list_of_folders_to_generate:
|
||||
try:
|
||||
os.mkdir(win.project+"/rnd"+win.cur+"/"+i)
|
||||
except:
|
||||
pass
|
||||
UI_elements.roundrect(layer, win,
|
||||
10,
|
||||
y+win.scroll["script_shots"]+current_Y_shots-10,
|
||||
width-30,
|
||||
40,
|
||||
10,
|
||||
button=do,
|
||||
icon="folder",
|
||||
tip=talk.text("GenerateSubfoldersTip"))
|
||||
|
||||
UI_color.set(layer, win, "text_normal")
|
||||
layer.move_to(60, y+win.scroll["script_shots"]+current_Y_shots+15)
|
||||
layer.show_text(talk.text("GenerateSubfolders"))
|
||||
|
||||
current_Y_shots = current_Y_shots + 50
|
||||
|
||||
|
||||
|
||||
|
||||
# Now after we have the progress bar / selection type thingy.
|
||||
# let's do a preview of the render. Usually. When rendering
|
||||
# using Blender-Organizer legacy ( or blender console ) it makes
|
||||
|
@ -2922,6 +2968,8 @@ def layer(win):
|
|||
win.text["shot_search"]["text"] = ""
|
||||
win.images = {}
|
||||
|
||||
# Running the dialog starter
|
||||
|
||||
studio_dialogs.file_select(win, shotis+"_blends", after, force=True,
|
||||
IMAGE=False, BLEND=True, VIDEO=False, FILE=False, CHR=False, VEH=False,
|
||||
LOC=False, OBJ=False, RND=True, FOLDER=False, SEARCH=scene)
|
||||
|
@ -2973,6 +3021,8 @@ def layer(win):
|
|||
def do():
|
||||
win.cur = surl
|
||||
|
||||
win.current["scroll_shot_to_in_script"] = True
|
||||
|
||||
|
||||
UI_elements.roundrect(layer, win,
|
||||
x,
|
||||
|
|
Loading…
Reference in a new issue