Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

import - Reload multiple different python files in Blender

I am just starting with Blender and need some guidance. Sorry if this is basic, i tried googling but unfortunately couldn't find anything useful.

I need to import multiple python files into one in Blender.

Currently I am doing:

dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
sys.path.append(dir )
import ladder
import table

# this next part forces a reload in case you edit the source after you first start the blender session

import importlib

importlib.reload(ladder)
from ladder import *
importlib.reload(table)
from table import *

I tried solutions in this post as well but didn't help:

How to reload all imported modules?

Will really appreciate any help possible.

question from:https://stackoverflow.com/questions/65909758/reload-multiple-different-python-files-in-blender

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...