Upload files to 'settings'
This commit is contained in:
parent
df5b615ef9
commit
165cb225b4
1 changed files with 16 additions and 4 deletions
|
@ -6,6 +6,9 @@ import datetime
|
|||
import platform
|
||||
from subprocess import *
|
||||
|
||||
# studio
|
||||
from studio import history
|
||||
|
||||
ostype = platform.system()
|
||||
|
||||
def Open(arg): # XDG-OPEN (start the file in a default software)
|
||||
|
@ -34,11 +37,11 @@ def Open(arg): # XDG-OPEN (start the file in a default software)
|
|||
|
||||
# For The Best OS Ever
|
||||
if ostype == "Linux": ##### ## ## ## ##
|
||||
os.system("xdg-open "+arg) ## ## #### ## ## ##
|
||||
# For Stinky ## ## ## ## ## ##
|
||||
Popen(["xdg-open", arg]) ## ## #### ## ## ##
|
||||
# For Stinky. Like very, very Stinky ## ## ## ## ## ##
|
||||
elif ostype == "Windows": ## #### ## ## ## ## ##
|
||||
os.system("start "+arg) ## # ## ## ## ## ## ##
|
||||
# For Not that Stinky ## ## ## #### ## ##
|
||||
# For Not that Stinky but it is Stinky ## ## ## #### ## ##
|
||||
elif ostype == "Darwin": ##### ## ## ####
|
||||
os.system("open "+arg)
|
||||
|
||||
|
@ -88,7 +91,13 @@ def file_open(win, path):
|
|||
|
||||
if blendfile:
|
||||
Popen([get_current_blender(), path])
|
||||
|
||||
|
||||
# Every blend file opening should be recorded to history. Because then
|
||||
# on multiuser, the other users should somehow know that changes were
|
||||
# done to the blendfile.
|
||||
|
||||
history.record(win, path, "[Openned]")
|
||||
|
||||
else:
|
||||
Open(path)
|
||||
|
||||
|
@ -157,6 +166,9 @@ def copy_file(win, from_path, to_path, new_name=""):
|
|||
+" --python-expr import\ bpy\;\ bpy.ops.wm.save_as_mainfile\(filepath=\\\""\
|
||||
+to_path.replace(" ", "\ ")+"\\\"\)")
|
||||
|
||||
# Writting to history. Since each copy of a file is adding a blendfile.
|
||||
history.record(win, to_path, "[Added]")
|
||||
|
||||
if still:
|
||||
|
||||
# If it's not a blendfile we going to use this.
|
||||
|
|
Loading…
Reference in a new issue