Skip to content

Commit

Permalink
generator: tweak messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bnnm committed Dec 6, 2020
1 parent c7977fa commit ddf21db
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions wwiser/wgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,17 @@ def _report(self):
if reb.get_missing_nodes_others():
missing = len(reb.get_missing_nodes_others())
logging.info("generator: WARNING! missing %i Wwise objects in other banks (load?)" % (missing))
for bank in reb.get_missing_banks():
logging.info("- %s.bnk" % (bank))
for bankinfo in reb.get_missing_banks():
logging.info("- %s.bnk" % (bankinfo))

if reb.get_missing_nodes_unknown():
missing = len(reb.get_missing_nodes_unknown())
logging.info("generator: WARNING! missing %i Wwise objects in unknown banks (load/ignore?)" % (missing))

if reb.get_multiple_nodes():
missing = len(reb.get_multiple_nodes())
logging.info("generator: WARNING! repeated %i Wwise objects in multiple banks (load less?)" % (missing))

if not txc.created:
logging.info("generator: WARNING! no .txtp were created (find+load banks with events?)")

Expand Down
8 changes: 7 additions & 1 deletion wwiser/wrebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def __init__(self):
self._missing_nodes_loaded = {} # missing nodes that should be in loaded banks (event garbage left by Wwise)
self._missing_nodes_others = {} # missing nodes in other banks (even pointing to other banks)
self._missing_nodes_unknown = {} # missing nodes of unknown type
self._multiple_nodes = {} # nodes that exist but were loaded in multiple banks and can't decide which one is best

self._loaded_banks = {} # id of banks that participate in generating
self._missing_banks = {} # banks missing in the "others" list
Expand Down Expand Up @@ -127,6 +128,9 @@ def get_missing_banks(self):
def get_missing_media(self):
return self._missing_media

def get_multiple_nodes(self):
return self._multiple_nodes

def get_transition_objects(self):
return self._transition_objects

Expand Down Expand Up @@ -179,7 +183,9 @@ def _get_node_by_ref(self, bank_id, sid):
if not refs:
return None
if len(refs) > 1:
logging.info("generator: id %s found in multiple banks", sid)
# could try to figure out if nodes are equivalent before reporting?
logging.debug("generator: id %s found in multiple banks, not found in bank %s", sid, bank_id)
self._multiple_nodes[sid] = True
ref = refs[0]
node = self._ref_to_node.get(ref)
return node
Expand Down
2 changes: 1 addition & 1 deletion wwiser/wversion.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#autogenerated on build
WWISER_VERSION = "v20201202"
WWISER_VERSION = "v20201205"

0 comments on commit ddf21db

Please sign in to comment.