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:
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=""):
############################################################################
@ -174,8 +181,10 @@ def copy_file(win, from_path, to_path, new_name=""):
for bt in [".blend", ".blend1"]:
if from_path.endswith(bt):
blendfile = True
if blendfile:
if blendfile and not ontor(win):
# Now before we copy blend file we need to check whether Blender is even
# installed.
@ -214,5 +223,8 @@ def get_current_blender(win):
# (At the moment the feature is not implemented. So this is a placeholder.)
############################################################################
return win.settings.get("blender-bash", "blender")
if not ontor(win):
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"]:
# 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
# Remote Server Stuff
if win.analytics["from-remote-server"]:
@ -513,7 +510,7 @@ def layer(win):
check_updates.setDaemon(True)
check_updates.start()
win.current["in-asset-remote-server"] = False

View file

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