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:
authorCampbell Barton <ideasman42@gmail.com>2014-06-26 10:09:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-26 10:09:59 +0400
commit1b76c638ad4a438028c3b76a67f22b7c0fec1ea6 (patch)
tree3221921e12b44386f09bdcbcf2622275a8703f5f /source/blender/editors
parenta4d9c8f579a4ba2b66f2f5b8b7bbd6be9c1d4cda (diff)
Code cleanup: remove MAT3/4_UNITY defines, just call unit_m3/4
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/curve/editcurve_add.c5
-rw-r--r--source/blender/editors/interface/interface_draw.c4
-rw-r--r--source/blender/editors/physics/particle_edit.c9
3 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index 1cd690c29d6..8a3d4f3f4f5 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -115,7 +115,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
BPoint *bp;
Curve *cu = (Curve *)obedit->data;
float vec[3], zvec[3] = {0.0f, 0.0f, 1.0f};
- float umat[4][4] = MAT4_UNITY, viewmat[4][4] = MAT4_UNITY;
+ float umat[4][4], viewmat[4][4];
float fac;
int a, b;
const float grid = 1.0f;
@@ -123,6 +123,9 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
const int stype = (type & CU_PRIMITIVE);
const int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */
+ unit_m4(umat);
+ unit_m4(viewmat);
+
if (rv3d) {
copy_m4_m4(viewmat, rv3d->viewmat);
copy_v3_v3(zvec, rv3d->viewinv[2]);
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 47334d6f77c..cc9f8ff00a9 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -587,7 +587,7 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
int i, c;
float w, w3, h, alpha, yofs;
GLint scissor[4];
- float colors[3][3] = MAT3_UNITY;
+ float colors[3][3];
float colorsycc[3][3] = {{1, 0, 1}, {1, 1, 0}, {0, 1, 1}};
float colors_alpha[3][3], colorsycc_alpha[3][3]; /* colors pre multiplied by alpha for speed up */
float min, max;
@@ -609,6 +609,8 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
/* log scale for alpha */
alpha = scopes->wavefrm_alpha * scopes->wavefrm_alpha;
+ unit_m3(colors);
+
for (c = 0; c < 3; c++) {
for (i = 0; i < 3; i++) {
colors_alpha[c][i] = colors[c][i] * alpha;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 3c6bdf86a50..5432f059405 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -616,7 +616,10 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
ParticleSystemModifierData *psmd = NULL;
ParticleEditSettings *pset= PE_settings(data->scene);
POINT_P; KEY_K;
- float mat[4][4] = MAT4_UNITY, imat[4][4] = MAT4_UNITY;
+ float mat[4][4], imat[4][4];
+
+ unit_m4(mat);
+ unit_m4(imat);
if (edit->psys)
psmd= psys_get_modifier(data->ob, edit->psys);
@@ -1710,11 +1713,13 @@ int PE_lasso_select(bContext *C, const int mcords[][2], const short moves, bool
ParticleSystem *psys = edit->psys;
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
POINT_P; KEY_K;
- float co[3], mat[4][4] = MAT4_UNITY;
+ float co[3], mat[4][4];
int screen_co[2];
PEData data;
+ unit_m4(mat);
+
if (!PE_start_edit(edit))
return OPERATOR_CANCELLED;