Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localized Text modifier crashes #418

Closed
DoobesURU opened this issue Aug 25, 2024 · 4 comments
Closed

Localized Text modifier crashes #418

DoobesURU opened this issue Aug 25, 2024 · 4 comments

Comments

@DoobesURU
Copy link
Contributor

I've been working on a few dynamic text maps using the modifier (apparently something I haven't noticed and used until now 😛 ) and have been getting an error upon export:

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 125, in run
    self._pre_export_scene_objects()
  File "D:\Korman 0.16\2.79\scripts\addons\korman\exporter\convert.py", line 559, in _pre_export_scene_objects
    do_pre_export(bl_obj)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\exporter\convert.py", line 547, in do_pre_export
    gen_result = pre_result.send(gen_result)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\properties\modifiers\render.py", line 725, in pre_export
    yield self.convert_logic(bo, age_name=exporter.age_name, version=exporter.mgr.getVer())
  File "D:\Korman 0.16\2.79\scripts\addons\korman\properties\modifiers\base.py", line 191, in convert_logic
    self.logicwiz(bo, **kwargs)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\properties\modifiers\render.py", line 738, in logicwiz
    self._create_nodes(bo, tree, age_name=age_name, version=version)
  File "D:\Korman 0.16\2.79\scripts\addons\korman\properties\modifiers\render.py", line 745, in _create_nodes
    target_object=bo, material=material, texture=self.texture)
TypeError: _create_python_attribute() takes 3 positional arguments but 4 were given

location: <unknown location>:-1

location: <unknown location>:-1

This was recreated using my city blend and the Chiso blend using a base 0.16 install. Before this, I was incorrectly using a journal mod along with a node tree, which worked. This is what I was running into with #417 too.

@Hoikas
Copy link
Member

Hoikas commented Aug 25, 2024

Can you share what the lines around "D:\Korman 0.16\2.79\scripts\addons\korman\properties\modifiers\render.py", line 745 look like? In my working copy of Korman, the code this error message is referencing is on line 720, not 745, and it looks like

    def _create_nodes(self, bo, tree, *, age_name, version, material=None, clear_color=None):
        pfm_node = self._create_standard_python_file_node(tree, "xDynTextLoc.py")
        loc_path = self.key_name if version <= pvPots else "{}.{}.{}".format(age_name, self.localization_set, self.key_name)

        self._create_python_attribute(pfm_node, "dynTextMap", "ptAttribDynamicMap",
                                      target_object=bo, material=material, texture=self.texture)

@Hoikas
Copy link
Member

Hoikas commented Aug 25, 2024

Actually, I think I see the problem. Try deleting "ptAttribDynamicMap", from that call to self._create_python_attribute, making it:

        self._create_python_attribute(pfm_node, "dynTextMap",
                                      target_object=bo, material=material, texture=self.texture)

@DoobesURU
Copy link
Contributor Author

Actually, I think I see the problem. Try deleting "ptAttribDynamicMap", from that call to self._create_python_attribute, making it:

        self._create_python_attribute(pfm_node, "dynTextMap",
                                      target_object=bo, material=material, texture=self.texture)

Fixed! Dynamic Text is appearing and no more export stops.

@Hoikas
Copy link
Member

Hoikas commented Sep 1, 2024

Fixed by #419.

@Hoikas Hoikas closed this as completed Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants