diff options
author | Alexander Ewering <blender@instinctive.de> | 2005-10-28 23:54:16 +0400 |
---|---|---|
committer | Alexander Ewering <blender@instinctive.de> | 2005-10-28 23:54:16 +0400 |
commit | d3dd5c5b7aa185265ce7816dab996e8fa9288bc6 (patch) | |
tree | 77401e6f1e065a054ead43700bb70ae57b7889a3 /source | |
parent | b8d81d093a1de39fd21df94bd7b4a4fd81d2491a (diff) |
Somehow, most files are missing from this commit, and I have no idea why,
so there will be more files following.
Anyway: NEW BOOLEANS from Google Summer of Code (Courtesy of Marc Freixas)
Known problems:
- Random freezes while using them as a modifier. This may not be directly
related to modifiers though - it's maybe just the huge number of
operations that leads to a higher probability of triggering a bug
- Static booleans (the first 3 entries in the WKEY menu) are borked
anyway, this is not due to this commit.
- Errors when exiting Blender (dupli_alloc stuff), is not related to this
commit, either.
Please test if everything works, and check the other build systems, I only
know that make works.
Also, compare the results of, say, cube-cylinder, in old and new booleans
:)
Diffstat (limited to 'source')
-rw-r--r-- | source/Makefile | 1 | ||||
-rw-r--r-- | source/blender/src/booleanops.c | 23 | ||||
-rw-r--r-- | source/nan_definitions.mk | 17 |
3 files changed, 27 insertions, 14 deletions
diff --git a/source/Makefile b/source/Makefile index 078eb867abe..732d7fd97f6 100644 --- a/source/Makefile +++ b/source/Makefile @@ -79,6 +79,7 @@ PYPLAYERLIB ?= $(PYLIB) GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a GRPLIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a GRPLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a + GRPLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a GRPLIB += $(NAN_SOUNDSYSTEM)/lib/$(DEBUG_DIR)libSoundSystem.a GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a diff --git a/source/blender/src/booleanops.c b/source/blender/src/booleanops.c index 230dd0ae36a..b3663756685 100644 --- a/source/blender/src/booleanops.c +++ b/source/blender/src/booleanops.c @@ -909,10 +909,21 @@ ConvertCSGDescriptorsToDLM( // cheat CSG never dumps out quads. - mface->v1 = face.vertex_index[0]; - mface->v2 = face.vertex_index[1]; - mface->v3 = face.vertex_index[2]; - mface->v4 = 0; + if (face.vertex_number>3) { + // QUAD + mface->v1 = face.vertex_index[0]; + mface->v2 = face.vertex_index[1]; + mface->v3 = face.vertex_index[2]; + mface->v4 = face.vertex_index[3]; + } + else { + // TRIANGLE + mface->v1 = face.vertex_index[0]; + mface->v2 = face.vertex_index[1]; + mface->v3 = face.vertex_index[2]; + mface->v4 = 0; + } + mface->mat_nr = 0; mface->flag = fdata->faceflag; @@ -953,9 +964,9 @@ ConvertCSGDescriptorsToDLM( ((((unsigned int)floor(color[3] + 0.5f)) & 0xff) << 0); } - test_index_face(mface, NULL, tface, 3); + test_index_face(mface, NULL, tface, face.vertex_number); } else { - test_index_face(mface, NULL, NULL, 3); + test_index_face(mface, NULL, NULL, face.vertex_number); } fi_insert_pos++; diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index a861a80509c..07b95ab2ede 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -75,6 +75,7 @@ endif export NAN_GUARDEDALLOC ?= $(LCGDIR)/guardedalloc export NAN_IKSOLVER ?= $(LCGDIR)/iksolver export NAN_BSP ?= $(LCGDIR)/bsp + export NAN_BOOLOP ?= $(LCGDIR)/boolop export NAN_SOUNDSYSTEM ?= $(LCGDIR)/SoundSystem export NAN_STRING ?= $(LCGDIR)/string export NAN_MEMUTIL ?= $(LCGDIR)/memutil @@ -114,7 +115,7 @@ endif export NAN_FREETYPE ?= $(LCGDIR)/freetype export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_SDL ?= $(shell sdl-config --prefix) - export NAN_SDLLIBS ?= $(shell sdl-config --libs) + export NAN_SDLLIBS ?= $(shell sdl-config --libs) -lSDL_mixer export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags) # Uncomment the following line to use Mozilla inplace of netscape @@ -166,7 +167,7 @@ endif export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_SDL ?= $(LCGDIR)/sdl export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include - export NAN_SDLLIBS ?= $(NAN_SDL)/lib/libSDL.a -framework Cocoa -framework IOKit + export NAN_SDLLIBS ?= $(NAN_SDL)/lib/libSDL.a -framework Cocoa -framework IOKit -lSDL_mixer # Uncomment the following line to use Mozilla inplace of netscape # CPPFLAGS +=-DMOZ_NOT_NET @@ -209,7 +210,7 @@ endif export NAN_FREETYPE ?= $(LCGDIR)/freetype export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_SDL ?= $(shell sdl11-config --prefix) - export NAN_SDLLIBS ?= $(shell sdl11-config --libs) + export NAN_SDLLIBS ?= $(shell sdl11-config --libs) -lSDL_mixer export NAN_SDLCFLAGS ?= $(shell sdl11-config --cflags) # Uncomment the following line to use Mozilla inplace of netscape @@ -252,7 +253,7 @@ endif export NAN_FREETYPE ?= /usr/freeware export NAN_GETTEXT ?= /usr/freeware export NAN_SDL ?= $(LCGDIR)/sdl - export NAN_SDLLIBS ?= -L$(NAN_SDL)/lib -lSDL + export NAN_SDLLIBS ?= -L$(NAN_SDL)/lib -lSDL -lSDL_mixer export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include/SDL # Uncomment the following line to use Mozilla inplace of netscape @@ -297,7 +298,7 @@ endif export NAN_FREETYPE ?= /usr export NAN_GETTEXT ?= /usr export NAN_SDL ?= $(shell sdl-config --prefix) - export NAN_SDLLIBS ?= $(shell sdl-config --libs) + export NAN_SDLLIBS ?= $(shell sdl-config --libs) -lSDL_mixer export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags) # Uncomment the following line to use Mozilla inplace of netscape @@ -339,7 +340,7 @@ endif export NAN_FREETYPE ?= $(LCGDIR)/freetype export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_SDL ?= $(shell sdl-config --prefix) - export NAN_SDLLIBS ?= $(shell sdl-config --libs) + export NAN_SDLLIBS ?= $(shell sdl-config --libs) -lSDL_mixer export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags) # Uncomment the following line to use Mozilla inplace of netscape @@ -380,7 +381,7 @@ endif export NAN_FREETYPE ?= $(LCGDIR)/freetype export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_SDL ?= $(shell sdl-config --prefix) - export NAN_SDLLIBS ?= $(shell sdl-config --libs) + export NAN_SDLLIBS ?= $(shell sdl-config --libs) -lSDL_mixer export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags) # Uncomment the following line to use Mozilla inplace of netscape @@ -474,7 +475,7 @@ endif export NAN_FREETYPE ?= $(LCGDIR)/freetype export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_SDL ?= $(shell sdl-config --prefix) - export NAN_SDLLIBS ?= $(shell sdl-config --libs) + export NAN_SDLLIBS ?= $(shell sdl-config --libs) -lSDL_mixer export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags) # Uncomment the following line to use Mozilla inplace of netscape |