Cleanup: remove unused member and rearrange function
This commit is contained in:
parent
3a898db363
commit
d7b231baa8
Notes:
blender-bot
2023-02-14 11:28:39 +01:00
Referenced by issue #92807, Blender 3.0 - Planar Track - Only half of the image appears in the MovieClip Editor Referenced by issue #92561, Mesh Sequence Cache (ABC) an hair interpolated children distribution issue (triangulate modifier seem to fix it) Referenced by issue #92514, Bone snapping to cursor in edit mode snaps to middle of the bone instead of the head (regression) Referenced by issue #92355, Remesh-bug.crash
|
@ -267,7 +267,6 @@ typedef struct V3DSnapCursorData {
|
|||
short snap_elem;
|
||||
float loc[3];
|
||||
float nor[3];
|
||||
float face_nor[3];
|
||||
float obmat[4][4];
|
||||
int elem_index[3];
|
||||
float plane_omat[3][3];
|
||||
|
@ -282,11 +281,11 @@ void ED_view3d_cursor_snap_activate_point(void);
|
|||
void ED_view3d_cursor_snap_activate_plane(void);
|
||||
void ED_view3d_cursor_snap_deactivate_point(void);
|
||||
void ED_view3d_cursor_snap_deactivate_plane(void);
|
||||
void ED_view3d_cursor_snap_prevpoint_set(const float prev_point[3]);
|
||||
void ED_view3d_cursor_snap_update(const struct bContext *C,
|
||||
const int x,
|
||||
const int y,
|
||||
V3DSnapCursorData *snap_data);
|
||||
void ED_view3d_cursor_snap_prevpoint_set(const float prev_point[3]);
|
||||
struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(struct Scene *scene);
|
||||
void ED_view3d_cursor_snap_draw_util(struct RegionView3D *rv3d,
|
||||
const float loc_prev[3],
|
||||
|
|
|
@ -698,7 +698,6 @@ static void v3d_cursor_snap_update(const bContext *C,
|
|||
snap_data->snap_elem = snap_elem;
|
||||
copy_v3_v3(snap_data->loc, co);
|
||||
copy_v3_v3(snap_data->nor, no);
|
||||
copy_v3_v3(snap_data->face_nor, face_nor);
|
||||
copy_m4_m4(snap_data->obmat, obmat);
|
||||
copy_v3_v3_int(snap_data->elem_index, snap_elem_index);
|
||||
|
||||
|
@ -903,6 +902,21 @@ void ED_view3d_cursor_snap_deactivate_plane(void)
|
|||
v3d_cursor_snap_free(sdata_intern);
|
||||
}
|
||||
|
||||
void ED_view3d_cursor_snap_prevpoint_set(const float prev_point[3])
|
||||
{
|
||||
SnapCursorDataIntern *sdata_intern = (SnapCursorDataIntern *)ED_view3d_cursor_snap_data_get();
|
||||
if (!sdata_intern) {
|
||||
return;
|
||||
}
|
||||
if (prev_point) {
|
||||
copy_v3_v3(sdata_intern->prevpoint_stack, prev_point);
|
||||
sdata_intern->snap_data.prevpoint = sdata_intern->prevpoint_stack;
|
||||
}
|
||||
else {
|
||||
sdata_intern->snap_data.prevpoint = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void ED_view3d_cursor_snap_update(const bContext *C,
|
||||
const int x,
|
||||
const int y,
|
||||
|
@ -934,21 +948,6 @@ void ED_view3d_cursor_snap_update(const bContext *C,
|
|||
}
|
||||
}
|
||||
|
||||
void ED_view3d_cursor_snap_prevpoint_set(const float prev_point[3])
|
||||
{
|
||||
SnapCursorDataIntern *sdata_intern = (SnapCursorDataIntern *)ED_view3d_cursor_snap_data_get();
|
||||
if (!sdata_intern) {
|
||||
return;
|
||||
}
|
||||
if (prev_point) {
|
||||
copy_v3_v3(sdata_intern->prevpoint_stack, prev_point);
|
||||
sdata_intern->snap_data.prevpoint = sdata_intern->prevpoint_stack;
|
||||
}
|
||||
else {
|
||||
sdata_intern->snap_data.prevpoint = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(struct Scene *scene)
|
||||
{
|
||||
SnapCursorDataIntern *sdata_intern = (SnapCursorDataIntern *)ED_view3d_cursor_snap_data_get();
|
||||
|
|
Loading…
Reference in New Issue