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:
authorMartin Poirier <theeth@yahoo.com>2010-02-04 00:01:41 +0300
committerMartin Poirier <theeth@yahoo.com>2010-02-04 00:01:41 +0300
commit9916e0193c36c7c107f9e5763611235185a8b52c (patch)
treec22d3854af020338f187032032f12392d81d4f5e /source/blender/editors/transform/transform.h
parent845136ea133b1b5388b65bcc54aa5add50ec5a90 (diff)
New Transform 3D view recalculate scheme.
Only recalculate changes when absolutely necessary (mouse move triggers a soft recalc that will only happen before the next redraw other events trigger hard recalcs). The problem was that mouse moves are reported as lots of events (with small dx,dy) between each redraw which would trigger often heavy recalculations every time while only the last one was really important (the one before the redraw). This makes snap project (retopo) much more manageable but induces a very small lag equal to one refresh cycle. Confirming transform does a hard refresh, so the final result is always consistent with mouse position.
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r--source/blender/editors/transform/transform.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 231a01b86d7..6885e87c6a3 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -325,6 +325,7 @@ typedef struct TransInfo {
struct wmTimer *animtimer;
short mval[2]; /* current mouse position */
struct Object *obedit;
+ void *draw_handle_apply;
void *draw_handle_view;
void *draw_handle_pixel;
void *draw_handle_cursor;
@@ -349,6 +350,12 @@ typedef struct TransInfo {
#define TRANS_CONFIRM 2
#define TRANS_CANCEL 3
+/* transinfo->redraw */
+#define TREDRAW_NOTHING 0
+#define TREDRAW_HARD 1
+#define TREDRAW_SOFT 2
+
+
/* transinfo->flag */
#define T_OBJECT (1 << 0)
#define T_EDIT (1 << 1)
@@ -440,7 +447,7 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot);
int initTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op, struct wmEvent *event, int mode);
void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op);
int transformEvent(TransInfo *t, struct wmEvent *event);
-void transformApply(struct bContext *C, TransInfo *t);
+void transformApply(const struct bContext *C, TransInfo *t);
int transformEnd(struct bContext *C, TransInfo *t);
void setTransformViewMatrices(TransInfo *t);