[Bf-blender-cvs] [c6a46152851] fracture_modifier-master: compile and link errors fixed

Martin Felke noreply at git.blender.org
Tue Jun 12 15:54:29 CEST 2018


Commit: c6a461528510c9c75a53de3f7f71c95090ce36fc
Author: Martin Felke
Date:   Sun May 27 12:33:27 2018 +0200
Branches: fracture_modifier-master
https://developer.blender.org/rBc6a461528510c9c75a53de3f7f71c95090ce36fc

compile and link errors fixed

===================================================================

M	release/scripts/startup/bl_ui/properties_physics_fracture.py
R084	source/blender/modifiers/intern/MOD_boolean_util.h	source/blender/blenkernel/BKE_boolean.h
M	source/blender/blenkernel/CMakeLists.txt
R096	source/blender/modifiers/intern/MOD_boolean_util_bmesh.c	source/blender/blenkernel/intern/boolean.c
M	source/blender/blenkernel/intern/fracture_util.c
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/intern/MOD_boolean.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_physics_fracture.py b/release/scripts/startup/bl_ui/properties_physics_fracture.py
index 20efd1f0557..d830a38b131 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fracture.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fracture.py
@@ -116,10 +116,7 @@ class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
         layout.prop(md, "frac_algorithm")
         if md.frac_algorithm in {'BOOLEAN', 'BOOLEAN_FRACTAL'}:
             col = layout.column(align=True)
-            col.label(text="Boolean Solver:")
-            col.prop(md, "boolean_solver", text="")
-            if md.boolean_solver == 'BMESH':
-                col.prop(md, "boolean_double_threshold")
+            col.prop(md, "boolean_double_threshold")
         col = layout.column(align=True)
         col.prop(md, "shard_count")
         col.prop(md, "point_seed")
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/blenkernel/BKE_boolean.h
similarity index 84%
rename from source/blender/modifiers/intern/MOD_boolean_util.h
rename to source/blender/blenkernel/BKE_boolean.h
index 81d7035669b..69da34b89d8 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util.h
+++ b/source/blender/blenkernel/BKE_boolean.h
@@ -25,23 +25,24 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/modifiers/intern/MOD_boolean_util.h
- *  \ingroup modifiers
+/** \file blender/blenkernel/BKE_boolean.h
+ *  \ingroup blenkernel
  */
 
 
-#ifndef __MOD_BOOLEAN_UTIL_H__
-#define __MOD_BOOLEAN_UTIL_H__
+#ifndef __BKE_BOOLEAN_H__
+#define __BKE_BOOLEAN_H__
 
 struct Object;
 struct DerivedMesh;
+struct BooleanModifierData;
 
 /* Performs a boolean between two mesh objects, it is assumed that both objects
  * are in fact mesh object. On success returns a DerivedMesh. On failure
  * returns NULL and reports an error. */
 
-struct DerivedMesh *NewBooleanDerivedMeshBMesh(struct DerivedMesh *dm, struct Object *ob,
+struct DerivedMesh *BKE_boolean_bmesh(struct DerivedMesh *dm, struct Object *ob,
                                                struct DerivedMesh *dm_other, struct Object *ob_other, int op_type,
                                                float double_threshold, struct BooleanModifierData *bmd);
 
-#endif  /* MOD_BOOLEAN_UTILS */
+#endif  /* BKE_BOOLEAN_H */
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index fa1dcbf8215..5baa166e259 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -78,6 +78,7 @@ set(SRC
 	intern/blender_undo.c
 	intern/blendfile.c
 	intern/bmfont.c
+	intern/boolean.c
 	intern/boids.c
 	intern/bpath.c
 	intern/brush.c
@@ -214,6 +215,7 @@ set(SRC
 	BKE_bmfont.h
 	BKE_bmfont_types.h
 	BKE_boids.h
+	BKE_boolean.h
 	BKE_bpath.h
 	BKE_brush.h
 	BKE_bullet.h
@@ -317,7 +319,6 @@ set(SRC
 	intern/CCGSubSurf_inline.h
 	intern/CCGSubSurf_intern.h
 	intern/pbvh_intern.h
-	../modifiers/intern/MOD_boolean_util.h
 )
 
 if(WITH_BINRELOC)
diff --git a/source/blender/modifiers/intern/MOD_boolean_util_bmesh.c b/source/blender/blenkernel/intern/boolean.c
similarity index 96%
rename from source/blender/modifiers/intern/MOD_boolean_util_bmesh.c
rename to source/blender/blenkernel/intern/boolean.c
index 39246aea362..67a225ca4d3 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util_bmesh.c
+++ b/source/blender/blenkernel/intern/boolean.c
@@ -23,11 +23,12 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/modifiers/intern/MOD_boolean_util_bmesh.c
- *  \ingroup modifiers
+/** \file blender/blenkernel/intern/boolean.c
+ *  \ingroup blenkernel
  */
 
 #include "BLI_alloca.h"
+#include "BKE_boolean.h"
 #include "BLI_math_geom.h"
 #include "BKE_material.h"
 #include "BKE_global.h"  /* only to check G.debug */
@@ -49,7 +50,6 @@
 #include "DNA_modifier_types.h"
 #include "BLI_utildefines.h"
 
-#include "MOD_boolean_util.h"
 
 /* has no meaning for faces, do this so we can tell which face is which */
 #define BM_FACE_TAG BM_ELEM_DRAW
@@ -62,7 +62,7 @@ static int bm_face_isect_pair(BMFace *f, void *UNUSED(user_data))
 	return BM_elem_flag_test(f, BM_FACE_TAG) ? 1 : 0;
 }
 
-DerivedMesh *NewBooleanDerivedMeshBMesh(DerivedMesh *dm, struct Object *ob,
+DerivedMesh *BKE_boolean_bmesh(DerivedMesh *dm, struct Object *ob,
                                    DerivedMesh *dm_other, struct Object *ob_other, int op_type,
                                    float double_threshold, struct BooleanModifierData *bmd)
 {
diff --git a/source/blender/blenkernel/intern/fracture_util.c b/source/blender/blenkernel/intern/fracture_util.c
index 43d1eb9f01c..cb16a088139 100644
--- a/source/blender/blenkernel/intern/fracture_util.c
+++ b/source/blender/blenkernel/intern/fracture_util.c
@@ -30,6 +30,7 @@
  *  \brief CSG operations
  */
 
+#include "BKE_boolean.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_deform.h"
 #include "BKE_editmesh.h"
@@ -57,7 +58,6 @@
 
 #include "bmesh.h"
 #include "bmesh_tools.h"
-#include "../../modifiers/intern/MOD_boolean_util.h"
 
 
 struct BoxPack;
@@ -596,7 +596,7 @@ Shard *BKE_fracture_shard_boolean(Object *obj, DerivedMesh *dm_parent, Shard *ch
 	right_dm = dm_parent;
 
 	
-	output_dm = NewBooleanDerivedMeshBMesh(right_dm, obj, left_dm, obj, 0, thresh, NULL); /*0 == intersection, 2 == difference*/
+	output_dm = BKE_boolean_bmesh(right_dm, obj, left_dm, obj, 0, thresh, NULL); /*0 == intersection, 2 == difference*/
 
 
 	/*check for watertightness, but for fractal only*/
@@ -608,7 +608,7 @@ Shard *BKE_fracture_shard_boolean(Object *obj, DerivedMesh *dm_parent, Shard *ch
 	if (other != NULL)
 	{
 		
-		other_dm = NewBooleanDerivedMeshBMesh(left_dm, obj, right_dm, obj, 2, thresh, NULL);
+		other_dm = BKE_boolean_bmesh(left_dm, obj, right_dm, obj, 2, thresh, NULL);
 
 		/*check for watertightness again, true means do return NULL here*/
 		if (!other_dm || do_check_watertight_other(&other_dm, &output_dm, other, right_dm, &left_dm, mat))
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index d4da2ba3558..a3ce63a0574 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -112,7 +112,6 @@ set(SRC
 	intern/MOD_meshcache_util.h
 	intern/MOD_util.h
 	intern/MOD_weightvg_util.h
-	intern/MOD_boolean_util.h
 )
 
 if(WITH_LEGACY_DEPSGRAPH)
@@ -126,13 +125,6 @@ if(WITH_ALEMBIC)
 	)
 endif()
 
-if(WITH_MOD_BOOLEAN)
-	add_definitions(-DWITH_MOD_BOOLEAN)
-	list(APPEND SRC
-		intern/MOD_boolean_util_bmesh.c
-	)
-endif()
-
 if(WITH_MOD_REMESH)
 	add_definitions(-DWITH_MOD_REMESH)
 	list(APPEND INC
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index 560f701eddc..0901ef23f1b 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -44,6 +44,7 @@
 #include "BKE_cdderivedmesh.h"
 #include "BKE_library_query.h"
 #include "BKE_modifier.h"
+#include "BKE_boolean.h"
 
 #include "depsgraph_private.h"
 
@@ -183,7 +184,7 @@ static DerivedMesh *applyModifier_bmesh(
 		result = get_quick_derivedMesh(ob, dm, bmd->object, dm_other, bmd->operation);
 
 		if (result == NULL) {
-			result = NewBooleanDerivedMeshBMesh(dm, ob, dm_other, bmd->object, bmd->operation, bmd->double_threshold, bmd);
+			result = BKE_boolean_bmesh(dm, ob, dm_other, bmd->object, bmd->operation, bmd->double_threshold, bmd);
 		}
 
 		/* if new mesh returned, return it; otherwise there was



More information about the Bf-blender-cvs mailing list