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
34 stars 17 forks source link

Reorganize PFM Stub Storage and Add the SDL Show/Hide Modifier. #414

Closed Hoikas closed 3 months ago

Hoikas commented 3 months ago

This centralizes the location of all PFM attribute stubs for easier maintenance and adds a modifier exposing xAgeSDLBoolShowHide and xAgeSDLIntShowHide. It should hopefully make life a little easier for creating global SDL controlled visibility type stuff.

DoobesURU commented 3 months ago

So I slapped some show/hide SDL mods on a few objects. The Boolean SDL show/hide mods in Chiso seemed to work just fine.

However, the Integer show/hide mods in the Pub came back with this error:

Error: sequence item 0: expected str instance, int found
Traceback (most recent call last):
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\operators\op_export.py", line 228, in execute
    e.run()
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\exporter\convert.py", line 125, in run
    self._pre_export_scene_objects()
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\exporter\convert.py", line 563, in _pre_export_scene_objects
    do_pre_export(bl_obj)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\exporter\convert.py", line 551, in do_pre_export
    gen_result = pre_result.send(gen_result)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\base.py", line 247, in pre_export
    yield self.convert_logic(bo)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\base.py", line 188, in convert_logic
    name = kwargs.pop("name", self.key_name)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\logic.py", line 257, in key_name
    return f"cPythIntShowHide_{self.sdl_variable}_{'-'.join(self._int_states)}"
TypeError: sequence item 0: expected str instance, int found

location: <unknown location>:-1

location: <unknown location>:-1
DoobesURU commented 3 months ago

New error after commit d19534b:

Error: 'xAgeSDLIntShowHide.py'
Traceback (most recent call last):
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\operators\op_export.py", line 228, in execute
    e.run()
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\exporter\convert.py", line 125, in run
    self._pre_export_scene_objects()
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\exporter\convert.py", line 563, in _pre_export_scene_objects
    do_pre_export(bl_obj)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\exporter\convert.py", line 551, in do_pre_export
    gen_result = pre_result.send(gen_result)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\base.py", line 247, in pre_export
    yield self.convert_logic(bo)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\base.py", line 197, in convert_logic
    self.logicwiz(bo, **kwargs)
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\logic.py", line 257, in logicwiz
    pfm_node = self._create_standard_python_file_node(tree, "xAgeSDLIntShowHide.py")
  File "D:\Korman 0.16base\2.79\scripts\addons\korman\properties\modifiers\base.py", line 217, in _create_standard_python_file_node
    return self._create_python_file_node(tree, filename, plasma_api.python_files[filename])
KeyError: 'xAgeSDLIntShowHide.py'

location: <unknown location>:-1

location: <unknown location>:-1