Skip to content

Commit

Permalink
Fix Binview Template Copy-Out (#4)
Browse files Browse the repository at this point in the history
* Implicitly dereference with AVBPropertData.items()
  • Loading branch information
mjiggidy authored Nov 15, 2024
1 parent d5c631a commit 59057db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
bin
include
lib
.gitignore
*.avb

# venv stuff
pyvenv.cfg
*.avb
Scripts
Lib
venv*
6 changes: 3 additions & 3 deletions binsmith.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

"""
binsmith.py v1.0.1
binsmith.py v1.0.2
Create Avid bins (.avb) with custom display settings
By Michael Jordan <[email protected]>
Expand All @@ -14,7 +14,7 @@
"""

import avb
import sys, pathlib, copy, typing, pathlib, enum, argparse
import sys, pathlib, typing, pathlib, enum, argparse

class ViewModes(enum.IntEnum):
"""Avid Bin View Modes"""
Expand Down Expand Up @@ -58,7 +58,7 @@ def get_binview_from_file(path_avb:str) -> avb.core.AVBPropertyData:
"""Copy BinView data from a given path to an AVB"""

with avb.open(path_avb) as avb_file:
return copy.deepcopy(avb_file.content.view_setting.property_data), ViewModes(avb_file.content.display_mode), BinDisplays(avb_file.content.display_mask)
return avb.core.AVBPropertyData(avb_file.content.view_setting.property_data.items()), ViewModes(avb_file.content.display_mode), BinDisplays(avb_file.content.display_mask)

def copy_binview_to_avb(binview:avb.core.AVBPropertyData, avb_file:avb.file.AVBFile) -> avb.bin.BinViewSetting:
"""Return a new binview"""
Expand Down

0 comments on commit 59057db

Please sign in to comment.