Open brupelo opened 4 years ago
You need to pass full file path to the --reload
argument.
That said the current addon code uses exec
, here's a better version using module loading:
dir = os.path.dirname(cmd)
if dir not in sys.path:
sys.path.append(dir)
__import__(os.path.basename(os.path.splitext(cmd)[0])).main()
This allows you to import any blender module like bmesh
.
Hi, I'd love to give it a shot to your cool package but I've faced already some issues on blender 2.82.7, pls take a look to this little test
Here's the steps i've followed:
cd d:\foo && toblender --reload test.py
(also tried withtoblender --reload test.py --watch d:\foo\test.py
)Could you pls advice?
Also... each time it's reloading is making a new client connection
is this intended?