diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-08 04:39:41 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-08 04:39:41 +0300 |
commit | cddd784e44c8ee4e7be535a4d105b8ebb65a304f (patch) | |
tree | 04c66a99d93077a3302c9ce790bff0259f9e28c8 /source/blender/blenkernel | |
parent | d08fe22bc6e7b0d11928e1a6adcabbc3d3621bbb (diff) |
Grease Pencil: Lock current frame option
It is now possible to make Grease Pencil Layers to keep displaying and editing the current sketch-frame with this option. This allows to draw a frame which contains markings made for different times (i.e. a spacing/timing chart that you can keep adding to as you scrub to different points on the timeline).
Use the clipboard/camera toggle (the one beside the visibility toggle) to enable. This should get an icon of its own at some point...
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_brush.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 40e1859ade2..cf8af56a5a9 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -55,7 +55,7 @@ int brush_clone_image_set_nr(struct Brush *brush, int nr); int brush_clone_image_delete(struct Brush *brush); /* brush curve */ -void brush_curve_preset(struct Brush *b, enum CurveMappingPreset preset); +void brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/int preset); float brush_curve_strength_clamp(struct Brush *br, float p, const float len); float brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */ diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 5023d87cef8..8a933ba5289 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -349,8 +349,10 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew) if (gpl->actframe) { gpf= gpl->actframe; - /* do not allow any changes to layer's active frame if layer is locked */ - if (gpl->flag & GP_LAYER_LOCKED) + /* do not allow any changes to layer's active frame if layer is locked from changes + * or if the layer has been set to stay on the current frame + */ + if (gpl->flag & (GP_LAYER_LOCKED|GP_LAYER_FRAMELOCK)) return gpf; /* do not allow any changes to actframe if frame has painting tag attached to it */ if (gpf->flag & GP_FRAME_PAINT) |