GPv3: Onion Skinning #119792
|
@ -401,9 +401,11 @@ class LayerGroupViewItem : public AbstractTreeViewItem {
|
|||
PointerRNA group_ptr = RNA_pointer_create(
|
||||
&grease_pencil_.id, &RNA_GreasePencilLayerGroup, &group_);
|
||||
|
||||
const int icon = (group_.base.flag & GP_LAYER_TREE_NODE_HIDE_MASKS) == 0 ? ICON_CLIPUV_DEHLT :
|
||||
ICON_CLIPUV_HLT;
|
||||
uiItemR(&row, &group_ptr, "use_masks", UI_ITEM_R_ICON_ONLY, nullptr, icon);
|
||||
const int mask_icon = (group_.base.flag & GP_LAYER_TREE_NODE_HIDE_MASKS) == 0 ?
|
||||
ICON_CLIPUV_DEHLT :
|
||||
ICON_CLIPUV_HLT;
|
||||
uiItemR(&row, &group_ptr, "use_onion_skinning", UI_ITEM_R_ICON_ONLY, nullptr, ICON_NONE);
|
||||
uiItemR(&row, &group_ptr, "use_masks", UI_ITEM_R_ICON_ONLY, nullptr, mask_icon);
|
||||
uiItemR(&row, &group_ptr, "hide", UI_ITEM_R_ICON_ONLY, nullptr, ICON_NONE);
|
||||
uiItemR(&row, &group_ptr, "lock", UI_ITEM_R_ICON_ONLY, nullptr, ICON_NONE);
|
||||
}
|
||||
|
|
|
@ -543,6 +543,14 @@ static void rna_def_grease_pencil_layer_group(BlenderRNA *brna)
|
|||
"The visibility of drawings in the layers in this group is affected by "
|
||||
"the layers in the masks lists");
|
||||
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_grease_pencil_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_onion_skinning", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_ui_icon(prop, ICON_ONIONSKIN_OFF, 1);
|
||||
RNA_def_property_boolean_negative_sdna(
|
||||
prop, "GreasePencilLayerTreeNode", "flag", GP_LAYER_TREE_NODE_HIDE_ONION_SKINNING);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Onion Skinning", "Display onion skins before and after the current frame");
|
||||
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_grease_pencil_update");
|
||||
}
|
||||
|
||||
static void rna_def_grease_pencil_onion_skinning(StructRNA *srna)
|
||||
|
|
Loading…
Reference in New Issue