diff options
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_cloth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index 7b14f48c6a8..61455cc28bb 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -277,7 +277,7 @@ static void do_cloth_brush_build_constraints_task_cb_ex( const Brush *brush = data->brush; PBVHNode *node = data->nodes[n]; - const int node_index = (int)(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); + const int node_index = POINTER_AS_INT(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); if (data->cloth_sim->node_state[node_index] != SCULPT_CLOTH_NODE_UNINITIALIZED) { /* The simulation already contains constraints for this node. */ return; @@ -693,7 +693,7 @@ static void do_cloth_brush_solve_simulation_task_cb_ex( SculptClothSimulation *cloth_sim = data->cloth_sim; const float time_step = data->cloth_time_step; - const int node_index = (int)(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); + const int node_index = POINTER_AS_INT(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); if (data->cloth_sim->node_state[node_index] != SCULPT_CLOTH_NODE_ACTIVE) { return; } @@ -1062,7 +1062,7 @@ void SCULPT_cloth_sim_activate_nodes(SculptClothSimulation *cloth_sim, { /* Activate the nodes inside the simulation area. */ for (int n = 0; n < totnode; n++) { - const int node_index = (int)(BLI_ghash_lookup(cloth_sim->node_state_index, nodes[n])); + const int node_index = POINTER_AS_INT(BLI_ghash_lookup(cloth_sim->node_state_index, nodes[n])); cloth_sim->node_state[node_index] = SCULPT_CLOTH_NODE_ACTIVE; } } |