Merge branch 'master' into blender2.8
authormano-wii <germano.costa@ig.com.br>
Fri, 14 Jul 2017 20:26:46 +0000 (17:26 -0300)
committermano-wii <germano.costa@ig.com.br>
Fri, 14 Jul 2017 20:26:46 +0000 (17:26 -0300)
source/blender/editors/transform/transform_snap_object.c

index 39d76c89e4d5de653a2758f3b8d2e10bbb18efd5..bdefd169f225679656d2663fb6551be744244479 100644 (file)
@@ -785,7 +785,7 @@ struct RaycastObjUserData {
        const float *ray_start;
        const float *ray_dir;
        const float *depth_range;
-       const unsigned int ob_index;
+       unsigned int ob_index;
        /* read/write args */
        float *ray_depth;
        /* return args */
@@ -804,7 +804,7 @@ static void raycast_obj_cb(SnapObjectContext *sctx, bool is_obedit, Object *ob,
        dt->ret |= raycastObj(
                sctx,
                dt->ray_orig, dt->ray_start, dt->ray_dir, dt->depth_range,
-               ob, obmat, dt->ob_index, is_obedit,
+               ob, obmat, dt->ob_index++, is_obedit,
                dt->ray_depth,
                dt->r_loc, dt->r_no, dt->r_index,
                dt->r_ob, dt->r_obmat,