Slight change to make Blender Thing Work with Tor

This commit is contained in:
Victorious Children Studios 2023-12-19 21:20:58 +02:00
parent 31b6d2fb37
commit 743d7ae95a
3 changed files with 19 additions and 9 deletions

View file

@ -130,6 +130,13 @@ def file_open(win, path):
else: else:
Open(path) Open(path)
def ontor(win):
if ".onion" in win.analytics.get("remote-server-url", ""):
return True
else:
return False
def copy_file(win, from_path, to_path, new_name=""): def copy_file(win, from_path, to_path, new_name=""):
############################################################################ ############################################################################
@ -175,7 +182,9 @@ def copy_file(win, from_path, to_path, new_name=""):
if from_path.endswith(bt): if from_path.endswith(bt):
blendfile = True blendfile = True
if blendfile:
if blendfile and not ontor(win):
# Now before we copy blend file we need to check whether Blender is even # Now before we copy blend file we need to check whether Blender is even
# installed. # installed.
@ -215,4 +224,7 @@ def get_current_blender(win):
############################################################################ ############################################################################
if not ontor(win):
return win.settings.get("blender-bash", "blender") return win.settings.get("blender-bash", "blender")
else:
return "xdg-open"

View file

@ -489,14 +489,11 @@ def layer(win):
if win.current["in-asset-remote-server"]: if win.current["in-asset-remote-server"]:
# First we gonna change the active folder to view the Blend files.
# This is important for the function for the remote server.
win.current["asset_cur_folder"] = "blender"
# Let's also check for updates on the file # Let's also check for updates on the file
# Remote Server Stuff # Remote Server Stuff
if win.analytics["from-remote-server"]: if win.analytics["from-remote-server"]:

View file

@ -291,6 +291,7 @@ def layer(win, call):
# Button to activate it # Button to activate it
def do(): def do():
print("test")
win.current["calls"][call]["var"] = "/"+win.current["asset_cur"]+"/"+asset win.current["calls"][call]["var"] = "/"+win.current["asset_cur"]+"/"+asset
win.assets = {} win.assets = {}