Previous Thread  Next Thread

chat icon "import GUI " in a Blender Python script

demolishun

Posted: Mon Feb 17, 2003 4:04 am
Joined: 17 Feb 2003
Posts: 6
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
Reply with quote


Michel

Posted: Mon Feb 17, 2003 9:20 am
Joined: 16 Oct 2002
Posts: 209
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?
Quote:

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
Reply with quote


demolishun

Posted: Tue Feb 18, 2003 3:41 am
Joined: 17 Feb 2003
Posts: 6
Thanks
Demolishun
Reply with quote


willian

Posted: Sun Feb 23, 2003 10:28 pm
Joined: 13 Jan 2003
Posts: 20
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/programming/index.html

The "gui" part is at the end of the scripts.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group