[Bf-blender-cvs] [61b69af84fe] greasepencil-object: Remove unused Layer Onion Skinning fields
Antonio Vazquez
noreply at git.blender.org
Thu Jun 7 16:40:12 CEST 2018
Commit: 61b69af84febd126f4219a7f18c5116b3c3b741d
Author: Antonio Vazquez
Date: Thu Jun 7 16:39:59 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB61b69af84febd126f4219a7f18c5116b3c3b741d
Remove unused Layer Onion Skinning fields
These fileds are not used because the Layer override was removed in a previous commit.
===================================================================
M source/blender/blenkernel/intern/gpencil.c
M source/blender/makesdna/DNA_gpencil_types.h
M source/blender/makesrna/intern/rna_gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 5c63eb1e6d1..a390e64531b 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -418,14 +418,6 @@ bGPDlayer *BKE_gpencil_layer_addnew(bGPdata *gpd, const char *name, bool setacti
/* onion-skinning settings */
gpl->onion_flag |= GP_LAYER_ONIONSKIN;
- gpl->onion_flag |= (GP_LAYER_GHOST_PREVCOL | GP_LAYER_GHOST_NEXTCOL);
- gpl->onion_flag |= GP_LAYER_ONION_FADE;
- gpl->onion_factor = 0.5f;
- gpl->gstep = 1;
- gpl->gstep_next = 1;
-
- ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.145098f, 0.419608f, 0.137255f); /* green */
- ARRAY_SET_ITEMS(gpl->gcolor_next, 0.125490f, 0.082353f, 0.529412f); /* blue */
/* auto-name */
BLI_strncpy(gpl->info, name, sizeof(gpl->info));
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 5999b112579..2372d4f2e70 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -244,28 +244,21 @@ typedef struct bGPDlayer {
short flag; /* settings for layer */
short thickness; /* current thickness to apply to strokes */
- short gstep; /* Ghosts Before: max number of ghost frames to show between active frame and the one before it (0 = only the ghost itself) */
- short gstep_next; /* Ghosts After: max number of ghost frames to show after active frame and the following it (0 = only the ghost itself) */
-
- float gcolor_prev[3]; /* optional color for ghosts before the active frame */
- float gcolor_next[3]; /* optional color for ghosts after the active frame */
-
float color[4]; /* Color for strokes in layers (replaced by palettecolor). Only used for ruler (which uses GPencil internally) */
float fill[4]; /* Fill color for strokes in layers. Not used and replaced by palettecolor fill */
char info[128]; /* optional reference info about this layer (i.e. "director's comments, 12/3")
* this is used for the name of the layer too and kept unique. */
+ char pad_1[4];
struct Object *parent; /* parent object */
float inverse[4][4]; /* inverse matrix (only used if parented) */
char parsubstr[64]; /* String describing subobject info, MAX_ID_NAME-2 */
short partype;
- short onion_mode; /* onion skinning mode (eGP_OnionModes) */
+ short onion_flag; /* Per-layer onion-skinning flags (eGPDlayer_OnionFlag) */
float tintcolor[4]; /* Color used to tint layer, alpha value is used as factor */
float opacity; /* Opacity of the layer */
- int onion_flag; /* Per-layer onion-skinning flags, to overide datablock settings (eGPDlayer_OnionFlag) */
- float onion_factor; /* onion alpha factor change */
bGPDlayer_runtime runtime;
} bGPDlayer;
@@ -298,14 +291,6 @@ typedef enum eGPDlayer_Flag {
typedef enum eGPDlayer_OnionFlag {
/* do onion skinning */
GP_LAYER_ONIONSKIN = (1 << 0),
- /* use custom color for ghosts before current frame */
- GP_LAYER_GHOST_PREVCOL = (1 << 1),
- /* use custom color for ghosts after current frame */
- GP_LAYER_GHOST_NEXTCOL = (1 << 2),
- /* always show onion skins (i.e. even during renders/animation playback) */
- GP_LAYER_GHOST_ALWAYS = (1 << 3),
- /* use fade color in onion skin */
- GP_LAYER_ONION_FADE = (1 << 4),
} eGPDlayer_OnionFlag;
/* ***************************************** */
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 7c4cc9c2bc8..41dba57cc0e 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1057,51 +1057,6 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Onion Skinning", "Ghost frames on either side of frame");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
- prop = RNA_def_property(srna, "ghost_before_range", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "gstep");
- RNA_def_property_range(prop, 0, 120);
- RNA_def_property_int_default(prop, 1);
- RNA_def_property_ui_text(prop, "Frames Before",
- "Maximum number of frames to show before current frame "
- "(0 = don't show any frames before current)");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "ghost_after_range", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "gstep_next");
- RNA_def_property_range(prop, 0, 120);
- RNA_def_property_int_default(prop, 1);
- RNA_def_property_ui_text(prop, "Frames After",
- "Maximum number of frames to show after current frame "
- "(0 = don't show any frames after current)");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "use_ghost_custom_colors", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "onion_flag", GP_LAYER_GHOST_PREVCOL | GP_LAYER_GHOST_NEXTCOL);
- RNA_def_property_ui_text(prop, "Use Custom Ghost Colors", "Use custom colors for ghost frames");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "before_color", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "gcolor_prev");
- RNA_def_property_array(prop, 3);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_float_array_default(prop, onion_dft1);
- RNA_def_property_ui_text(prop, "Before Color", "Base color for ghosts before the active frame");
- RNA_def_property_update(prop, NC_SCREEN | NC_SCENE | ND_TOOLSETTINGS | ND_DATA | NC_GPENCIL, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "after_color", PROP_FLOAT, PROP_COLOR_GAMMA);
- RNA_def_property_float_sdna(prop, NULL, "gcolor_next");
- RNA_def_property_array(prop, 3);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_float_array_default(prop, onion_dft2);
- RNA_def_property_ui_text(prop, "After Color", "Base color for ghosts after the active frame");
- RNA_def_property_update(prop, NC_SCREEN | NC_SCENE | ND_TOOLSETTINGS | ND_DATA | NC_GPENCIL, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "use_ghosts_always", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "onion_flag", GP_LAYER_GHOST_ALWAYS);
- RNA_def_property_ui_text(prop, "Always Show Ghosts",
- "Ghosts are shown in renders and animation playback. Useful for special effects (e.g. motion blur)");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
prop = RNA_def_property(srna, "use_stroke_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_USE_LOCATION);
RNA_def_property_ui_text(prop, "Use Stroke Location",
@@ -1198,26 +1153,6 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Is Parented", "True when the layer parent object is set");
- /* onion modes */
- prop = RNA_def_property(srna, "onion_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "onion_mode");
- RNA_def_property_enum_items(prop, rna_enum_gpencil_onion_modes_items);
- RNA_def_property_ui_text(prop, "Mode", "Mode to display frames");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "use_onion_fade", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "onion_flag", GP_LAYER_ONION_FADE);
- RNA_def_property_ui_text(prop, "Fade",
- "Display onion keyframes with a fade in color transparency");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
- prop = RNA_def_property(srna, "onion_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "onion_factor");
- RNA_def_property_float_default(prop, 0.5f);
- RNA_def_property_range(prop, 0.0, 1.0f);
- RNA_def_property_ui_text(prop, "Onion Opacity", "Change fade opacity of displayed onion frames");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
/* Layers API */
func = RNA_def_function(srna, "clear", "rna_GPencil_layer_clear");
RNA_def_function_ui_description(func, "Remove all the grease pencil layer data");
More information about the Bf-blender-cvs
mailing list