MegaGlest Forum

Archives (read only) => Vanilla Glest => Linux and other ports => Topic started by: -Archmage- on 4 November 2009, 05:07:13

Title: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 4 November 2009, 05:07:13
WINE is the answer for anyone who doesn't know how to install the tools on linux.......


-STEP 1:  Install WINE(If not already installed)

Methods of Installation:
------
Method-1:
Open Synaptic Package Manager and type in the quick search bar: "wine", select wine for installation, and click the "apply" button.
------
Method-2:
Open Terminal and type: "sudo apt-get install wine".
------
Method-3:
Go to http://www.winehq.org/ and download it, and then install whatever package/installer you downloaded.
------


-STEP 2:  Install 7zip, that's p7zip in Linux though.

Methods of Installation: Putting Blender on your system.
------
Method-1: Open Synaptic Package Manager, type in the search bar: "7zip", select all items on that page except irrelevant ones, and click the "apply" button, done.

Method-2: Open Terminal, type: "sudo apt-get install p7zip", type your sudo password, done.

Method-3: Download it from http://7zip.org/, and install it on your computer.


-STEP 3:

Download this (http://www.filefront.com/14816025/Blender.7z/), and extract it to: "/home/<username here>/.wine/drive_c/Program Files/Blender".

If your computer said the directory is not there, then create it.

If your computer says you do not have the correct permissions to do that then change the permissions so that you do.



Please report any errors.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: jda on 5 November 2009, 17:05:24
This does work. ;)

However, a better way would be to have the G3D import/export scripts installed in your native Linux blender (which you can get from the Ubuntu repos, blender that is, not the scripts!) - is that the other way to use blender with full G3D exporting and importing in Linux?
But this will issue an error (at least in my machine). I got the following error from blender:
Code: [Select]
Compiled with Python version 2.5.4.
Checking for installed Python... got it!
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/$USER/.blender/scripts/g3d_support.py", line 267
SyntaxError: Non-ASCII character '\xb4' in file /home/$USER/.blender/scripts/g3d_support.py on line 267, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
The link included in the error message tells you why - check section "Defining the Encoding" and scroll down to the paragraph begining with "To aid with platforms such as Windows". You will see the UTF-8 signature  '\xef\xbb\xbf' will be interpreted as 'utf-8'. '\xb4' however will not.
But it's sooooo easy to fix that! I checked line 267 in file /home/$USER/.blender/scripts/g3d_support.py - there was an unrecognized character, in a comment! It's in a comment, so you can safely change it, and so I did. ;)

So, in brief, a better method would be:

1. Install blender from Synaptic (or whatever package manager you use) - Wine NOT needed at all.
2. Install 7zip according to Archmage's STEP 2 instructions.
3. Download the Blender.7z archive referred by Archmage in his STEP 3, and extract it anywhere you want.
4. Copy the G3D scripts to the correct place:
Code: [Select]
cp -v <where you extracted Blender.7z to>/Blender/.blender/scripts/g3d* ~/.blender/scripts5. Edit /home/$USER/.blender/scripts/g3d_support.py and at line 267 replace the weird character you see in the comment (after the # character) with a single quote ( ' ) 'cause that's really what it's supposed to be!
6. Run blender (the native Linux version), go to the Scripts window, open the Scripts menu and click "Update Menu". Installation done!
The Imp/Export tool is in menu "Wizzards". There are also two G3D export formats added to the "Export" menu - I have not checked if these will need some fixing though, but the wizzard loads G3D files easy. ;)
Enjoy. :)

EDIT: Oh, you can safely remove the "Blender" folder (where Blender.7z was extracted to) after you copied the g3d scripts to your ~/.blender/scripts folder.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 5 November 2009, 17:12:22
Dude the Blender.7z contains the blender folder with the tools already installed for Windows, and that why I say to use wine.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: jda on 5 November 2009, 17:22:49
Dude, why would you use an emulated Blender when you can use a native one?
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: titi on 6 November 2009, 12:56:25
Much much easier way to install it ( nativly! ) on debian/ubuntu 32 bit.

1. enter in a console:
sudo apt-get install blender

2. download http://www.titusgames.de/blender/g3d_xml_exporter_v1.1_linux386.tar.gz
and unpack it to .blender/scripts in your homedirectory.

Only two steps, thats all!
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 6 November 2009, 12:57:38
Sorry some of us have 64-bit...........
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: titi on 6 November 2009, 13:01:00
I already edited my post while you wrote :)
If you have 64 bit maybe a
 
sudo apt-get install ia32-libs

helps ?
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 6 November 2009, 13:02:19
I'll try that when I get to my CPU, if I can remember.... :)

Edit: Doesn't everybody notice, the topic name starts with "alternative".
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: jda on 7 November 2009, 14:52:21
Much much easier way to install it ( nativly! ) on debian/ubuntu 32 bit.

1. enter in a console:
sudo apt-get install blender

2. download http://www.titusgames.de/blender/g3d_xml_exporter_v1.1_linux386.tar.gz
and unpack it to .blender/scripts in your homedirectory.

Only two steps, thats all!
Titi, doesn't that just include the EXporter? Or is the IMPorting function included in that package too?

Edit: Doesn't everybody notice, the topic name starts with "alternative".
I noticed it and asked about it on my first post:
However, a better way would be to have the G3D import/export scripts installed in your native Linux blender (which you can get from the Ubuntu repos, blender that is, not the scripts!) - is that the other way to use blender with full G3D exporting and importing in Linux?
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 7 November 2009, 19:40:31
Hey guys in Ubuntu, Kubuntu(whatever) 9.10 there is no .blender directory in my home directory, blender is installed.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: jda on 7 November 2009, 22:51:06
Hey guys in Ubuntu, Kubuntu(whatever) 9.10 there is no .blender directory in my home directory, blender is installed.
Two silly questions:

1. You did run Blender at least once before checking for the .blender folder, right? If not, run it and .blender will automatically be created in your home folder. ;)

2. You do know that, in Linux, all filenames (including directories) starting with a dot (.) are hidden files/directories, right? If not, well... obviously .blender won't be shown by default...
In Nautilus I can just press the CTRL + H keys show/hide the hidden files. Not sure how it works in Konqueror (or whatever file-browser KDE uses nowadays (haven't used it myself since KDE 2 or 3 ;D )) but you will most certainly find an option to show hidden files in the View menu (or something similar).
In a terminal, just run:
Code: [Select]
ls -AThe "cd .blender" command will work just fine too, as well as anything else. ;)
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 7 November 2009, 22:56:11
Quote
2. You do know that, in Linux, all filenames (including directories) starting with a dot (.) are hidden files/directories, right? If not, well... obviously .blender won't be shown by default...
In Nautilus I can just press the CTRL + H keys show/hide the hidden files. Not sure how it works in Konqueror (or whatever file-browser KDE uses nowadays (haven't used it myself since KDE 2 or 3 Grin )) but you will most certainly find an option to show hidden files in the View menu (or something similar).
In a terminal, just run:
Code:

ls -A

The "cd .blender" command will work just fine too, as well as anything else. Wink

No I can see my hidden folders.

Quote
1. You did run Blender at least once before checking for the .blender folder, right? If not, run it and .blender will automatically be created in your home folder. Wink

Don't know if I ran it, I don't remember but I might have, will run it now.

Edit: Ok, it's there now.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 8 November 2009, 03:34:19
Note: You will appear in wines C:\ drive.
To access the stuff outside of wine(being all stuff not in your .wine directory): when you're opening a file, the path will be C:\ change it to Z:\.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: titi on 9 November 2009, 11:00:32
@jda: yes the linux package includes everything whats needed for linux 32bit. Direct export to .g3d should be possible with only this package.

@archmage: Does it work in 64 bit too?
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 9 November 2009, 13:14:50
Quote
@archmage: Does it work in 64 bit too?

I don't have any 32-bit linux computers. :)
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: titi on 10 November 2009, 14:58:54
Thats why I asked for 64-bit compatibility!  ::)  So does it work for you? ( with  "sudo apt-get install ia32-libs" )

( I also have not even one 32-bit computer, but I currenly have a 32-bit OS )
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 10 November 2009, 15:36:18
I don't know, I didn't try, I was busy working on some models and my magitech-refit, I'll try to remember to do that tonight.
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: -Archmage- on 10 November 2009, 23:24:51
I have 64-bit computers, with 64-bit OS's.

Well, it seems to make an XML file..........when you use the wine way, it gives you a g3d........
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: asmodeus on 30 January 2010, 11:36:07
5. Edit /home/$USER/.blender/scripts/g3d_support.py and at line 267 replace the weird character you see in the comment (after the # character) with a single quote ( ' ) 'cause that's really what it's supposed to be!

Correct fix with line numbers is:
Quote
1 #!BPY
2 # coding: utf-8
3 """
4 Name: 'G3D Fileformat Im/Exporter'
Title: Re: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX
Post by: titi on 30 January 2010, 14:55:49
Thanks, I will fix that the next days!