From cb5a77253a719c08986aa69a3d3f7fc8725648c7 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 20 Jun 2016 23:21:24 -0300 Subject: Text Object: Vertical Alignment A new option for Font/Text objects vertical alignment: * Top Base-Line (current mode) * Top * Center * Bottom The Top is the equivalent as the Top-Baseline with an empty line at the begin of the text. It's nice to have this option too though, since if we are driving the alignment via Python we don't want to add extra lines to the text only to accomodate to the desired vertical alignment. The Center and Bottom are as intuitive as their name suggest. When working with text boxes, the vertical alignment only work for paragraphs that are not vertically full. Many thanks to Campbell Barton (ideasman42 / @campbellbarton) for the code review, code comments, and overall suggestions and changes :) Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D2061 --- source/blender/editors/object/object_edit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 06200778ee5..01a567931b3 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -946,6 +946,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) cu1 = base->object->data; cu1->spacemode = cu->spacemode; + cu1->align_y = cu->align_y; cu1->spacing = cu->spacing; cu1->linedist = cu->linedist; cu1->shear = cu->shear; -- cgit v1.2.3 From 1abf7dd83509b61d16589c5b12b3a2b941bab79f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Jun 2016 16:17:05 +1000 Subject: Fix T48697: Brush curve-stroke snaps strangely Support Snapping screen-space 2d curves, (was applying world-space coords in screen-space). Also show snap settings in header. --- source/blender/editors/transform/transform_snap.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index d9b12bb0b18..0bb64315845 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -842,6 +842,14 @@ static void ApplySnapTranslation(TransInfo *t, float vec[3]) vec[1] = point[1] - t->tsnap.snapTarget[1]; } else { + if (t->spacetype == SPACE_VIEW3D) { + if (t->options & CTX_PAINT_CURVE) { + if (ED_view3d_project_float_global(t->ar, point, point, V3D_PROJ_TEST_NOP) != V3D_PROJ_RET_OK) { + zero_v3(point); /* no good answer here... */ + } + } + } + sub_v3_v3v3(vec, point, t->tsnap.snapTarget); } } -- cgit v1.2.3 From 6fbe6eb033699a1fd5d3f3e5159d464ab0f97284 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 22 Jun 2016 07:41:25 +1000 Subject: Fix T48703: Name inconsistency w/ area maximize/fullscreen Name operator based on default behavior. --- source/blender/editors/screen/screen_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f340f716ccb..0c0a6c93b3e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2479,7 +2479,7 @@ static void SCREEN_OT_screen_full_area(wmOperatorType *ot) { PropertyRNA *prop; - ot->name = "Toggle Fullscreen Area"; + ot->name = "Toggle Maximize Area"; ot->description = "Toggle display selected area as fullscreen/maximized"; ot->idname = "SCREEN_OT_screen_full_area"; -- cgit v1.2.3 From 493c6b622fe3fb80243dfeac29f9399ac6fc4a8c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 22 Jun 2016 14:02:51 +1000 Subject: Cleanup: style --- source/blender/editors/animation/anim_ipo_utils.c | 2 +- source/blender/editors/physics/particle_edit.c | 2 +- source/blender/editors/sculpt_paint/paint_image.c | 2 +- source/blender/editors/sculpt_paint/paint_image_proj.c | 2 +- source/blender/editors/sculpt_paint/paint_stroke.c | 2 +- source/blender/editors/transform/transform_conversions.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index ae6894ac546..fc6f4036d02 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -192,7 +192,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) #define HSV_BANDWIDTH 0.3f /* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */ -//void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out) +// void fcurve_rainbow(unsigned int cur, unsigned int tot, float *out) void getcolor_fcurve_rainbow(int cur, int tot, float out[3]) { float hsv[3], fac; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 01535eac422..8d351826b86 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1634,7 +1634,7 @@ static int select_random_exec(bContext *C, wmOperator *op) int p; int k; - const float randfac = RNA_float_get (op->ptr, "percent") / 100.0f; + const float randfac = RNA_float_get(op->ptr, "percent") / 100.0f; const int seed = WM_operator_properties_select_random_seed_increment_get(op); const bool select = (RNA_enum_get(op->ptr, "action") == SEL_SELECT); RNG *rng; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 88b3bc5d8fd..689b89e7b69 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -401,7 +401,7 @@ static void image_undo_end(void) UndoImageTile *tmp_tile = tile->next; deallocsize += allocsize * ((tile->use_float) ? sizeof(float) : sizeof(char)); MEM_freeN(tile->rect.pt); - BLI_freelinkN (lb, tile); + BLI_freelinkN(lb, tile); tile = tmp_tile; } else { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index e4c26064fec..827f83aa425 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3717,7 +3717,7 @@ static void project_paint_prepare_all_faces( } /* tfbase here should be non-null! */ - BLI_assert (mloopuv_base != NULL); + BLI_assert(mloopuv_base != NULL); if (is_face_sel && tpage) { ProjPaintFaceCoSS coSS; diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 67fbd000b64..aa17cb02fe5 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -1158,7 +1158,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_RELEASE) { copy_v2_fl2(mouse, event->mval[0], event->mval[1]); paint_stroke_line_constrain(stroke, mouse); - paint_stroke_line_end (C, op, stroke, mouse); + paint_stroke_line_end(C, op, stroke, mouse); stroke_done(C, op); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index f98fc7bf226..707c60f8701 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -7607,7 +7607,7 @@ static void createTransPaintCurveVerts(bContext *C, TransInfo *t) for (pcp = pc->points, i = 0; i < pc->tot_points; i++, pcp++) { if (PC_IS_ANY_SEL(pcp)) { - PaintCurvePointToTransData (pcp, td, td2d, tdpc); + PaintCurvePointToTransData(pcp, td, td2d, tdpc); if (pcp->bez.f2 & SELECT) { td += 3; -- cgit v1.2.3