[Bf-blender-cvs] [e0dbedb7083] greasepencil-object: GPencil: Apply Onion keyframe type to all modes

Antonioya noreply at git.blender.org
Thu May 16 13:43:49 CEST 2019


Commit: e0dbedb7083a14231b483ffcfb4af1af257acad2
Author: Antonioya
Date:   Thu May 16 13:43:40 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBe0dbedb7083a14231b483ffcfb4af1af257acad2

GPencil: Apply Onion keyframe type to all modes

===================================================================

M	release/scripts/startup/bl_ui/properties_data_gpencil.py
M	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M	source/blender/makesrna/intern/rna_gpencil.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 06a5bcbd44a..af6472e93da 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -258,6 +258,7 @@ class DATA_PT_gpencil_onion_skinning(DataButtonsPanel, Panel):
         col = layout.column()
         col.prop(gpd, "onion_mode")
         col.prop(gpd, "onion_factor", text="Opacity", slider=True)
+        col.prop(gpd, "onion_keyframe_type")
 
         if gpd.onion_mode == 'ABSOLUTE':
             col = layout.column(align=True)
@@ -267,7 +268,6 @@ class DATA_PT_gpencil_onion_skinning(DataButtonsPanel, Panel):
             col = layout.column(align=True)
             col.prop(gpd, "ghost_before_range", text="Keyframes Before")
             col.prop(gpd, "ghost_after_range", text="Keyframes After")
-            col.prop(gpd, "onion_keyframe_type")
  
 
 class DATA_PT_gpencil_onion_skinning_custom_colors(DataButtonsPanel, Panel):
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 671461750c8..f510b8964fc 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1208,10 +1208,8 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache,
       continue;
     }
     /* verify keyframe type */
-    if ((mode == GP_ONION_MODE_RELATIVE) && (onion_keytype > -1)) {
-      if (gf->key_type != onion_keytype) {
-        continue;
-      }
+    if ((onion_keytype > -1) && (gf->key_type != onion_keytype)) {
+      continue;
     }
     /* absolute range */
     if (mode == GP_ONION_MODE_ABSOLUTE) {
@@ -1270,10 +1268,8 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache,
       continue;
     }
     /* verify keyframe type */
-    if ((mode == GP_ONION_MODE_RELATIVE) && (onion_keytype > -1)) {
-      if (gf->key_type != onion_keytype) {
-        continue;
-      }
+    if ((onion_keytype > -1) && (gf->key_type != onion_keytype)) {
+      continue;
     }
     /* absolute range */
     if (mode == GP_ONION_MODE_ABSOLUTE) {
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 7823f1aa96e..8d3bfdde995 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1830,7 +1830,7 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
   RNA_def_property_enum_sdna(prop, NULL, "onion_keytype");
   RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
   RNA_def_property_enum_items(prop, rna_enum_onion_keyframe_type_items);
-  RNA_def_property_ui_text(prop, "Type", "Type of keyframe (for filtering)");
+  RNA_def_property_ui_text(prop, "Filter By Type", "Type of keyframe (for filtering)");
   RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
 
   prop = RNA_def_property(srna, "use_onion_fade", PROP_BOOLEAN, PROP_NONE);



More information about the Bf-blender-cvs mailing list