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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-10 19:26:50 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-10 19:26:50 +0400
commit39e591d3d04015b84fe5f12e7ef5af6507df92af (patch)
tree9e529ea6658e526a56e108866aab9578209b6de8 /source/blender/editors/gpencil/gpencil_buttons.c
parent5534701e5d7659d8fdd73ef64375116bb07463e8 (diff)
Support for per-track Grease Pencil datablocks for motion tracking
Originally was needed to reach easy way of defining masks used for tracking (do eliminate textures which doesn't belong to feature when tracking. Implemented as alternative to GP datablock for clip and added switch between per-clip and per-track GP datablocks -- internal limitations of GP doesn't allow to display all GP datablocks easily. So either you see.edit GP associated with clip or with track. GP strokes associated with track are relative to track's position, following tracks during tracking and could be shared between several tracks. Masking code presents in libmv and there's rasterizer of GP datablocks for masks in blender's tracking module, but they still need to be glued together. Some documentation cound be found at this page: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker#Grease_Pencil
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_buttons.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_buttons.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c
index 3a7e806c2ed..b59f3756819 100644
--- a/source/blender/editors/gpencil/gpencil_buttons.c
+++ b/source/blender/editors/gpencil/gpencil_buttons.c
@@ -40,6 +40,7 @@
#include "DNA_gpencil_types.h"
#include "DNA_screen_types.h"
+#include "DNA_space_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -236,6 +237,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
PointerRNA gpd_ptr;
bGPDlayer *gpl;
uiLayout *col, *row;
+ SpaceClip *sc= CTX_wm_space_clip(C);
short v3d_stroke_opts = STROKE_OPTS_NORMAL;
const short is_v3d = CTX_wm_view3d(C) != NULL;
@@ -244,6 +246,16 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
/* draw gpd settings first ------------------------------------- */
col = uiLayoutColumn(layout, 0);
+
+ 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);
+ uiItemR(row, &sc_ptr, "grease_pencil_source", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ }
+
/* current Grease Pencil block */
/* TODO: show some info about who owns this? */
uiTemplateID(col, C, ctx_ptr, "grease_pencil", "GPENCIL_OT_data_add", NULL, "GPENCIL_OT_data_unlink");
@@ -281,14 +293,17 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin
row = uiLayoutRow(col, 1);
uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE);
uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE);
- row = uiLayoutRow(col, 1);
- 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);
- uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON);
- uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE);
+ if (sc == NULL) {
+ row = uiLayoutRow(col, 1);
+ 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);
+ uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON);
+ uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE);
+ }
}