I have script1, in there the String "path" gets set. Then the script1 runs blender as a subprocess, together with script2. Now script2 needs to have access to the String "path", how can I do this?
Currently im Saving the string to a text file and then accesing it from script2 but I know this solution is very very ugly.
maybe someone has an idea ? :)
script1:
path=("/example/ex/")
subprocess.run([blenderpath, "--background", blenderscene, "--python", scriptpath])
script2 (atm just reading out the txt file with the right path, but that's not how I want it to be):
file=open("Blabla")
file_name = fiel.readline()
mat_path = file_name
def prepscene(mat_path)
It works right now with the text file, but If I try to import the variable into the second script it won't work, if I try to somehow start the blender script with it it also won't work.