Author Topic: Alternative Way to Use Blender With Full G3D Exporting and Importing ---- LINUX  (Read 7735 times)

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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, 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.
« Last Edit: 30 December 2009, 14:03:12 by -Archmage- »
Egypt Remastered!

Proof: Owner of glest@mail.com

jda

  • Guest
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.
« Last Edit: 5 November 2009, 17:12:43 by jda »

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Dude the Blender.7z contains the blender folder with the tools already installed for Windows, and that why I say to use wine.
Egypt Remastered!

Proof: Owner of glest@mail.com

jda

  • Guest
Dude, why would you use an emulated Blender when you can use a native one?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
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!
« Last Edit: 6 November 2009, 12:57:59 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Sorry some of us have 64-bit...........
Egypt Remastered!

Proof: Owner of glest@mail.com

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
I already edited my post while you wrote :)
If you have 64 bit maybe a
 
sudo apt-get install ia32-libs

helps ?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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".
« Last Edit: 6 November 2009, 13:07:31 by -Archmage- »
Egypt Remastered!

Proof: Owner of glest@mail.com

jda

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

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Hey guys in Ubuntu, Kubuntu(whatever) 9.10 there is no .blender directory in my home directory, blender is installed.
Egypt Remastered!

Proof: Owner of glest@mail.com

jda

  • Guest
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. ;)

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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.
Egypt Remastered!

Proof: Owner of glest@mail.com

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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:\.
Egypt Remastered!

Proof: Owner of glest@mail.com

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
@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?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Quote
@archmage: Does it work in 64 bit too?

I don't have any 32-bit linux computers. :)
Egypt Remastered!

Proof: Owner of glest@mail.com

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
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 )
« Last Edit: 10 November 2009, 15:01:40 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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.
Egypt Remastered!

Proof: Owner of glest@mail.com

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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........
Egypt Remastered!

Proof: Owner of glest@mail.com

asmodeus

  • Guest
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'

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Thanks, I will fix that the next days!
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

 

anything