Page 3 of 7

Posted: Wed Apr 05, 2006 4:43 pm
by joeri
$killey3s wrote:Hi
I don't know much about scripting nor python language so if you could help please! thx
Also

---g_scale= Slider("Scale Factor: ", EVENT_NOEVENT, 10, 75, 210, 18,
----------------1.0, 0.001, 10.0, 1, "Scale factor for obj Model");

Make that into one line.
(can somebody implement ctrl-v or was that done already?)

Posted: Wed Apr 05, 2006 9:31 pm
by $killey3s
Well thx so much!
I've been looking for weeks for a working script! Now i can export in md2 properly. I'm working on a game with a couple of friends and that's all we needed to be able to create it.

(What does putting :

---g_scale= Slider("Scale Factor: ", EVENT_NOEVENT, 10, 75, 210, 18,
----------------1.0, 0.001, 10.0, 1, "Scale factor for obj Model");

all in a line do??
lol im a big noob in scripting)

Scourage you should contact blender foundation (dunno how) to give them ur script because the one they made doesn't work good.

thx a lot again

Ryan

Posted: Wed Apr 05, 2006 9:44 pm
by scourage
$killey3s-

I'm glad the script is working for you. I'll warn you now that the gl commands are borked up a bit, so if your engine uses, them you might see some funny results, otherwise, it should work well for you. Putting that all on one line helps python understand what you're trying to say. Python is white-space sensitive, so a tab/space/newline mean something to Python, but not to other languages like C++. The script that Blender foundation has is one of my earlier ones. Like most things in the software world, it's a continuous effort to get it right with many releases. Thanks for testing it for me and giving me feedback to make it better.

joeri-

Thanks for all your help with testing. The blender paste command to past from the windows clipboard into blender is SHIFT-CTRL-V (SHIFT-CTRL-C to copy to the windows clipboard as well).


Cheers,

Bob

Posted: Wed Apr 05, 2006 9:57 pm
by $killey3s
The blender paste command to past from the windows clipboard into blender is SHIFT-CTRL-V (SHIFT-CTRL-C to copy to the windows clipboard as well).
What does that mean?

Otherwise i'll be happy to test out this script once u've sorted out the gl commands, when i know what they are and how to appy them ^^.

Ryan

Posted: Thu Apr 06, 2006 12:01 pm
by joeri
scourage wrote:$killey3s-

Thanks for all your help with testing. The blender paste command to past from the windows clipboard into blender is SHIFT-CTRL-V (SHIFT-CTRL-C to copy to the windows clipboard as well).
Wauw, thats great, i kept saving forum ctrl-c it with notepad, silly me.

Posted: Thu Apr 06, 2006 2:17 pm
by scourage
$killey3s-

That means that you can cut and paste text between windows programs (like notepad) and blender using the SHIFT-CTRL-C/V commands. The normal cut/paste commands in blender only work within blender.

GL commands are a part of the MD2 format that are an ordered list of TRI_STRIPS and TRI_FANS (GL drawing modes) that should result in faster drawing of groups of triangles. Some 3D engines use them, some don't so it's hit or miss whether your model will look right or not.

Cheers,

Bob

Posted: Thu Apr 06, 2006 7:38 pm
by scourage
adenau-

I recieved your model. your model is made up of several objects. MD2 only allows for 1 object per file. The way the exporter works is that it picks the first object that is selected and exports that. So when I ran it, it exported one of the feet. I would rebuild your model as one mesh (join all the objects into one object) animate it and then try to export it. It doesn't have to be one continous mesh-there can be pieces, but they all have to be the same object.

Cheers,

Bob

Posted: Thu Apr 06, 2006 10:40 pm
by adenau
scourage-

Once you complete your export, what software do you use to view the export? Do you export is back into blender, or do you use a different viewer?

Latter,

Alex

Posted: Fri Apr 07, 2006 12:35 am
by scourage
I've been using MD2 viewer by Chumbalum Soft. You can get it at:

http://www.swissquake.ch/chumbalum-soft/md2v/

Cheers,

Bob

Posted: Mon Apr 10, 2006 9:08 pm
by scourage
any-

I haven't heard anything in a while. Is the script working as expected?

cheers,

Bob

Posted: Thu Apr 13, 2006 2:20 am
by adenau
scourage wrote:any-

I haven't heard anything in a while. Is the script working as expected?

cheers,

Bob
Hi Bob,

Been working on other projects, so I haven't had a chance to try. When I do get back to the Java programming, Ill be sure to post my experiences on the forum.

Alex

Posted: Mon Apr 17, 2006 12:13 am
by desk_hero
Hi Bob.

First of all, thank you for the awesome scripts.

I've been having this strange bug: Animations import correctly in blender 2.34 but does not in blender 2.41.

Also, would love to see the gl_commands thingy fixed. Currently, I export from blender, reload using q2 modeller, export from there again.

Posted: Tue Apr 18, 2006 12:36 am
by scourage
desk_hero,

I know some things have changed in the python api since 2.34. I'll look and see what is different and try and get that fixed as soon as possible. I might have some time this week to look at the GL commands.

Cheers,

Bob

Posted: Thu Apr 27, 2006 2:05 pm
by Hoehrer
Ok, i'm currently using your import/export scripts and found some more things that would be great top have/know:

* Is it possible to already create a link between the "Action"-data and the NLA diagram in import? So you can basically import an md2 file and export it again without loosing any data inbetween. Currently i made some tests and doing that by hand (activate one action per frame), but it's alot of work :-/

* Another thing (that i mentioned earlier) would be to predefine the skin/texture filename in the export dialog instead of using the one created from the image-filename. Thgis enables you to define sub-directories in the texture-path as well.

* Is it currently possible to write multiple skins/textures on export?

* EDIT I dunno what causes this, but the open/save dialog would be even better if it would memorize the last-used directory :)

Thanks for your help,
Werner

Posted: Wed May 03, 2006 7:36 pm
by Hoehrer
I actually found out what causes the "geometry get's f... up" problem ... if s/b else mentioned it before just ignore this post, I didn't go through all the posts.

messed up:
* create a model
* move it (the center of the mdoel) away from the abcolute center
* export

not messed up:
* same as above but with the object's center in the absolute center.

Werner