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:
-rw-r--r--release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py7
-rw-r--r--source/blender/blenkernel/intern/gpencil.c1
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py
index 009cb65d150..1892bea41f7 100644
--- a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py
+++ b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py
@@ -55,6 +55,13 @@ def load_handler(dummy):
space.shading.type = 'MATERIAL'
space.shading.use_scene_world = True
+ # Grease pencil object
+ scene = bpy.data.scenes[0]
+ if scene:
+ for ob in scene.objects:
+ if ob.type == 'GPENCIL':
+ gpd = ob.data
+ gpd.onion_keyframe_type = 'ALL'
def register():
bpy.app.handlers.load_factory_startup_post.append(load_handler)
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 09305434289..4f65f8a57ab 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -532,6 +532,7 @@ bGPdata *BKE_gpencil_data_addnew(Main *bmain, const char name[])
gpd->grid.lines = GP_DEFAULT_GRID_LINES; /* Number of lines */
/* Onion-skinning settings (data-block level) */
+ gpd->onion_keytype = -1; /* All by default. */
gpd->onion_flag |= (GP_ONION_GHOST_PREVCOL | GP_ONION_GHOST_NEXTCOL);
gpd->onion_flag |= GP_ONION_FADE;
gpd->onion_mode = GP_ONION_MODE_RELATIVE;
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index c8d16ab65cc..9bcf2b81557 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -106,7 +106,7 @@ static const EnumPropertyItem rna_enum_keyframe_type_items[] = {
};
static const EnumPropertyItem rna_enum_onion_keyframe_type_items[] = {
- {-1, "ALL", ICON_ACTION, "All Types", "Include all Keyframe types"},
+ {-1, "ALL", 0, "All", "Include all Keyframe types"},
{BEZT_KEYTYPE_KEYFRAME,
"KEYFRAME",
ICON_KEYTYPE_KEYFRAME_VEC,