Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by lf3thn4d »

Hi guys,
I'm the maintainer for Blender Export Script.
I've started this new thread to curb the confusion of users not knowing which version of the Export Script is the up to date one. :P

So from now on, I declare that this will be the up to date thread for Blender Export Script. Any new updates will be mentioned here on this post. The download will always link to the latest. The link in Ogre's download page points to this thread. Hence no more confusion eh?

To clarify, this version of the exporter is meant for Blender 2.49b. Work on a Blender 2.5/2.6? exporter will start once their python API has been declared stable which at the moment(25/08/2010) is not; they are still in beta. When work on the new exporter starts, I will put up another thread to distinguish both exporter as it will be a 100% rewrite. I will continue to support this exporter as best as I can until Blender 2.49 phase out.

Release Log:
Wed Aug 25, 2010 [Version 1.4]
- Fixed animation track exporting to avoid XMLConverter to crash.
- Avoid sending tangent related params to XMLConverter when mesh does not have UV data.
- Materials will now fallback to Rendering Material mode when custom material template is invalid.
- Added _tex[#] handlers to material template system allowing the use of indexed base texture binding.
- Improved material warnings for better readability.
- Updated help document on feature additions.

Sun Nov 8, 2009 [Version 1.3]
- Added support for texture UV scaling and offset export to custom material template.
- Added option to disable error message when faces with no material set is found.
- Added option to apply modifiers before exporting.
- Updated help documentation with the new features.

Tue Mar 24, 2009 [Version 1.2]
- Added support for texture UV scaling and offset export to custom material template. (see help file)

Fri Feb 13, 2009 [Version 1.1a]
- Fixed a bug where when exporting armature animations with no actions being selected on the armature prior to export, the export will fail with a script error.

Sat Dec 20, 2008 [Version 1.1]
- Remove unused old image in help
- Fixed a bug where skeletal animation is not detected if armature is binded with mesh using the modifier. (Happens in Blender 2.48a due to API changes. This might break support for older blender builds. But heck, who cares about older blender builds anyways.)

Tue Dec 9, 2008 [Version 1.0]
- Added missing images on help docs.
- Made faces that doesn't have any material set defaults to "BaseWhite"
- bug fix on default material name.
- bug fix on material setting UI's behavior.
- Set as version 1.0: exporter seems stable enough with no complaints so far.

Note:
I've included the dotscene exporter for those who want to use the dotscene format. However, it follows the latest format defined in the dotscene repository. Hence those using the old dotscene loaders might have trouble with it. I probably should just get rid of this exporter since I don't use it anyways. But for the heck of it, it's there for anybody who want it. Just to be clear, I'm not the maintainer for the dotscene exporter.(I've removed it. I don't want to take responsibility over that exporter anymore as I no longer use it.)

Download:
https://github.com/OGRECave/blender2ogre

Install:
  1. Download python and install: http://www.python.org/download/ (Note: Get v2.6.4. Blender is compiled against v2.6. Hence only this version will work.)
  2. Copy the the script and all subdirectories either into ".blender/scripts" or the user defined scripts directory.
  3. In the "Scripts Window" run "Scripts → Update Menus".
Last edited by lf3thn4d on Wed Aug 25, 2010 12:20 pm, edited 18 times in total.
User avatar
buckED
Greenskin
Posts: 133
Joined: Fri Feb 15, 2008 9:51 pm

Post by buckED »

I do not know whether this is another version than the one I have.
But thanks for sharing anyway.
I downloaded mine a couple of months ago. It works perfectly well with blender 2.46 (which is the version I have installed)

My question: Is that a completely new one, does it add any features? Or did you merely open a new thread for one that already existed for some time. I will download it anyway I guess. Just to be absolutely sure I am up to date :)

Good work on the exportscript lf3thn4d. Thanks a lot.
Many of life's failures are people who did not realize how close they were to success when they gave up.

~ Thomas Edison ~
newbguy
Gnoblar
Posts: 21
Joined: Wed Apr 30, 2008 11:17 am

Post by newbguy »

what about blender 2.48?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7

Post by haffax »

newbguy wrote:what about blender 2.48?
What about it? You tried it and it didn't work?
team-pantheon programmer
creators of Rastullahs Lockenpracht
newbguy
Gnoblar
Posts: 21
Joined: Wed Apr 30, 2008 11:17 am

Post by newbguy »

yes. i cant seem to get it to work.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

buckED: It should be the same ones. Note the topic of the title states "Tue Sep 02, 2008". That's the date of the last release. I'll be updating that date on every new updates.

newbguy: Did you install python? http://www.python.org/download/ The exporter will only work if you have at least python 2.5 installed.
newbguy
Gnoblar
Posts: 21
Joined: Wed Apr 30, 2008 11:17 am

Post by newbguy »

already have it. it doesnt apear in the export list at all.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

Hmm.. could it be that you installed them in the wrong directory? If you're using windows, there's a chance that you installed blender with the Application Data directory setting. If that's the case, your plugin will have to go to:
C:/Documents and Settings/[YOUR USER NAME]/Application Data/Blender Foundation/Blender/
newbguy
Gnoblar
Posts: 21
Joined: Wed Apr 30, 2008 11:17 am

Post by newbguy »

i have placed the export script in both:

C:\Users\MYNAMEHERE\appdata\Roaming\Blender Foundation\Blender\plugins

and

C:\Users\MYNAMEHERE\appdata\Roaming\Blender Foundation\Blender\plugins\include

directories. just to make sure its not already there, what am i supposed to be seeing in the export list? (thought im certain there is nothing new in the list..)
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

Ah.. you've placed them in the wrong place. It should be in the ".blender/scripts" path.

Something like this:
C:\Users\MYNAMEHERE\appdata\Roaming\Blender Foundation\Blender\.blender\scripts

In that folder you should see many *.py files. That's where you should place them as is.
newbguy
Gnoblar
Posts: 21
Joined: Wed Apr 30, 2008 11:17 am

Post by newbguy »

ah. workes now. :lol:

thanks
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

If you are the maintainer, lf3thn4d - why are you not working against the SVN trunk?
Or at least putting it in the tracker? :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

Actually I am. :P All changes goes into SVN trunk. But artist don't know how to use SVN. So I provide downloads for them.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

lf3thn4d wrote:Actually I am. :P All changes goes into SVN trunk. But artist don't know how to use SVN. So I provide downloads for them.
Ah! Got it. That's reassuringly great! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

The issue is that all our releases are generated from the v1-6 branch rather than trunk.

If you like, I can point the main download link at one of your pages to make this simpler. Drop me an email to organise (so I don't miss it on the forum)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

jacmoe wrote:
lf3thn4d wrote:Actually I am. :P All changes goes into SVN trunk. But artist don't know how to use SVN. So I provide downloads for them.
Ah! Got it. That's reassuringly great! :)
Ouch. I meant the v1-6 branch. My bad. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

New update. See title post. For the most part, there won't be any noticeable difference. It's mostly minor fixes and versioning the exporter as v1.0
malber85
Gnoblar
Posts: 1
Joined: Tue Dec 09, 2008 4:25 pm

Post by malber85 »

First, i am new to this forum.

I have a problem with the Exporter.
(copied the package to C:\Users\MYNAMEHERE\appdata\Roaming\Blender Foundation\Blender\.blender\scripts ).
Blender is detecting the exporter.
I have installed phyton 2.5.2 in Blender 2.48. That is running greatly.

If i try to export a normal cube (choosed it in the object mode) as a "OGRE Mash" and getting the error:

".../ogrepkg/meshexport.py", Line 140
bMesh.activeUVLayer = activeUVLayer
ValueError: expected a string argument


Do i need to give the script some string information, before i can export it to a mesh?

greets from mike


EDIT:

i dropped the files from the "BlenderOgreExporterPatched.zip"
and put in 2 files:
- ogrepkg
- ogremeshesexporter.py
from "http://ogre.svn.sourceforge.net/viewvc/ ... derExport/"
then everything is working fine...
User avatar
SaiCo
Halfling
Posts: 43
Joined: Sat Jun 09, 2007 2:19 pm
Location: Malbork, Poland

Post by SaiCo »

Could somebody check the link in first post ? i'm getting 404/WRONG PAGE
all project's dead .. maybe time for something on me own :/
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

Oops. sorry fixed. :oops:
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13

Post by nikki »

So... How does the exporter work with shaders?
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

Hey nikki. :) Shaders are no easy construct. There's no such thing as fixed default shaders. So to work around that problem, I came up with the custom material option in the exporter. It's basically a way for you to design your own custom material templates that will bind the shaders in correctly. What the exporter will do is simply "fill in the blanks" like texture names, ambient values, etc.

For more info, read the help file on custom materials. ;)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Hi lf3thn4d

I noticed that the SVN link on the Wiki page pointed to trunk.
You are working on the v1-6 branch, right?
The latest changes are there.
I updated the URL. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Post by lf3thn4d »

Hey, yeah.. i never noticed it. Kept thinking i'm in trunk. lol. Got to switch my SVN target. So in the future changes will go to trunk. I'll fix the wiki when that happens. :) Thanks for noticing.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13

Post by nikki »

Tuesday December 12th? Eh? :shock:

*checks date*

...
...
I demand your time machine!