GPencil: New support for Asset Manager #104413
|
@ -976,7 +976,6 @@ class VIEW3D_MT_editor_menus(Menu):
|
|||
layout.menu("VIEW3D_MT_edit_gpencil")
|
||||
layout.menu("VIEW3D_MT_edit_gpencil_stroke")
|
||||
layout.menu("VIEW3D_MT_edit_gpencil_point")
|
||||
layout.menu("VIEW3D_MT_edit_gpencil_asset")
|
||||
elif obj and obj.mode == 'WEIGHT_GPENCIL':
|
||||
layout.menu("VIEW3D_MT_weight_gpencil")
|
||||
if obj and obj.mode == 'VERTEX_GPENCIL':
|
||||
|
@ -5161,6 +5160,8 @@ class VIEW3D_MT_edit_gpencil(Menu):
|
|||
|
||||
# Remove
|
||||
layout.menu("VIEW3D_MT_edit_gpencil_delete")
|
||||
# Assets
|
||||
layout.menu("VIEW3D_MT_edit_gpencil_asset", text="Create Asset...")
|
||||
antoniov marked this conversation as resolved
|
||||
|
||||
|
||||
class VIEW3D_MT_edit_gpencil_stroke(Menu):
|
||||
|
@ -5230,23 +5231,11 @@ class VIEW3D_MT_edit_gpencil_point(Menu):
|
|||
|
||||
|
||||
class VIEW3D_MT_edit_gpencil_asset(Menu):
|
||||
Julian Eisel
commented
I think you can use I think you can use `layout.operator_enum()` here.
|
||||
bl_label = "Asset"
|
||||
bl_label = "Create Asset"
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("gpencil.asset_create", text="Active Layer").source = 'LAYER'
|
||||
layout.operator("gpencil.asset_create", text="All Layers").source = 'LAYERS_ALL'
|
||||
layout.operator("gpencil.asset_create", text="All Layers Separated").source = 'LAYERS_SPLIT'
|
||||
layout.separator()
|
||||
|
||||
layout.operator("gpencil.asset_create", text="Active Keyframe (Active Layer)").source = 'KEYFRAME'
|
||||
layout.operator("gpencil.asset_create", text="Active Keyframe (All Layers)").source = 'KEYFRAME_ALL'
|
||||
layout.operator("gpencil.asset_create", text="Selected Keyframes").source = 'KEYFRAME_SELECTED'
|
||||
layout.separator()
|
||||
|
||||
layout.operator("gpencil.asset_create", text="Selected Strokes").source = 'SELECTED'
|
||||
layout.operator("gpencil.asset_create", text="Selected Points").source = 'POINT'
|
||||
layout.operator_enum("gpencil.asset_create", "source")
|
||||
|
||||
|
||||
class VIEW3D_MT_weight_gpencil(Menu):
|
||||
|
|
Loading…
Reference in New Issue
The ellipsis "..." are not needed because there is no extra popup or window after. Rename to "Create Asset" and also move it above "Duplicate" menu adding separators.