modify the python stub to include __file__ and __name__, also correct odd indent in KX_KetsjiEngine.cpp
This commit is contained in:
@@ -8,4 +8,5 @@ import os
|
||||
filename = "my_script.py"
|
||||
|
||||
filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename)
|
||||
exec(compile(open(filepath).read(), filepath, 'exec'))
|
||||
global_namespace = {"__file__": filepath, "__name__": "__main__"}
|
||||
exec(compile(open(filepath).read(), filepath, 'exec'), global_namespace)
|
||||
|
||||
Reference in New Issue
Block a user