diff --git a/intern/Makefile b/intern/Makefile index f4ace043414..7eaabd5b6bb 100644 --- a/intern/Makefile +++ b/intern/Makefile @@ -35,7 +35,7 @@ SOURCEDIR = intern # include nan_subdirs.mk ALLDIRS = string ghost guardedalloc bmfont moto container memutil -ALLDIRS += decimation iksolver bsp SoundSystem opennl elbeem +ALLDIRS += decimation iksolver bsp SoundSystem opennl elbeem boolop all:: @for i in $(ALLDIRS); do \ 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