~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to source/blender/editors/include/ED_transform.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
/* ******************* Registration Function ********************** */
36
36
 
37
 
struct wmWindowManager;
38
 
struct wmOperatorType;
 
37
struct ARegion;
 
38
struct EnumPropertyItem;
39
39
struct ListBase;
 
40
struct Object;
 
41
struct View3D;
 
42
struct bContext;
 
43
struct uiLayout;
40
44
struct wmEvent;
41
 
struct bContext;
42
 
struct Object;
43
 
struct uiLayout;
44
 
struct EnumPropertyItem;
45
 
struct wmOperatorType;
 
45
struct wmKeyConfig;
46
46
struct wmKeyMap;
47
 
struct wmKeyConfig;
 
47
struct wmOperatorType;
 
48
struct wmWindowManager;
48
49
 
49
50
void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid);
50
51
void transform_operatortypes(void);
52
53
/* ******************** Macros & Prototypes *********************** */
53
54
 
54
55
/* MODE AND NUMINPUT FLAGS */
55
 
enum {
 
56
enum TfmMode {
56
57
        TFM_INIT = -1,
57
58
        TFM_DUMMY,
58
59
        TFM_TRANSLATION,
79
80
        TFM_TIME_EXTEND,
80
81
        TFM_TIME_DUPLICATE,
81
82
        TFM_BAKE_TIME,
82
 
        TFM_BEVEL,
 
83
        TFM_DEPRECATED,  /* was BEVEL */
83
84
        TFM_BWEIGHT,
84
85
        TFM_ALIGN,
85
86
        TFM_EDGE_SLIDE,
86
87
        TFM_VERT_SLIDE,
87
88
        TFM_SEQ_SLIDE
88
 
} TfmMode;
 
89
};
89
90
 
90
91
/* TRANSFORM CONTEXTS */
91
92
#define CTX_NONE            0
112
113
struct Scene;
113
114
struct Object;
114
115
 
115
 
int BIF_snappingSupported(struct Object *obedit);
 
116
/* UNUSED */
 
117
// int BIF_snappingSupported(struct Object *obedit);
116
118
 
117
119
struct TransformOrientation;
118
120
struct bContext;
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);
127
130
 
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);
129
132
 
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);
133
134
 
134
135
void BIF_TransformSetUndo(const char *str);
135
136
 
136
 
void BIF_selectOrientation(void);
137
 
 
138
137
/* to be able to add operator properties to other operators */
139
138
 
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)
149
150
 
150
151
void Transform_Properties(struct wmOperatorType *ot, int flags);
151
152
 
152
153
/* view3d manipulators */
153
154
 
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);
156
157
 
157
158
/* Snapping */
176
177
} SnapMode;
177
178
 
178
179
#define SNAP_MIN_DISTANCE 30
179
 
 
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)
 
181
 
 
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);
 
194
 
 
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);
186
197
 
187
198
#endif
188
199