121
123
void BIF_clearTransformOrientation(struct bContext *C);
122
124
void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
123
125
void BIF_removeTransformOrientationIndex(struct bContext *C, int index);
124
void BIF_createTransformOrientation(struct bContext *C, struct ReportList *reports, char *name, int use, int overwrite);
126
void BIF_createTransformOrientation(struct bContext *C, struct ReportList *reports, char *name, int use_view,
127
int use, int overwrite);
125
128
void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
126
129
void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
128
void ED_getTransformOrientationMatrix(const struct bContext *C, float orientation_mat[3][3], int activeOnly);
131
void ED_getTransformOrientationMatrix(const struct bContext *C, float orientation_mat[3][3], const bool activeOnly);
130
struct EnumPropertyItem *BIF_enumTransformOrientation(struct bContext *C);
131
const char *BIF_menustringTransformOrientation(const struct bContext *C, const char *title); /* the returned value was allocated and needs to be freed after use */
132
133
int BIF_countTransformOrientation(const struct bContext *C);
134
135
void BIF_TransformSetUndo(const char *str);
136
void BIF_selectOrientation(void);
138
137
/* to be able to add operator properties to other operators */
140
139
#define P_MIRROR (1 << 0)
140
#define P_MIRROR_DUMMY (P_MIRROR | (1 << 9))
141
141
#define P_PROPORTIONAL (1 << 1)
142
142
#define P_AXIS (1 << 2)
143
143
#define P_SNAP (1 << 3)
146
146
#define P_CONSTRAINT (1 << 6)
147
147
#define P_OPTIONS (1 << 7)
148
148
#define P_CORRECT_UV (1 << 8)
149
#define P_NO_DEFAULTS (1 << 10)
150
151
void Transform_Properties(struct wmOperatorType *ot, int flags);
152
153
/* view3d manipulators */
154
int BIF_do_manipulator(struct bContext *C, struct wmEvent *event, struct wmOperator *op);
155
int BIF_do_manipulator(struct bContext *C, const struct wmEvent *event, struct wmOperator *op);
155
156
void BIF_draw_manipulator(const struct bContext *C);
178
179
#define SNAP_MIN_DISTANCE 30
180
int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
181
int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
182
int snapObjectsTransform(struct TransInfo *t, const float mval[2], int *r_dist, float r_loc[3], float r_no[3], SnapMode mode);
183
int snapObjectsContext(struct bContext *C, const float mval[2], int *r_dist, float r_loc[3], float r_no[3], SnapMode mode);
184
int snapNodesTransform(struct TransInfo *t, const int mval[2], int *r_dist, float r_loc[2], char *r_node_border, SnapMode mode);
185
int snapNodesContext(struct bContext *C, const int mval[2], int *r_dist, float r_loc[2], char *r_node_border, SnapMode mode);
180
#define TRANSFORM_DIST_MAX_RAY (FLT_MAX / 2.0f)
182
bool peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
183
bool peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
184
bool snapObjectsTransform(struct TransInfo *t, const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode);
185
bool snapObjectsContext(struct bContext *C, const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode);
186
/* taks args for all settings */
187
bool snapObjectsEx(struct Scene *scene, struct Base *base_act, struct View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode,
188
const float mval[2], float *r_dist_px,
189
float r_loc[3], float r_no[3], float *r_ray_dist, SnapMode mode);
190
bool snapObjectsRayEx(struct Scene *scene, struct Base *base_act, struct View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode,
191
struct Object **r_ob, float r_obmat[4][4],
192
const float ray_start[3], const float ray_normal[3], float *r_ray_dist,
193
const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode);
195
bool snapNodesTransform(struct TransInfo *t, const int mval[2], float *r_dist_px, float r_loc[2], char *r_node_border, SnapMode mode);
196
bool snapNodesContext(struct bContext *C, const int mval[2], float *r_dist_px, float r_loc[2], char *r_node_border, SnapMode mode);