"import GUI " in a Blender Python script

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

demolishun
Posts: 6
Joined: Mon Feb 17, 2003 1:41 am

"import GUI " in a Blender Python script

Postby demolishun » Mon Feb 17, 2003 4:04 am

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

Michel
Posts: 208
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

Postby Michel » Mon Feb 17, 2003 9:20 am

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?

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?
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

The scripts written for a scene are stored inside the .blend file. The API for blender itself is in the executable.

With regards,
Michel

demolishun
Posts: 6
Joined: Mon Feb 17, 2003 1:41 am

Thanks

Postby demolishun » Tue Feb 18, 2003 3:41 am

Thanks
Demolishun

willian
Posts: 20
Joined: Mon Jan 13, 2003 3:50 am

Re: "import GUI " in a Blender Python script

Postby willian » Sun Feb 23, 2003 10:28 pm

demolishun wrote:The question is where is the GUI object? Is there another method to interact with a FileSelection box?(...)


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:

http://www.igspot.com.br/wgermano/progr ... index.html

The "gui" part is at the end of the scripts.


Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests