Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--SConstruct7
-rw-r--r--build_files/scons/config/win64-mingw-config.py4
-rw-r--r--intern/raskter/raskter.c16
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c82
-rw-r--r--source/blender/blenkernel/intern/node.c18
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c12
-rw-r--r--source/blender/editors/object/object_relations.c24
-rw-r--r--source/creator/CMakeLists.txt13
9 files changed, 112 insertions, 66 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6771466d19..c98f7d8d883 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ mark_as_advanced(WITH_AUDASPACE)
# (unix defaults to OpenMP On)
-if(UNIX AND NOT APPLE)
+if((UNIX AND NOT APPLE) OR (MINGW))
set(PLATFORM_DEFAULT ON)
else()
set(PLATFORM_DEFAULT OFF)
diff --git a/SConstruct b/SConstruct
index c42b36e9172..93a209bac9a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -792,8 +792,13 @@ if env['OURPLATFORM'] == 'win64-mingw':
if env['WITH_BF_SDL']:
dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
+ if(env['WITH_BF_OPENMP']):
+ dllsources.append('${LCGDIR}/binaries/libgomp-1.dll')
+
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
- dllsources.append('${LCGDIR}/binaries/pthreadGC2-w64.dll')
+ dllsources.append('${LCGDIR}/binaries/libgcc_s_sjlj-1.dll')
+ dllsources.append('${LCGDIR}/binaries/libwinpthread-1.dll')
+ dllsources.append('${LCGDIR}/binaries/libstdc++-6.dll)')
dllsources.append('#source/icons/blender.exe.manifest')
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
diff --git a/build_files/scons/config/win64-mingw-config.py b/build_files/scons/config/win64-mingw-config.py
index ecce9052fd7..3eb9803c785 100644
--- a/build_files/scons/config/win64-mingw-config.py
+++ b/build_files/scons/config/win64-mingw-config.py
@@ -175,8 +175,8 @@ BF_BOOST_LIBPATH = BF_BOOST + '/lib'
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
-#Produces errors while rendering with subsurf/multires,
-WITH_BF_OPENMP = False
+#May produce errors with unsupported MinGW-w64 builds
+WITH_BF_OPENMP = True
##
CC = 'gcc'
diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c
index 0eaff70709c..b405fde82e8 100644
--- a/intern/raskter/raskter.c
+++ b/intern/raskter/raskter.c
@@ -218,7 +218,7 @@ static int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, i
/* can happen with a zero area mask */
if (ctx->all_edges == NULL) {
free(edgbuf);
- return(0);
+ return(1);
}
/*
@@ -492,7 +492,7 @@ static int rast_scan_feather(struct r_fill_context *ctx,
* If the number of verts specified to render as a polygon is less than 3,
* return immediately. Obviously we cant render a poly with sides < 3. The
* return for this we set to 1, simply so it can be distinguished from the
- * next place we could return, /home/guest/blender-svn/soc-2011-tomato/intern/raskter/raskter
+ * next place we could return,
* which is a failure to allocate memory.
*/
if (num_feather_verts < 3) {
@@ -510,18 +510,18 @@ static int rast_scan_feather(struct r_fill_context *ctx,
return(0);
}
- /* can happen with a zero area mask */
- if (ctx->all_edges == NULL) {
- free(edgbuf);
- return(0);
- }
-
/*
* Do some preprocessing on all edges. This constructs a table structure in memory of all
* the edge properties and can "flip" some edges so sorting works correctly.
*/
preprocess_all_edges(ctx, feather_verts, num_feather_verts, edgbuf);
+ /* can happen with a zero area mask */
+ if (ctx->all_edges == NULL) {
+ free(edgbuf);
+ return(1);
+ }
+
/*
* Set the pointer for tracking the edges currently in processing to NULL to make sure
* we don't get some crazy value after initialization.
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 4528b748412..79e3fc19d20 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -223,7 +223,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
__func__, totvert, totedge, totloop, totpoly);
if (totedge == 0 && totpoly != 0) {
- PRINT(" logical error, %u polygons and 0 edges\n", totpoly);
+ PRINT("\tLogical error, %u polygons and 0 edges\n", totpoly);
do_edge_recalc = do_fixes;
}
@@ -233,7 +233,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (j = 0; j < 3; j++) {
if (!finite(mv->co[j])) {
- PRINT(" vertex %u: has invalid coordinate\n", i);
+ PRINT("\tVertex %u: has invalid coordinate\n", i);
if (do_fixes) {
zero_v3(mv->co);
@@ -247,7 +247,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if (fix_normal) {
- PRINT(" vertex %u: has zero normal, assuming Z-up normal\n", i);
+ PRINT("\tVertex %u: has zero normal, assuming Z-up normal\n", i);
if (do_fixes) {
mv->no[2] = SHRT_MAX;
verts_fixed = TRUE;
@@ -258,20 +258,20 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (i = 0, me = medges; i < totedge; i++, me++) {
int remove = FALSE;
if (me->v1 == me->v2) {
- PRINT(" edge %u: has matching verts, both %u\n", i, me->v1);
+ PRINT("\tEdge %u: has matching verts, both %u\n", i, me->v1);
remove = do_fixes;
}
if (me->v1 >= totvert) {
- PRINT(" edge %u: v1 index out of range, %u\n", i, me->v1);
+ PRINT("\tEdge %u: v1 index out of range, %u\n", i, me->v1);
remove = do_fixes;
}
if (me->v2 >= totvert) {
- PRINT(" edge %u: v2 index out of range, %u\n", i, me->v2);
+ PRINT("\tEdge %u: v2 index out of range, %u\n", i, me->v2);
remove = do_fixes;
}
if (BLI_edgehash_haskey(edge_hash, me->v1, me->v2)) {
- PRINT(" edge %u: is a duplicate of %d\n", i,
+ PRINT("\tEdge %u: is a duplicate of %d\n", i,
GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, me->v1, me->v2)));
remove = do_fixes;
}
@@ -296,7 +296,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
PRINT(" face %u: edge " STRINGIFY(a) "/" STRINGIFY(b) \
" (%u,%u) is missing egde data\n", i, mf->a, mf->b); \
do_edge_recalc = TRUE; \
- }
+ } (void)0
MFace *mf;
MFace *mf_prev;
@@ -306,6 +306,8 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
SortFace *sf_prev;
unsigned int totsortface = 0;
+ PRINT("No Polys, only tesselated Faces\n");
+
for (i = 0, mf = mfaces, sf = sort_faces; i < totface; i++, mf++) {
int remove = FALSE;
int fidx;
@@ -315,7 +317,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
do {
fv[fidx] = *(&(mf->v1) + fidx);
if (fv[fidx] >= totvert) {
- PRINT(" face %u: 'v%d' index out of range, %u\n", i, fidx + 1, fv[fidx]);
+ PRINT("\tFace %u: 'v%d' index out of range, %u\n", i, fidx + 1, fv[fidx]);
remove = do_fixes;
}
} while (fidx--);
@@ -392,12 +394,12 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
mf_prev = mfaces + sf_prev->index;
if (mf->v4) {
- PRINT(" face %u & %u: are duplicates (%u,%u,%u,%u) (%u,%u,%u,%u)\n",
+ PRINT("\tFace %u & %u: are duplicates (%u,%u,%u,%u) (%u,%u,%u,%u)\n",
sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf->v4,
mf_prev->v1, mf_prev->v2, mf_prev->v3, mf_prev->v4);
}
else {
- PRINT(" face %u & %u: are duplicates (%u,%u,%u) (%u,%u,%u)\n",
+ PRINT("\tFace %u & %u: are duplicates (%u,%u,%u) (%u,%u,%u)\n",
sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3,
mf_prev->v1, mf_prev->v2, mf_prev->v3);
}
@@ -433,7 +435,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
*
* Also, loops not used by polys can be discarded.
* And "intersecting" loops (i.e. loops used by more than one poly) are invalid,
- * so be sure to leave at most one poly/loop!
+ * so be sure to leave at most one poly per loop!
*/
{
SortPoly *sort_polys = MEM_callocN(sizeof(SortPoly) * totpoly, "mesh validate's sort_polys");
@@ -444,12 +446,12 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (mp->loopstart < 0 || mp->totloop < 3) {
/* Invalid loop data. */
- PRINT(" poly %u is invalid (loopstart: %u, totloop: %u)\n", sp->index, mp->loopstart, mp->totloop);
+ PRINT("\tPoly %u is invalid (loopstart: %u, totloop: %u)\n", sp->index, mp->loopstart, mp->totloop);
sp->invalid = TRUE;
}
else if (mp->loopstart + mp->totloop > totloop) {
/* Invalid loop data. */
- PRINT(" poly %u uses loops out of range (loopstart: %u, loopend: %u, max nbr of loops: %u)\n",
+ PRINT("\tPoly %u uses loops out of range (loopstart: %u, loopend: %u, max nbr of loops: %u)\n",
sp->index, mp->loopstart, mp->loopstart + mp->totloop - 1, totloop - 1);
sp->invalid = TRUE;
}
@@ -465,7 +467,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (j = 0, ml = &mloops[sp->loopstart]; j < mp->totloop; j++, ml++, v++) {
if (ml->v >= totvert) {
/* Invalid vert idx. */
- PRINT(" loop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
+ PRINT("\tLoop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
sp->invalid = TRUE;
}
@@ -478,7 +480,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
v = sp->verts;
for (j = 0; j < mp->totloop; j++, v++) {
if ((mverts[*v].flag & ME_VERT_TMP_TAG) == 0) {
- PRINT(" poly %u has duplicate vert reference at corner (%u)\n", i, j);
+ PRINT("\tPoly %u has duplicate vert reference at corner (%u)\n", i, j);
sp->invalid = TRUE;
}
mverts[*v].flag &= ~ME_VERT_TMP_TAG;
@@ -494,7 +496,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
v2 = mloops[sp->loopstart + (j + 1) % mp->totloop].v;
if (!BLI_edgehash_haskey(edge_hash, v1, v2)) {
/* Edge not existing. */
- PRINT(" poly %u needs missing edge (%u, %u)\n", sp->index, v1, v2);
+ PRINT("\tPoly %u needs missing edge (%u, %u)\n", sp->index, v1, v2);
if (do_fixes)
do_edge_recalc = TRUE;
else
@@ -506,11 +508,11 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (do_fixes) {
int prev_e = ml->e;
ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, v1, v2));
- PRINT(" loop %u has invalid edge reference (%u), fixed using edge %u\n",
+ PRINT("\tLoop %u has invalid edge reference (%u), fixed using edge %u\n",
sp->loopstart + j, prev_e, ml->e);
}
else {
- PRINT(" loop %u has invalid edge reference (%u)\n", sp->loopstart + j, ml->e);
+ PRINT("\tLoop %u has invalid edge reference (%u)\n", sp->loopstart + j, ml->e);
sp->invalid = TRUE;
}
}
@@ -522,11 +524,11 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (do_fixes) {
int prev_e = ml->e;
ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, v1, v2));
- PRINT(" poly %u has invalid edge reference (%u), fixed using edge %u\n",
+ PRINT("\tPoly %u has invalid edge reference (%u), fixed using edge %u\n",
sp->index, prev_e, ml->e);
}
else {
- PRINT(" poly %u has invalid edge reference (%u)\n", sp->index, ml->e);
+ PRINT("\tPoly %u has invalid edge reference (%u)\n", sp->index, ml->e);
sp->invalid = TRUE;
}
}
@@ -544,7 +546,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (*v != *prev_v) {
int dlt = v - prev_v;
if (dlt > 1) {
- PRINT(" poly %u is invalid, it multi-uses vertex %u (%u times)\n",
+ PRINT("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
sp->index, *prev_v, dlt);
sp->invalid = TRUE;
}
@@ -552,7 +554,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
}
if (v - prev_v > 1) { /* Don't forget final verts! */
- PRINT(" poly %u is invalid, it multi-uses vertex %u (%u times)\n",
+ PRINT("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
sp->index, *prev_v, (int)(v - prev_v));
sp->invalid = TRUE;
}
@@ -610,17 +612,17 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
p2_sub = FALSE;
if (p1_sub && p2_sub) {
- PRINT(" polys %u and %u use same vertices, considering poly %u as invalid.\n",
+ PRINT("\tPolys %u and %u use same vertices, considering poly %u as invalid.\n",
prev_sp->index, sp->index, sp->index);
sp->invalid = TRUE;
}
/* XXX In fact, these might be valid? :/ */
else if (p1_sub) {
- PRINT(" %u is a sub-poly of %u, considering it as invalid.\n", sp->index, prev_sp->index);
+ PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", sp->index, prev_sp->index);
sp->invalid = TRUE;
}
else if (p2_sub) {
- PRINT(" %u is a sub-poly of %u, considering it as invalid.\n", prev_sp->index, sp->index);
+ PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", prev_sp->index, sp->index);
prev_sp->invalid = TRUE;
prev_sp = sp; /* sp is new reference poly. */
}
@@ -631,7 +633,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if ((p1_nv == p2_nv) && (memcmp(p1_v, p2_v, p1_nv * sizeof(*p1_v)) == 0)) {
if (do_verbose) {
- PRINT(" polys %u and %u use same vertices (%u",
+ PRINT("\tPolys %u and %u use same vertices (%u",
prev_sp->index, sp->index, *p1_v);
for (j = 1; j < p1_nv; j++)
PRINT(", %u", p1_v[j]);
@@ -671,7 +673,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
/* Unused loops. */
if (prev_end < sp->loopstart) {
for (j = prev_end, ml = &mloops[prev_end]; j < sp->loopstart; j++, ml++) {
- PRINT(" loop %u is unused.\n", j);
+ PRINT("\tLoop %u is unused.\n", j);
if (do_fixes)
REMOVE_LOOP_TAG(ml);
}
@@ -680,7 +682,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
/* Multi-used loops. */
else if (prev_end > sp->loopstart) {
- PRINT(" polys %u and %u share loops from %u to %u, considering poly %u as invalid.\n",
+ PRINT("\tPolys %u and %u share loops from %u to %u, considering poly %u as invalid.\n",
prev_sp->index, sp->index, sp->loopstart, prev_end, sp->index);
if (do_fixes) {
REMOVE_POLY_TAG((&mpolys[sp->index]));
@@ -699,7 +701,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
/* We may have some remaining unused loops to get rid of! */
if (prev_end < totloop) {
for (j = prev_end, ml = &mloops[prev_end]; j < totloop; j++, ml++) {
- PRINT(" loop %u is unused.\n", j);
+ PRINT("\tLoop %u is unused.\n", j);
if (do_fixes)
REMOVE_LOOP_TAG(ml);
}
@@ -720,14 +722,14 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (j = 0, dw = dv->dw; j < dv->totweight; j++, dw++) {
/* note, greater then max defgroups is accounted for in our code, but not < 0 */
if (!finite(dw->weight)) {
- PRINT(" vertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
+ PRINT("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
if (do_fixes) {
dw->weight = 0.0f;
vert_weights_fixed = TRUE;
}
}
else if (dw->weight < 0.0f || dw->weight > 1.0f) {
- PRINT(" vertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
+ PRINT("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
if (do_fixes) {
CLAMP(dw->weight, 0.0f, 1.0f);
vert_weights_fixed = TRUE;
@@ -735,7 +737,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if (dw->def_nr < 0) {
- PRINT(" vertex deform %u, has invalid group %d\n", i, dw->def_nr);
+ PRINT("\tVertex deform %u, has invalid group %d\n", i, dw->def_nr);
if (do_fixes) {
defvert_remove_group(dv, dw);
if (dv->dw) {
@@ -783,10 +785,10 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
int free_msel = FALSE;
for (i = 0, msel = mesh->mselect; i < mesh->totselect; i++, msel++) {
- int tot_elem;
+ int tot_elem = 0;
if (msel->index < 0) {
- PRINT("Mesh select element %d type %d index is negative, "
+ PRINT("\tMesh select element %d type %d index is negative, "
"resetting selection stack.\n", i, msel->type);
free_msel = TRUE;
break;
@@ -805,7 +807,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if (msel->index > tot_elem) {
- PRINT("Mesh select element %d type %d index %d is larger than data array size %d, "
+ PRINT("\tMesh select element %d type %d index %d is larger than data array size %d, "
"resetting selection stack.\n", i, msel->type, msel->index, tot_elem);
free_msel = TRUE;
@@ -820,7 +822,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
}
- PRINT("BKE_mesh_validate: finished\n\n");
+ PRINT("%s: finished\n\n", __func__);
return (verts_fixed || vert_weights_fixed || do_polyloop_free || do_edge_free || do_edge_recalc || msel_fixed);
}
@@ -829,13 +831,15 @@ static int mesh_validate_customdata(CustomData *data, short do_verbose, const sh
{
int i = 0, has_fixes = 0;
+ PRINT("%s: Checking %d CD layers...\n", __func__, data->totlayer);
+
while (i < data->totlayer) {
CustomDataLayer *layer = &data->layers[i];
CustomDataMask mask = CD_TYPE_AS_MASK(layer->type);
int ok = 1;
if ((mask & CD_MASK_MESH) == 0) {
- PRINT("CustomDataLayer type %d which isn't in CD_MASK_MESH is stored in Mehs structure\n", layer->type);
+ PRINT("\tCustomDataLayer type %d which isn't in CD_MASK_MESH is stored in Mesh structure\n", layer->type);
if (do_fixes) {
CustomData_free_layer(data, layer->type, 0, i);
@@ -848,6 +852,8 @@ static int mesh_validate_customdata(CustomData *data, short do_verbose, const sh
i++;
}
+ PRINT("%s: Finished\n\n", __func__);
+
return has_fixes;
}
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 47f574d6832..a6460971a4d 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -633,8 +633,12 @@ bNodeTree *ntreeAddTree(const char *name, int type, int nodetype)
* - this gets called when executing compositing updates (for threaded previews)
* - when the nodetree datablock needs to be copied (i.e. when users get copied)
* - for scene duplication use ntreeSwapID() after so we don't have stale pointers.
+ *
+ * do_make_extern: keep enabled for general use, only reason _not_ to enable is when
+ * copying for internal use (threads for eg), where you wont want it to modify the
+ * scene data.
*/
-bNodeTree *ntreeCopyTree(bNodeTree *ntree)
+static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, const short do_make_extern)
{
bNodeTree *newtree;
bNode *node /*, *nnode */ /* UNUSED */, *last;
@@ -664,6 +668,11 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
last = ntree->nodes.last;
for (node= ntree->nodes.first; node; node= node->next) {
+
+ if (do_make_extern) {
+ id_lib_extern(node->id);
+ }
+
node->new_node= NULL;
/* nnode= */ nodeCopyNode(newtree, node); /* sets node->new */
@@ -709,6 +718,11 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
return newtree;
}
+bNodeTree *ntreeCopyTree(bNodeTree *ntree)
+{
+ return ntreeCopyTree_internal(ntree, TRUE);
+}
+
/* use when duplicating scenes */
void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to)
{
@@ -1131,7 +1145,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
}
/* node copy func */
- ltree= ntreeCopyTree(ntree);
+ ltree = ntreeCopyTree_internal(ntree, FALSE);
if (adt) {
AnimData *ladt= BKE_animdata_from_id(&ltree->id);
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
index 1bd2f41209b..82ab49b5c38 100644
--- a/source/blender/bmesh/operators/bmo_hull.c
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -37,6 +37,8 @@
#include "bmesh.h"
+#define HULL_EPSILON_FLT 0.0001f
+
/* Internal operator flags */
typedef enum {
HULL_FLAG_INPUT = (1 << 0),
@@ -143,11 +145,11 @@ static int hull_point_tri_side(const HullTriangle *t, const float co[3])
/* Added epsilon to fix bug [#31941], improves output when some
* vertices are nearly coplanar. Might need further tweaking for
* other cases though. */
- float p[3], d, epsilon = 0.0001;
+ float p[3], d;
sub_v3_v3v3(p, co, t->v[0]->co);
d = dot_v3v3(t->no, p);
- if (d < -epsilon) return -1;
- else if (d > epsilon) return 1;
+ if (d < -HULL_EPSILON_FLT) return -1;
+ else if (d > HULL_EPSILON_FLT) return 1;
else return 0;
}
@@ -464,7 +466,7 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
}
/* Check for colinear vertices */
- if (largest_dist < 0.0001f)
+ if (largest_dist < HULL_EPSILON_FLT)
return TRUE;
/* Choose fourth point farthest from existing plane */
@@ -487,7 +489,7 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
return TRUE;
}
- if (largest_dist < 0.0001f)
+ if (largest_dist < HULL_EPSILON_FLT)
return TRUE;
return FALSE;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 651f84f0f34..d7c882ba51e 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1732,6 +1732,13 @@ static void make_local_makelocalmaterial(Material *ma)
/* nodetree? XXX */
}
+enum {
+ MAKE_LOCAL_SELECT_OB,
+ MAKE_LOCAL_SELECT_OBDATA,
+ MAKE_LOCAL_SELECT_OBDATA_MATERIAL,
+ MAKE_LOCAL_ALL
+};
+
static int make_local_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
@@ -1742,7 +1749,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
ID *id;
int a, b, mode = RNA_enum_get(op->ptr, "type");
- if (mode == 4) {
+ if (mode == MAKE_LOCAL_ALL) {
BKE_library_make_local(bmain, NULL, 0); /* NULL is all libs */
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
@@ -1770,7 +1777,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
{
id = ob->data;
- if (id && (mode == 2 || mode == 3)) {
+ if (id && (ELEM(mode, MAKE_LOCAL_SELECT_OBDATA, MAKE_LOCAL_SELECT_OBDATA_MATERIAL))) {
id_make_local(id, 0);
adt = BKE_animdata_from_id(id);
if (adt) BKE_animdata_make_local(adt);
@@ -1794,7 +1801,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- if (mode == 3) {
+ if (mode == MAKE_LOCAL_SELECT_OBDATA_MATERIAL) {
CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
{
if (ob->type == OB_LAMP) {
@@ -1832,11 +1839,12 @@ static int make_local_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_local(wmOperatorType *ot)
{
static EnumPropertyItem type_items[] = {
- {1, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
- {2, "SELECTED_OBJECTS_DATA", 0, "Selected Objects and Data", ""},
- {3, "SELECTED_OBJECTS_DATA_MAT", 0, "Selected Objects, Data and Materials", ""},
- {4, "ALL", 0, "All", ""},
- {0, NULL, 0, NULL, NULL}};
+ {MAKE_LOCAL_SELECT_OB, "SELECT_OBJECT", 0, "Selected Objects", ""},
+ {MAKE_LOCAL_SELECT_OBDATA, "SELECT_OBDATA", 0, "Selected Objects and Data", ""},
+ {MAKE_LOCAL_SELECT_OBDATA_MATERIAL, "SELECT_OBDATA_MATERIAL", 0, "Selected Objects, Data and Materials", ""},
+ {MAKE_LOCAL_ALL, "ALL", 0, "All", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
/* identifiers */
ot->name = "Make Local";
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index a5d531760ff..3eca2dbb66a 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -560,9 +560,20 @@ elseif(WIN32)
)
elseif(WITH_MINGW64)
install(
- FILES ${LIBDIR}/binaries/pthreadGC2-w64.dll
+ FILES
+ ${LIBDIR}/binaries/libgcc_s_sjlj-1.dll
+ ${LIBDIR}/binaries/libwinpthread-1.dll
+ ${LIBDIR}/binaries/libstdc++-6.dll
DESTINATION ${TARGETDIR}
)
+
+ if(WITH_OPENMP)
+ install(
+ FILES
+ ${LIBDIR}/binaries/libgomp-1.dll
+ DESTINATION ${TARGETDIR}
+ )
+ endif()
endif()
endif()