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:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2014-10-07 19:39:17 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2014-10-07 19:39:17 +0400
commit189c2e9277d4abd3b750a5a60ef42549dcfe359d (patch)
tree1430a845f4aab56b9133c3d8c6ffac09ee6dd92a /source/blender/editors/transform
parent771bad9c6abaad4b742935e5d55067f281287650 (diff)
parent1519b6a23e0341e25bf5a5c714f9f3d119ab8781 (diff)
Merge branch 'master' into soc-2014-viewport_contextsoc-2014-viewport_context
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c8
-rw-r--r--source/blender/editors/transform/transform.h1
-rw-r--r--source/blender/editors/transform/transform_conversions.c16
-rw-r--r--source/blender/editors/transform/transform_manipulator.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c12
5 files changed, 22 insertions, 17 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 008022a9859..24499688835 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -58,6 +58,7 @@
#include "BKE_particle.h"
#include "BKE_unit.h"
#include "BKE_mask.h"
+#include "BKE_report.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
@@ -270,7 +271,8 @@ void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy)
r_vec[0] = dx;
r_vec[1] = dy;
}
- else { const float mval_f[2] = {(float)dx, (float)dy};
+ else {
+ const float mval_f[2] = {(float)dx, (float)dy};
ED_view3d_win_to_delta(t->ar, mval_f, r_vec, t->zfac);
}
}
@@ -2053,7 +2055,6 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
initTransInfo(C, t, op, event);
if (t->spacetype == SPACE_VIEW3D) {
- //calc_manipulator_stats(curarea);
initTransformOrientation(C, t);
t->draw_handle_apply = ED_region_draw_cb_activate(t->ar->type, drawTransformApply, t, REGION_DRAW_PRE_VIEW);
@@ -4066,6 +4067,9 @@ static void initTranslation(TransInfo *t)
{
if (t->spacetype == SPACE_ACTION) {
/* this space uses time translate */
+ BKE_report(t->reports, RPT_ERROR,
+ "Use 'Time_Translate' transform mode instead of 'Translation' mode "
+ "for translating keyframes in Dope Sheet Editor");
t->state = TRANS_CANCEL;
}
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 012f9185d8b..67d55639528 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -537,7 +537,6 @@ void restoreBones(TransInfo *t);
/*********************** exported from transform_manipulator.c ********** */
bool gimbal_axis(struct Object *ob, float gmat[3][3]); /* return 0 when no gimbal for selection */
-int calc_manipulator_stats(const struct bContext *C);
/*********************** TransData Creation and General Handling *********** */
void createTransData(struct bContext *C, TransInfo *t);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index aa215613841..47adbb6d16d 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1711,7 +1711,9 @@ static void createTransLatticeVerts(TransInfo *t)
if (bp->f1 & SELECT) {
td->flag = TD_SELECTED;
}
- else td->flag = 0;
+ else {
+ td->flag = 0;
+ }
copy_m3_m3(td->smtx, smtx);
copy_m3_m3(td->mtx, mtx);
@@ -3068,10 +3070,10 @@ static void createTransNlaData(bContext *C, TransInfo *t)
/* ********************* ACTION EDITOR ****************** */
-static int gpf_cmp_frame(void *thunk, void *a, void *b)
+static int gpf_cmp_frame(void *thunk, const void *a, const void *b)
{
- bGPDframe *frame_a = a;
- bGPDframe *frame_b = b;
+ const bGPDframe *frame_a = a;
+ const bGPDframe *frame_b = b;
if (frame_a->framenum < frame_b->framenum) return -1;
if (frame_a->framenum > frame_b->framenum) return 1;
@@ -3085,10 +3087,10 @@ static int gpf_cmp_frame(void *thunk, void *a, void *b)
return 0;
}
-static int masklay_shape_cmp_frame(void *thunk, void *a, void *b)
+static int masklay_shape_cmp_frame(void *thunk, const void *a, const void *b)
{
- MaskLayerShape *frame_a = a;
- MaskLayerShape *frame_b = b;
+ const MaskLayerShape *frame_a = a;
+ const MaskLayerShape *frame_b = b;
if (frame_a->frame < frame_b->frame) return -1;
if (frame_a->frame > frame_b->frame) return 1;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 2161e52d7b2..37a6d50e149 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -262,7 +262,7 @@ bool gimbal_axis(Object *ob, float gmat[3][3])
/* centroid, boundbox, of selection */
/* returns total items selected */
-int calc_manipulator_stats(const bContext *C)
+static int calc_manipulator_stats(const bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
ARegion *ar = CTX_wm_region(C);
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index abef2c9fc30..af563f71376 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -872,9 +872,9 @@ static float RotationBetween(TransInfo *t, const float p1[3], const float p2[3])
cross_v3_v3v3(tmp, start, end);
if (dot_v3v3(tmp, axis) < 0.0f)
- angle = -acos(dot_v3v3(start, end));
+ angle = -acosf(dot_v3v3(start, end));
else
- angle = acos(dot_v3v3(start, end));
+ angle = acosf(dot_v3v3(start, end));
}
else {
float mtx[3][3];
@@ -884,7 +884,7 @@ static float RotationBetween(TransInfo *t, const float p1[3], const float p2[3])
mul_m3_v3(mtx, end);
mul_m3_v3(mtx, start);
- angle = atan2(start[1], start[0]) - atan2(end[1], end[0]);
+ angle = atan2f(start[1], start[0]) - atan2f(end[1], end[0]);
}
if (angle > (float)M_PI) {
@@ -2036,10 +2036,10 @@ bool snapObjectsRayEx(Scene *scene, Base *base_act, View3D *v3d, ARegion *ar, Ob
/******************** PEELING *********************************/
-static int cmpPeel(void *arg1, void *arg2)
+static int cmpPeel(const void *arg1, const void *arg2)
{
- DepthPeel *p1 = arg1;
- DepthPeel *p2 = arg2;
+ const DepthPeel *p1 = arg1;
+ const DepthPeel *p2 = arg2;
int val = 0;
if (p1->depth < p2->depth) {