Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r--source/blender/editors/transform/transform.h58
1 files changed, 37 insertions, 21 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index ee767fada58..db78632e76a 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -30,7 +30,7 @@
#ifndef TRANSFORM_H
#define TRANSFORM_H
-#include "BIF_transform.h"
+#include "ED_transform.h"
/* ************************** Types ***************************** */
@@ -71,7 +71,7 @@ typedef struct NumInput {
/*
The ctrl value has different meaning:
0 : No value has been typed
-
+
otherwise, |value| - 1 is where the cursor is located after the period
Positive : number is positive
Negative : number is negative
@@ -100,7 +100,7 @@ typedef struct TransCon {
float mtx[3][3]; /* Matrix of the Constraint space */
float imtx[3][3]; /* Inverse Matrix of the Constraint space */
float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with some axis == 0) */
- float center[3]; /* transformation center to define where to draw the view widget
+ float center[3]; /* transformation center to define where to draw the view widget
ALWAYS in global space. Unlike the transformation center */
short imval[2]; /* initial mouse value for visual calculation */
/* the one in TransInfo is not garanty to stay the same (Rotates change it) */
@@ -138,7 +138,7 @@ typedef struct TransDataExtension {
float iquat[4]; /* Initial rotation quaternion */
float *size; /* Size of the data to transform (Faculative) */
float isize[3]; /* Initial size */
- float obmat[4][4]; /* Object matrix */
+ float obmat[4][4]; /* Object matrix */
} TransDataExtension;
typedef struct TransData2D {
@@ -158,9 +158,26 @@ typedef struct TransDataSeq {
int flag; /* a copy of seq->flag that may be modified for nested strips */
short start_offset; /* use this so we can have transform data at the strips start, but apply correctly to the start frame */
short sel_flag; /* one of SELECT, SEQ_LEFTSEL and SEQ_RIGHTSEL */
-
+
} TransDataSeq;
+/* for NLA transform (stored in td->extra pointer) */
+typedef struct TransDataNla {
+ ID *id; /* ID-block NLA-data is attached to */
+
+ struct NlaTrack *oldTrack; /* Original NLA-Track that the strip belongs to */
+ struct NlaTrack *nlt; /* Current NLA-Track that the strip belongs to */
+
+ struct NlaStrip *strip; /* NLA-strip this data represents */
+
+ /* dummy values for transform to write in - must have 3 elements... */
+ float h1[3]; /* start handle */
+ float h2[3]; /* end handle */
+
+ int trackIndex; /* index of track that strip is currently in */
+ int handle; /* handle-index: 0 for dummy entry, -1 for start, 1 for end, 2 for both ends */
+} TransDataNla;
+
typedef struct TransData {
float dist; /* Distance needed to affect element (for Proportionnal Editing) */
float rdist; /* Distance to the nearest element (for Proportionnal Editing) */
@@ -185,9 +202,9 @@ typedef struct TransData {
typedef struct MouseInput {
void (*apply)(struct TransInfo *, struct MouseInput *, short [2], float [3]);
-
+
short imval[2]; /* initial mouse position */
- char precision;
+ char precision;
short precision_mval[2]; /* mouse position when precision key was pressed */
int center[2];
float factor;
@@ -224,7 +241,7 @@ typedef struct TransInfo {
short idx_max; /* maximum index on the input vector */
float snap[3]; /* Snapping Gears */
char frame_side; /* Mouse side of the cfra, 'L', 'R' or 'B' */
-
+
float viewmat[4][4]; /* copy from G.vd, prevents feedback, */
float viewinv[4][4]; /* and to make sure we don't have to */
float persmat[4][4]; /* access G.vd from other space types */
@@ -233,16 +250,16 @@ typedef struct TransInfo {
short around;
char spacetype; /* spacetype where transforming is */
char helpline; /* helpline modes (not to be confused with hotline) */
-
+
float vec[3]; /* translation, to show for widget */
float mat[3][3]; /* rot/rescale, to show for widget */
-
+
char *undostr; /* if set, uses this string for undo */
float spacemtx[3][3]; /* orientation matrix of the current space */
char spacename[32]; /* name of the current space */
-
+
struct Object *poseobj; /* if t->flag & T_POSE, this denotes pose object */
-
+
void *customData; /* Per Transform custom data */
/*************** NEW STUFF *********************/
@@ -257,6 +274,7 @@ typedef struct TransInfo {
struct ScrArea *sa;
struct ARegion *ar;
struct Scene *scene;
+ struct ToolSettings *settings;
struct wmTimer *animtimer;
short mval[2]; /* current mouse position */
struct Object *obedit;
@@ -287,7 +305,7 @@ typedef struct TransInfo {
#define T_POSE (1 << 2)
#define T_TEXTURE (1 << 3)
#define T_CAMERA (1 << 4)
- // trans on points, having no rotation/scale
+ // trans on points, having no rotation/scale
#define T_POINTS (1 << 6)
// for manipulator exceptions, like scaling using center point, drawing help lines
#define T_USES_MANIPULATOR (1 << 7)
@@ -303,7 +321,7 @@ typedef struct TransInfo {
#define T_V3D_ALIGN (1 << 14)
/* for 2d views like uv or ipo */
-#define T_2D_EDIT (1 << 15)
+#define T_2D_EDIT (1 << 15)
#define T_CLIP_UV (1 << 16)
#define T_FREE_CUSTOMDATA (1 << 17)
@@ -480,8 +498,7 @@ void flushTransNodes(TransInfo *t);
void flushTransSeq(TransInfo *t);
/*********************** exported from transform_manipulator.c ********** */
-void draw_manipulator_ext(struct ScrArea *sa, int type, char axis, int col, float vec[3], float mat[][3]);
-int calc_manipulator_stats(struct ScrArea *sa);
+int calc_manipulator_stats(const struct bContext *C);
float get_drawsize(struct ARegion *ar, float *co);
/*********************** TransData Creation and General Handling *********** */
@@ -492,8 +509,9 @@ void special_aftertrans_update(TransInfo *t);
void transform_autoik_update(TransInfo *t, short mode);
+int count_set_pose_transflags(int *out_mode, short around, struct Object *ob);
+
/* auto-keying stuff used by special_aftertrans_update */
-short autokeyframe_cfra_can_key(struct Scene *scene, struct Object *ob);
void autokeyframe_ob_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode);
void autokeyframe_pose_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode, short targetless_ik);
@@ -592,8 +610,6 @@ void calculatePropRatio(TransInfo *t);
void getViewVector(TransInfo *t, float coord[3], float vec[3]);
-TransInfo * BIF_GetTransInfo(void);
-
/*********************** NumInput ********************************/
void initNumInput(NumInput *n);
@@ -630,7 +646,7 @@ int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3])
int addMatrixSpace(struct bContext *C, float mat[3][3], char name[]);
int addObjectSpace(struct bContext *C, struct Object *ob);
-void applyTransformOrientation(struct bContext *C, TransInfo *t);
+void applyTransformOrientation(const struct bContext *C, TransInfo *t);
#define ORIENTATION_NONE 0
@@ -639,7 +655,7 @@ void applyTransformOrientation(struct bContext *C, TransInfo *t);
#define ORIENTATION_EDGE 3
#define ORIENTATION_FACE 4
-int getTransformOrientation(struct bContext *C, float normal[3], float plane[3], int activeOnly);
+int getTransformOrientation(const struct bContext *C, float normal[3], float plane[3], int activeOnly);
int createSpaceNormal(float mat[3][3], float normal[3]);
int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]);