Page MenuHome

B3d 2.8 can't import textblock as module in interactive console.
Closed, ArchivedPublic


System Information
Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel HD Graphics 5000 OpenGL Engine Intel Inc. 4.1 INTEL-10.36.23

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-02 21:33, hash: rB19dcb22a885d
Worked: Have not seen this working in any version of Blender 2.8, but worked in Blender 2.7

Short description of error
In Blender 2.7, you could have a python module textblock imported into the into the interactive console and able to call functions/variable names dynamically from those defined in that module, which is a very useful resource for quick and realtime python development.

Exact steps for others to reproduce the error

  1. Create text block, type in simple function (e.g. def myfunc():; print("HI"))
  2. Rename the block to be e.g.
  3. In the interactive python console, type import mod
  4. note how it fails to import on blender 2.8, but works in 2.7 (being able to call mod.myfunc() and it printing "HI")

Tested to find this not working on both mac OSX and Linux in blender 2.8.

Supporting video: