pyavb icon indicating copy to clipboard operation
pyavb copied to clipboard

Bin Display Modes/Mask

Open mjiggidy opened this issue 2 years ago • 2 comments

Not really an issue, but I thought it might be good to document this somewhere since I've been working with it. I've been tracking down the values used for avb.bin.Bin's display_mode and display_mask properties. They are below:

Known values for avb.bin.Bin.display_mode:

In Avid, this is set by choosing one of the mode buttons next to the Bin View dropdown.

Value Meaning
0 List mode
1 Frame mode
2 Script mode

Known flags for avb.bin.Bin.display_mask:

In Avid, this is set by right-clicking in the bin and choosing Set Bin Display... Note there are some flags missing. Not sure if they're deprecated, reserved, or found elsewhere.

Flag Meaning
00000000000000001 Show Masterclips
00000000000000010 Show Subclips
00000000000000100 Show Sequences
00000000000001000 Show Sources
00000000000010000 Show Effects
00000000000100000 Show Group Clips
00000000001000000 Show Precomputed Render Effects
00000000010000000 Show Motion Effects
00000001000000000 Show Clips Created By the User
00000010000000000 Show Reference Clips
00000100000000000 Show Precomputed Titles and Matte Keys
01000000000000000 Show Stereoscopic Clips
10000000000000000 Show Linked Masterclips

mjiggidy avatar Aug 30 '22 00:08 mjiggidy

Thanks for documenting this! Would adding some helper properties for these to the Bin object be helpful?

markreidvfx avatar Sep 06 '22 17:09 markreidvfx

Thanks for documenting this! Would adding some helper properties for these to the Bin object be helpful?

Yes I think so! In a recent script, I used a couple of enums for this; although I'm not sure this is too helpful to you, considering your efforts to maintain compatibility with older versions of python and such :)

class ViewModes(enum.IntEnum):
	"""Avid Bin View Modes"""
	
	LIST   = 0
	FRAME  = 1
	SCRIPT = 2

class BinDisplays(enum.IntFlag):
	"""Types of data to display in the bin (from Set Bin Display... dialog)"""

	MASTER_CLIPS               = 0b00000000000000001
	SUBCLIPS                   = 0b00000000000000010
	SEQUENCES                  = 0b00000000000000100
	SOURCES                    = 0b00000000000001000
	EFFECTS                    = 0b00000000000010000
	GROUPS                     = 0b00000000000100000
	PRECOMP_RENDERED_EFFECTS   = 0b00000000001000000
	MOTION_EFFECTS             = 0b00000000010000000
	SHOW_CLIPS_CREATED_BY_USER = 0b00000001000000000
	SHOW_REFERENCE_CLIPS       = 0b00000010000000000
	PRECOMP_TITLES_MATTEKEYS   = 0b00000100000000000
	STEREOSCOPIC_CLIPS         = 0b01000000000000000
	LINKED_MASTER_CLIPS        = 0b10000000000000000

mjiggidy avatar Sep 08 '22 17:09 mjiggidy