diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-06-24 14:29:26 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-06-24 14:29:26 +0400 |
commit | 1f7ae143a29b090ed97cdd7eb47a9c2dbd7f72a2 (patch) | |
tree | fff560080a8bbf37ee087653df1b8a30173537b1 /source/blender/editors/gpencil | |
parent | d38ba6b5d25ca42f76b6d1b746217a565f26228f (diff) | |
parent | 74c9c24d273863319a55c18234e03b7d27a43a87 (diff) |
Merged changes in the trunk up to revision 48227.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_file/filelist.c
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_buttons.c | 36 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 6 |
3 files changed, 23 insertions, 21 deletions
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 4c125ebe013..dabc0ad1081 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -113,14 +113,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* get layout-row + UI-block for header */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, 0); + row = uiLayoutRow(box, FALSE); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND); block = uiLayoutGetBlock(row); /* err... */ uiBlockSetEmboss(block, UI_EMBOSSN); /* left-align ............................... */ - sub = uiLayoutRow(row, 0); + sub = uiLayoutRow(row, FALSE); /* active */ block = uiLayoutGetBlock(sub); @@ -151,7 +151,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* delete button (only if hidden but not locked!) */ if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED)) { /* right-align ............................... */ - sub = uiLayoutRow(row, 1); + sub = uiLayoutRow(row, TRUE); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); block = uiLayoutGetBlock(sub); /* XXX... err... */ @@ -179,7 +179,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* delete 'button' */ uiBlockSetEmboss(block, UI_EMBOSSN); /* right-align ............................... */ - sub = uiLayoutRow(row, 1); + sub = uiLayoutRow(row, TRUE); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); block = uiLayoutGetBlock(sub); /* XXX... err... */ @@ -190,14 +190,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* new backdrop ----------------------------------- */ box = uiLayoutBox(layout); - split = uiLayoutSplit(box, 0.5f, 0); + split = uiLayoutSplit(box, 0.5f, FALSE); /* draw settings ---------------------------------- */ /* left column ..................... */ - col = uiLayoutColumn(split, 0); + col = uiLayoutColumn(split, FALSE); /* color */ - sub = uiLayoutColumn(col, 1); + sub = uiLayoutColumn(col, TRUE); uiItemR(sub, &ptr, "color", 0, "", ICON_NONE); uiItemR(sub, &ptr, "alpha", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -210,10 +210,10 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons } /* right column ................... */ - col = uiLayoutColumn(split, 0); + col = uiLayoutColumn(split, FALSE); /* onion-skinning */ - sub = uiLayoutColumn(col, 1); + sub = uiLayoutColumn(col, TRUE); uiItemR(sub, &ptr, "use_onion_skinning", 0, NULL, ICON_NONE); uiItemR(sub, &ptr, "ghost_range_max", 0, IFACE_("Frames"), ICON_NONE); @@ -236,14 +236,14 @@ static void draw_gpencil_space_specials(const bContext *C, uiLayout *layout) uiLayout *col, *row; SpaceClip *sc = CTX_wm_space_clip(C); - col = uiLayoutColumn(layout, 0); + col = uiLayoutColumn(layout, FALSE); if (sc) { bScreen *screen = CTX_wm_screen(C); PointerRNA sc_ptr; RNA_pointer_create(&screen->id, &RNA_SpaceClipEditor, sc, &sc_ptr); - row = uiLayoutRow(col, 1); + row = uiLayoutRow(col, TRUE); uiItemR(row, &sc_ptr, "grease_pencil_source", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } } @@ -262,7 +262,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin RNA_id_pointer_create((ID *)gpd, &gpd_ptr); /* draw gpd settings first ------------------------------------- */ - col = uiLayoutColumn(layout, 0); + col = uiLayoutColumn(layout, FALSE); /* current Grease Pencil block */ /* TODO: show some info about who owns this? */ @@ -270,7 +270,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin /* add new layer button - can be used even when no data, since it can add a new block too */ uiItemO(col, IFACE_("New Layer"), ICON_NONE, "GPENCIL_OT_layer_add"); - row = uiLayoutRow(col, 1); + row = uiLayoutRow(col, TRUE); uiItemO(row, IFACE_("Delete Frame"), ICON_NONE, "GPENCIL_OT_active_frame_delete"); uiItemO(row, IFACE_("Convert"), ICON_NONE, "GPENCIL_OT_convert"); @@ -280,12 +280,12 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin /* draw each layer --------------------------------------------- */ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { - col = uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, TRUE); gp_drawui_layer(col, gpd, gpl, is_v3d); } /* draw gpd drawing settings first ------------------------------------- */ - col = uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, TRUE); /* label */ uiItemL(col, IFACE_("Drawing Settings:"), ICON_NONE); @@ -298,17 +298,17 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin } /* drawing space options */ - row = uiLayoutRow(col, 1); + row = uiLayoutRow(col, TRUE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE); if (sc == NULL) { - row = uiLayoutRow(col, 1); + row = uiLayoutRow(col, TRUE); uiLayoutSetActive(row, v3d_stroke_opts); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "SURFACE", NULL, ICON_NONE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "STROKE", NULL, ICON_NONE); - row = uiLayoutRow(col, 0); + row = uiLayoutRow(col, FALSE); uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON); uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE); } diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index ed530bea4bd..3f53f0403d7 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -146,7 +146,7 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr) case SPACE_CLIP: /* Nodes Editor */ { SpaceClip *sc = (SpaceClip *)CTX_wm_space_data(C); - MovieClip *clip = ED_space_clip(sc); + MovieClip *clip = ED_space_clip_get_clip(sc); if (clip) { if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) { diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 6d90824668e..12b002ef612 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -56,6 +56,7 @@ #include "ED_gpencil.h" #include "ED_screen.h" #include "ED_view3d.h" +#include "ED_clip.h" #include "BIF_gl.h" #include "BIF_glutil.h" @@ -1032,8 +1033,9 @@ static int gp_session_initdata(bContext *C, tGPsdata *p) p->custom_color[3] = 0.9f; if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) { - int framenr = sc->user.framenr; - MovieTrackingTrack *track = BKE_tracking_track_get_active(&sc->clip->tracking); + MovieClip *clip = ED_space_clip_get_clip(sc); + int framenr = ED_space_clip_get_clip_frame_number(sc); + MovieTrackingTrack *track = BKE_tracking_track_get_active(&clip->tracking); MovieTrackingMarker *marker = BKE_tracking_marker_get_exact(track, framenr); p->imat[3][0] -= marker->pos[0]; |