Skip to main content
added 12 characters in body
Source Link
ideasman42
  • 48k
  • 10
  • 144
  • 226

You can also set up a wrapper script that reload the external Python file you are editing:

Text file inside Blender:

import impimportlib
import myModule

impimportlib.reload(myModule)
myModule.runMyCode()

This way, every time you press Alt+P to run this script, it will automatically reload the latest version of the code from MyModule.

You can also set up a wrapper script that reload the external Python file you are editing:

Text file inside Blender:

import imp
import myModule

imp.reload(myModule)
myModule.runMyCode()

This way, every time you press Alt+P to run this script, it will automatically reload the latest version of the code from MyModule.

You can also set up a wrapper script that reload the external Python file you are editing:

Text file inside Blender:

import importlib
import myModule

importlib.reload(myModule)
myModule.runMyCode()

This way, every time you press Alt+P to run this script, it will automatically reload the latest version of the code from MyModule.

Source Link
Mike Pan
  • 11.9k
  • 1
  • 38
  • 61

You can also set up a wrapper script that reload the external Python file you are editing:

Text file inside Blender:

import imp
import myModule

imp.reload(myModule)
myModule.runMyCode()

This way, every time you press Alt+P to run this script, it will automatically reload the latest version of the code from MyModule.