UPBGE / upbge

UPBGE, the best integrated game engine in Blender
https://upbge.org
Other
1.43k stars 180 forks source link

Regarding node creation buttons, the python script is called through the button to dynamically add stl files. #1902

Open BruceLvSwag opened 3 months ago

BruceLvSwag commented 3 months ago

As a new player of UPBGE, I tried to use python script to load STL files. During this process, by running the script through the script running interface of UPBGE, the STL file can be successfully added and the STL model can be imported, as shown in the figure below. image

However, using the same script file and dynamically importing the STL file through buttons in the node logic will also load the model, but the model object will not be created in OutLiner, as shown in the figure below. image

Please tell me how should I solve the above problems?

BluePrintRandom commented 2 months ago

you mean during runtime or after the engine quits?

you can uncheck 'undo at exit' and have your changes persist.