Bill Currie
b764cad483
Add buttons to re-scan or re-parse entity class data.
2012-09-12 08:14:10 +09:00
Bill Currie
592222aba8
Don't attempt to draw a connecting line to a missing target.
2012-09-11 15:01:43 +09:00
Bill Currie
154d08a9c7
Gracefully handle unknown entity classes.
...
Unfortunately, the classname gets lost to blender at this stage, but I have
an idea for how to handle that.
2012-09-11 14:58:56 +09:00
Bill Currie
54832740c8
Gracefully handle missing textures.
...
The texinfo still gets a material, but just an untextured one. The idea is
such textures can be fixed up at a later date.
2012-09-11 14:57:24 +09:00
Bill Currie
41004fd7c2
Remove specularity from the brush materials.
...
Specularity looks ghastly when there's nothing for it to highlight.
2012-09-10 19:24:47 +09:00
Bill Currie
7204f8d90d
Minor robustness improvements to map importing.
...
Allow map parse errors to be reported propertly (the raise was for
debugging) and give up gracefully when the wad file can't be found.
2012-09-10 19:23:15 +09:00
Bill Currie
995547ae6f
Display a message for entity class parsing errors.
...
It's hacky, but at least something shows up.
2012-09-10 16:14:32 +09:00
Bill Currie
25e545616a
Create EntityClassError exception.
...
Much more useful than Python's SyntaxError (and much less confusing).
2012-09-10 15:57:50 +09:00
Bill Currie
ae942afe5c
Bind map_error to the script object.
...
This works much better :)
2012-09-10 14:59:43 +09:00
Bill Currie
f525be0880
Implement Script.error properly.
...
It's not good to get an attirbute error when trying to raise another error.
2012-09-10 14:58:41 +09:00
Bill Currie
dade60863e
Move the entity class comment into its own box.
...
Blender doesn't support multiline text or word wrapping, so the tooltips
were rather ugly. The double spacing used by layout.label() is still a
little ugly, but the resulting text box just below the entity classname is
much more usable.
2012-09-10 13:19:38 +09:00
Bill Currie
198a49dfdf
Ensure all files have the gpl block.
2012-09-10 12:40:55 +09:00
Bill Currie
a75fe213a6
Make entity lines post rather than pre.
...
I'm not sure what visual difference it makes, but it is pretty much what
I'd intended in the first place.
2012-09-10 12:16:23 +09:00
Bill Currie
2905cb69bc
Add entity relation lines.
...
It has many problems (eg, the lines won't update when target/targetname
change), but the basics are working.
2012-09-10 11:48:22 +09:00
Bill Currie
9dc1039686
Fix map parsing for quest format maps.
...
Bah, the one place a single char lex is needed :P
2012-09-10 08:08:37 +09:00
Bill Currie
da6f57a23b
Get entity field key/value pair editing working.
2012-09-10 08:08:11 +09:00
Bill Currie
ea541b325d
Set the map parser scripts to not lex single chars.
...
qbsp treats {foo as one token, not two.
2012-09-09 17:23:55 +09:00
Bill Currie
c8be8c242a
Don't use any single chars for maps.
...
The standard map format (original qbsp) doesn't use them.
2012-09-09 17:13:10 +09:00
Bill Currie
0c2818c038
Ensure the texture scaling is never 0.
2012-09-09 17:12:45 +09:00
Bill Currie
73cdd66c52
Set the entity properties as parsed from the map.
2012-09-09 17:11:57 +09:00
Bill Currie
825ce0dad6
Make the type of EntityClass.flagnames consistent.
...
Sometimes list and sometimes tuple makes for a mess.
2012-09-09 17:01:23 +09:00
Bill Currie
709ab05713
Add preliminary support for entity properties.
...
Only classname and flags are supported right now, and only classname gets
set when the entity is added (via the add menu).
2012-09-09 13:22:52 +09:00
Bill Currie
468f96902f
Use a tetrahedron for the default brush entity.
...
It seems to be a reasonable shape to show that editing is needed.
2012-09-09 11:10:03 +09:00
Bill Currie
18fcdb0ce7
Implement the add_entity operator.
...
Doesn't work for brush entities yet.
2012-09-09 10:29:43 +09:00
Bill Currie
fde8d29899
Use icons to distinquish brush ents from others.
...
Mesh-data icons indicate brush entities, object-data icons indicate the
others.
2012-09-09 09:29:55 +09:00
Bill Currie
06fd951a55
Build the add entity menu tree.
...
The menu tree is built from the parsed entity classes, with _ forming the
separator between menu levels.
2012-09-09 08:54:41 +09:00
Bill Currie
45c48a6215
Fix bsp2 loading.
...
Just some problems with the handling of extended bsp29 files. I'm not
quite happy with the code, but it will do for now.
2012-09-08 09:41:00 +09:00
Bill Currie
cfb856b9cf
Fix byteswapping of a node's firstface/numfaces.
...
I'd forgotten to fix this.
2012-09-08 09:38:22 +09:00
Bill Currie
beb0b9e0fc
Fix a segfault when no interfaces are available.
2012-09-08 09:37:48 +09:00
Bill Currie
0ce32a793e
Return the correct size for set_bsp*_write().
...
Need to subtract the size of the bsp_t/bsp29_t struct. Now old and new
qfbsp produce identical bsps (so long as they're both unoptimized, or
(probably) both optimized).
2012-09-07 20:42:04 +09:00
Bill Currie
2d30cddc66
Implement bsp2/bsp29 writing.
...
It's ugly, inefficient, and untested, but it should work.
2012-09-07 18:27:20 +09:00
Bill Currie
3df85a6abe
Fix reading bsp29 files.
2012-09-07 17:37:46 +09:00
Bill Currie
a37c5465e1
First step for BSP2 support. DOES NOT WORK!
...
All of the nastiness is hidden in bspfile.c (including the old bsp29
specific data types). However, the conversions between bsp29 and bsp2 are
implemented but not yet hooked up properly. This commit just gets the data
structures in place and the obvious changes necessary to the rest of the
engine to get it to compile, plus a few obvious "make it work" changes.
2012-09-07 16:09:24 +09:00
Bill Currie
69fb78278f
Remove the redundant endian conversions from bsp loading.
...
It's obvious that it's been a very long time since anybody's tried playing
QF on a big-endian machine: double converting data isn't good :/
2012-09-07 15:45:59 +09:00
Bill Currie
6ba6959205
Allow any NxN or 2NxN sky texture for glsl.
...
Maps that specify a skybox often use a fake sky texture, sometimes 16x16.
Having a hardcoded requiredment of 256x128 is a tad inappropriate.
2012-09-05 14:02:44 +09:00
Bill Currie
395a0eef78
Don't use targetname for entity names.
...
Proves to be rather non-useful (at this stage, anyway)
2012-09-04 20:29:00 +09:00
Bill Currie
1993ee8352
Remove some debug prints.
2012-09-04 19:40:07 +09:00
Bill Currie
af37ae438e
Fix the incorrectly rotated textures.
...
map uses degrees, blender uses radians. oops.
2012-09-04 19:39:10 +09:00
Bill Currie
7feec96b8d
Texture the world :)
...
Such a simple statement for a sizable hunk of work.
2012-09-04 17:04:30 +09:00
Bill Currie
b29f24e6d3
Add a wadpath scene property and load the wad files.
2012-09-04 17:04:00 +09:00
Bill Currie
95e2a5b21a
Pre-process texture defs.
...
The st-vectors are now fully calculated as per qfbsp's algorithm.
The Texinfo class tries to create unique texture defintions.
2012-09-04 16:59:02 +09:00
Bill Currie
446016e84e
Make wad contents searches case-insensitive.
2012-09-04 16:58:19 +09:00
Bill Currie
8587079c0d
Fix a case&paste error.
2012-09-04 11:59:04 +09:00
Bill Currie
38facac7ce
Add a very simple wad reader.
...
It supports only MipTex data (for automatic data conversion), and it's very
fragile, but it will do for now.
2012-09-03 19:37:04 +09:00
Bill Currie
125952d17d
Un-hardcode the light distance.
2012-09-03 14:34:27 +09:00
Bill Currie
dfaf28001a
Create colored boxes for sized entity classes.
...
The data is taken from the parsed entity class data. No error checking is
done yet.
2012-09-03 14:33:32 +09:00
Bill Currie
16952ffbbb
Support loading entity class data into blender.
...
The qc source path is specified via the dirpath property in the QF Entity
Classes panel of the scene data. The scanned entity classes are stored in a
plist in a blender text file for persistent storage (so the directory
doesn't need to be scanned every time). Also, so the data doesn't have to
be parsed every time, the data is stored in a normal python class hanging
off the properties class (evil hack?).
2012-09-03 13:38:28 +09:00
Bill Currie
3cad0f978b
Revamp entity class loading for blender integration.
...
Slightly cleaner EntityClass building, and now the directory scanner is
part of the EntityClassDict class, which also supports reading/writing
plists (for persistent storage in blender).
2012-09-03 13:35:18 +09:00
Bill Currie
b3e5083f60
Add a symlink to io_mesh_qfmdl's qfplist.py
...
The map editor addon needs to use it too, but I don't want to duplicate the
file in git.
2012-09-03 13:33:59 +09:00
Bill Currie
c08fd08025
Write empty array and dictionary items on one line.
...
Makes for slightly tidier plist text.
2012-08-31 16:14:49 +09:00