H-uru / korman

Blender plugin for creating ages for Cyan Worlds' proprietary Plasma engine and its open source variant, CyanWorlds.com Engine.
GNU General Public License v3.0
35 stars 17 forks source link

AssertionError sound.py's get_sound_keys #412

Closed DoobesURU closed 2 months ago

DoobesURU commented 2 months ago

I ran into this one while digging into Descent and trying to export for the first time in forever. Certainly the first time with 0.16.

Traceback (most recent call last):
  File "D:\Korman 0.16\2.79\scripts\addons\korman\operators\op_export.py", line 228, in execute
    e.run()
  File "D:\Korman 0.16\2.79\scripts\addons\korman\exporter\convert.py", line 142, in run
    self._export_referenced_node_trees()
  File "D:\Korman 0.16\2.79\scripts\addons\korman\exporter\convert.py", line 375, in _export_referenced_node_trees
    tree.export(self, bo, so)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_core.py", line 522, in export
    node.export(exporter, bo, so)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_responder.py", line 153, in export
    stateMgr.convert_states(exporter, so)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_responder.py", line 130, in convert_states
    node.convert_state(exporter, so, state, i, self)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_responder.py", line 324, in convert_state
    self._generate_command(exporter, so, stateMgr.responder, commands, i)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_responder.py", line 378, in _generate_command
    self._generate_command(exporter, so, responder, commandMgr, i, childWaitOn)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_responder.py", line 378, in _generate_command
    self._generate_command(exporter, so, responder, commandMgr, i, childWaitOn)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_responder.py", line 360, in _generate_command
    messages = tuple(msgNode.convert_message(exporter, so))
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_messages.py", line 811, in convert_message
    yield from self._convert_sound_emitter_msg(exporter, so)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\nodes\node_messages.py", line 842, in _convert_sound_emitter_msg
    sound_keys = tuple(soundemit.get_sound_keys(exporter, self.sound_name))
  File "D:\Korman 0.16\2.79\scripts\addons\korman\properties\modifiers\sound.py", line 694, in get_sound_keys
    assert name or sound
AssertionError

location: <unknown location>:-1

location: <unknown location>:-1

Looks like it's our old friend, get_sound_keys. Any ideas? I could package up Descent, but as you can probably guess, it's rather large, so it's up to you all. 😉

Hoikas commented 2 months ago

The assertion is indicating that a Sound Message Node's Sound field is blank.

Hoikas commented 2 months ago

413 should allow you to better drill down to see what's causing the problem.

DoobesURU commented 2 months ago

413 should allow you to better drill down to see what's causing the problem.

Yep, the changes helped to narrow down the offending node and set things properly for a successful export, which was quite helpful. I believe the fix is good to go!