Cleanup: remove unused member and rearrange function
This commit is contained in:
@@ -267,7 +267,6 @@ typedef struct V3DSnapCursorData {
|
|||||||
short snap_elem;
|
short snap_elem;
|
||||||
float loc[3];
|
float loc[3];
|
||||||
float nor[3];
|
float nor[3];
|
||||||
float face_nor[3];
|
|
||||||
float obmat[4][4];
|
float obmat[4][4];
|
||||||
int elem_index[3];
|
int elem_index[3];
|
||||||
float plane_omat[3][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_activate_plane(void);
|
||||||
void ED_view3d_cursor_snap_deactivate_point(void);
|
void ED_view3d_cursor_snap_deactivate_point(void);
|
||||||
void ED_view3d_cursor_snap_deactivate_plane(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,
|
void ED_view3d_cursor_snap_update(const struct bContext *C,
|
||||||
const int x,
|
const int x,
|
||||||
const int y,
|
const int y,
|
||||||
V3DSnapCursorData *snap_data);
|
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);
|
struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(struct Scene *scene);
|
||||||
void ED_view3d_cursor_snap_draw_util(struct RegionView3D *rv3d,
|
void ED_view3d_cursor_snap_draw_util(struct RegionView3D *rv3d,
|
||||||
const float loc_prev[3],
|
const float loc_prev[3],
|
||||||
|
@@ -698,7 +698,6 @@ static void v3d_cursor_snap_update(const bContext *C,
|
|||||||
snap_data->snap_elem = snap_elem;
|
snap_data->snap_elem = snap_elem;
|
||||||
copy_v3_v3(snap_data->loc, co);
|
copy_v3_v3(snap_data->loc, co);
|
||||||
copy_v3_v3(snap_data->nor, no);
|
copy_v3_v3(snap_data->nor, no);
|
||||||
copy_v3_v3(snap_data->face_nor, face_nor);
|
|
||||||
copy_m4_m4(snap_data->obmat, obmat);
|
copy_m4_m4(snap_data->obmat, obmat);
|
||||||
copy_v3_v3_int(snap_data->elem_index, snap_elem_index);
|
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);
|
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,
|
void ED_view3d_cursor_snap_update(const bContext *C,
|
||||||
const int x,
|
const int x,
|
||||||
const int y,
|
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)
|
struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(struct Scene *scene)
|
||||||
{
|
{
|
||||||
SnapCursorDataIntern *sdata_intern = (SnapCursorDataIntern *)ED_view3d_cursor_snap_data_get();
|
SnapCursorDataIntern *sdata_intern = (SnapCursorDataIntern *)ED_view3d_cursor_snap_data_get();
|
||||||
|
Reference in New Issue
Block a user