diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-09-24 18:24:20 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-09-24 18:24:20 +0300 |
commit | 27b3ea622f8bd313a8e2827dfec752bf2125566c (patch) | |
tree | f212e49d224ce8e1cfc3b17a64ae524711494391 /source/blender/editors/uvedit/uvedit_parametrizer.c | |
parent | 372dff8d1dc7e24d4b2cd37de245588ecfce8bfa (diff) | |
parent | de80e687689032cb85179a1f7e89750573631d5d (diff) |
Merge remote-tracking branch 'origin/master' into cycles_camera_nodescycles_camera_nodes
Note: the branch currently crashes in blender_camera_nodes.cpp:
BL::NodeTree b_ntree = b_data.node_groups[nodes_tree_name];
The crash was introduced in:
cb7cf523e5c000609f32a382e2c0fcc57f635a42
Conflicts:
intern/cycles/SConscript
intern/cycles/blender/addon/__init__.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/camera.cpp
intern/cycles/render/camera.h
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_parametrizer.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 79f53e1d971..00615f9bef7 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -35,7 +35,6 @@ #include "BLI_boxpack2d.h" #include "BLI_convexhull2d.h" -#include "uvedit_intern.h" #include "uvedit_parametrizer.h" #include <math.h> @@ -2673,8 +2672,8 @@ static PBool p_abf_matrix_invert(PAbfSystem *sys, PChart *chart) } for (i = 0; i < ninterior; i++) { - sys->lambdaPlanar[i] += nlGetVariable(0, i); - sys->lambdaLength[i] += nlGetVariable(0, ninterior + i); + sys->lambdaPlanar[i] += (float)nlGetVariable(0, i); + sys->lambdaLength[i] += (float)nlGetVariable(0, ninterior + i); } } @@ -3403,8 +3402,8 @@ static void p_chart_stretch_minimize(PChart *chart, RNG *rng) static int p_compare_geometric_uv(const void *a, const void *b) { - PVert *v1 = *(PVert **)a; - PVert *v2 = *(PVert **)b; + const PVert *v1 = *(const PVert * const *)a; + const PVert *v2 = *(const PVert * const *)b; if (v1->uv[0] < v2->uv[0]) return -1; @@ -3789,11 +3788,14 @@ static PBool p_node_intersect(SmoothNode *node, float co[2]) /* smoothing */ -static int p_compare_float(const void *a, const void *b) +static int p_compare_float(const void *a_, const void *b_) { - if (*((float *)a) < *((float *)b)) + const float a = *(const float *)a_; + const float b = *(const float *)b_; + + if (a < b) return -1; - else if (*((float *)a) == *((float *)b)) + else if (a == b) return 0; else return 1; @@ -4194,7 +4196,7 @@ void param_delete(ParamHandle *handle) static void p_add_ngon(ParamHandle *handle, ParamKey key, int nverts, ParamKey *vkeys, float **co, float **uv, - ParamBool *pin, ParamBool *select, float normal[3]) + ParamBool *pin, ParamBool *select, const float normal[3]) { int *boundary = BLI_array_alloca(boundary, nverts); int i; @@ -4559,7 +4561,7 @@ void param_pack(ParamHandle *handle, float margin, bool do_rotate) box->index = i; /* warning this index skips PCHART_NOPACK boxes */ if (margin > 0.0f) - area += sqrtf(box->w * box->h); + area += (double)sqrtf(box->w * box->h); } if (margin > 0.0f) { |