Okay, I have a Blender Python script which is supposed to allow file selection. However, the script halts when it reaches this line : "import GUI". I read another website that talked about using this library to write Blender import scripts. The question is where is the GUI object? Is there another method to interact with a FileSelection box?
Also, another question. Where does Blender generally install script files on a Linux machine. I had a pre-OSS release of Blender and could not figure out where any of the stuff got installed other than blender is /usr/bin.
Thanks.
Demolishun
"import GUI " in a Blender Python script
Moderators: jesterKing, stiv
-
- Posts: 180
- Joined: Wed Oct 16, 2002 7:27 pm
- Location: Somewhere below the rivers in Holland (but not Limburg)
Re: "import GUI " in a Blender Python script
Hm, according to the python api documentation, the GUI object is not part of the 2.25 api. Did you test it with 2.25 or 2.23?demolishun wrote:Okay, I have a Blender Python script which is supposed to allow file selection. However, the script halts when it reaches this line : "import GUI". I read another website that talked about using this library to write Blender import scripts. The question is where is the GUI object? Is there another method to interact with a FileSelection box?
The scripts written for a scene are stored inside the .blend file. The API for blender itself is in the executable.Also, another question. Where does Blender generally install script files on a Linux machine. I had a pre-OSS release of Blender and could not figure out where any of the stuff got installed other than blender is /usr/bin.
Thanks.
Demolishun
With regards,
Michel
Re: "import GUI " in a Blender Python script
The GUI module used to be part of the Blender Python API (2.23 had it). But since 2.25 it is gone. In my own scripts (importer and exporter for AC3D modeler format) what I did was to write a simple file selector myself, using the Blender.Draw module and the default Python OS module. You can take a look at the code here:demolishun wrote:The question is where is the GUI object? Is there another method to interact with a FileSelection box?(...)
http://www.igspot.com.br/wgermano/progr ... index.html
The "gui" part is at the end of the scripts.