diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-17 19:51:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-17 19:51:48 +0400 |
commit | 4c66e696fbcaefe40f0394fea8fc4a55bb7d6994 (patch) | |
tree | e8f60920e276ec1fec3c8014b77790a6c790deba /source/blender/editors | |
parent | 02987fd5e1fa3715d25bb7b9bd659fd509f40c57 (diff) | |
parent | b7f3887a3a8a66aeba3a16ae5d76b934af3ccc7c (diff) |
svn merge ^/trunk/blender -r44136:44189
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 30 |
3 files changed, 24 insertions, 14 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 49fa7837de6..6dda09a1451 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -1269,13 +1269,14 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene) if(ibuf) { float loc[2]; + float aspect= clip->tracking.camera.pixel_aspect; if(width != ibuf->x) mul_v2_v2fl(loc, sc->loc, (float)width / ibuf->x); else copy_v2_v2(loc, sc->loc); - BKE_tracking_stabdata_to_mat4(width, height, loc, sc->scale, sc->angle, sc->stabmat); + BKE_tracking_stabdata_to_mat4(width, height, aspect, loc, sc->scale, sc->angle, sc->stabmat); unit_m4(smat); smat[0][0]= 1.0f/width; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index e1fe3788d05..3b7992e0468 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -886,6 +886,11 @@ static int image_replace_exec(bContext *C, wmOperator *op) /* we cant do much if the str is longer then FILE_MAX :/ */ BLI_strncpy(sima->image->name, str, sizeof(sima->image->name)); + if (BLI_testextensie_array(str, imb_ext_movie)) + sima->image->source= IMA_SRC_MOVIE; + else + sima->image->source= IMA_SRC_FILE; + /* XXX unpackImage frees image buffers */ ED_preview_kill_jobs(C); diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 60da368321f..61f08a84ac7 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -473,6 +473,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiBut *but; uiLayout *row; const float dpi_fac= UI_DPI_FAC; + int is_paint = 0; RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &toolsptr); @@ -487,6 +488,8 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* mode */ if(ob) { v3d->modeselect = ob->mode; + is_paint = ELEM5(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, + OB_MODE_TEXTURE_PAINT, OB_MODE_PARTICLE_EDIT); } else { v3d->modeselect = OB_MODE_OBJECT; @@ -499,20 +502,21 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* Draw type */ uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - if (obedit==NULL && ((ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)))) { - /* Manipulators aren't used in weight paint mode */ - - PointerRNA meshptr; + if (obedit==NULL && is_paint) { + /* Manipulators aren't used in paint modes */ + if (!ELEM(ob->mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) { + /* masks aren't used for sculpt and particle painting */ + PointerRNA meshptr; - RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr); - if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) { - uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - } - else { - - row= uiLayoutRow(layout, 1); - uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr); + if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) { + uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } + else { + row= uiLayoutRow(layout, 1); + uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } } } else { const char *str_menu; |