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:
authorCampbell Barton <ideasman42@gmail.com>2018-09-19 05:14:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-19 05:14:36 +0300
commitf35e9f047a0381732a41ec331945b7a0654ee578 (patch)
tree5be3c632483cf2bc2960b21789849af27c9b2b59 /source/blender/blenkernel/intern/mesh_remap.c
parent0ad183bf0289c3b9b1af0cd581bc30435cae3800 (diff)
parentbb3ec3ebafbc2c0e5d8530148a433242e0adad30 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_remap.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_remap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index bf98b8040e3..704db453670 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -966,7 +966,7 @@ static void mesh_island_to_astar_graph_edge_process(
const int pidx = edge_to_poly_map[edge_idx].indices[i];
MPoly *mp = &polys[pidx];
const int pidx_isld = islands ? poly_island_index_map[pidx] : pidx;
- void *custom_data = is_edge_innercut ? SET_INT_IN_POINTER(edge_idx) : SET_INT_IN_POINTER(-1);
+ void *custom_data = is_edge_innercut ? POINTER_FROM_INT(edge_idx) : POINTER_FROM_INT(-1);
if (UNLIKELY(islands && (islands->items_to_islands[mp->loopstart] != island_index))) {
/* poly not in current island, happens with border edges... */
@@ -1082,12 +1082,12 @@ static float mesh_remap_calc_loops_astar_f_cost(
{
float *co_next, *co_dest;
- if (link && (GET_INT_FROM_POINTER(link->custom_data) != -1)) {
+ if (link && (POINTER_AS_INT(link->custom_data) != -1)) {
/* An innercut edge... We tag our solution as potentially crossing innercuts.
* Note it might not be the case in the end (AStar will explore around optimal path), but helps
* trimming off some processing later... */
- if (!GET_INT_FROM_POINTER(as_solution->custom_data)) {
- as_solution->custom_data = SET_INT_IN_POINTER(true);
+ if (!POINTER_AS_INT(as_solution->custom_data)) {
+ as_solution->custom_data = POINTER_FROM_INT(true);
}
}
@@ -1666,7 +1666,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(
continue;
}
- as_solution.custom_data = SET_INT_IN_POINTER(false);
+ as_solution.custom_data = POINTER_FROM_INT(false);
isld_res = &islands_res[best_island_index][plidx_dst];
if (use_from_vert) {
@@ -1689,7 +1689,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(
BLI_astar_graph_solve(
as_graph, pidx_isld_src_prev, pidx_isld_src,
mesh_remap_calc_loops_astar_f_cost, &as_solution, isld_steps_src);
- if (GET_INT_FROM_POINTER(as_solution.custom_data) && (as_solution.steps > 0)) {
+ if (POINTER_AS_INT(as_solution.custom_data) && (as_solution.steps > 0)) {
/* Find first 'cutting edge' on path, and bring back lidx_src on poly just
* before that edge.
* Note we could try to be much smarter (like e.g. storing a whole poly's indices,
@@ -1701,7 +1701,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(
/* Note we go backward here, from dest to src poly. */
for (i = as_solution.steps - 1; i--;) {
BLI_AStarGNLink *as_link = as_solution.prev_links[pidx_isld_src];
- const int eidx = GET_INT_FROM_POINTER(as_link->custom_data);
+ const int eidx = POINTER_AS_INT(as_link->custom_data);
pidx_isld_src = as_solution.prev_nodes[pidx_isld_src];
BLI_assert(pidx_isld_src != -1);
if (eidx != -1) {
@@ -1774,7 +1774,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(
BLI_astar_graph_solve(
as_graph, pidx_isld_src_prev, pidx_isld_src,
mesh_remap_calc_loops_astar_f_cost, &as_solution, isld_steps_src);
- if (GET_INT_FROM_POINTER(as_solution.custom_data) && (as_solution.steps > 0)) {
+ if (POINTER_AS_INT(as_solution.custom_data) && (as_solution.steps > 0)) {
/* Find first 'cutting edge' on path, and bring back lidx_src on poly just
* before that edge.
* Note we could try to be much smarter (like e.g. storing a whole poly's indices,
@@ -1786,7 +1786,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(
/* Note we go backward here, from dest to src poly. */
for (i = as_solution.steps - 1; i--;) {
BLI_AStarGNLink *as_link = as_solution.prev_links[pidx_isld_src];
- int eidx = GET_INT_FROM_POINTER(as_link->custom_data);
+ int eidx = POINTER_AS_INT(as_link->custom_data);
pidx_isld_src = as_solution.prev_nodes[pidx_isld_src];
BLI_assert(pidx_isld_src != -1);