Maniphest T74934

Exporting an object with modifiers to X3D fails
Closed, ResolvedBUG

Assigned To
Brecht Van Lommel (brecht)
Authored By
Michalis Kamburelis (kambi)
Mar 19 2020, 7:05 PM
Tags
  • Add-ons (Community)
Subscribers
Don Brutzman (brutzman)
J. Scherich (mufti11)
Michalis Kamburelis (kambi)
Philipp Oeser (lichtwerk)

Description

System Information
Operating system: Linux
Graphics card: NVidia

Blender Version
Broken: Blender 2.82a

Short description of error

Exporting a Blender object with modifiers to X3D fails. The exporting script tries to modify a temporary mesh object name, which is not allowed.

Exact steps for others to reproduce the error

Reproduction:

  • Take any mesh (default cube in the default scene is enough),
  • Add a modifier like "Subdivision Surface",
  • Export to X3D with "Apply Modifiers" selected (by default it is).

Export fails with the following error:

Info: starting X3D export to '/home/michalis/Desktop/a.x3d'...
Traceback (most recent call last):
  File "/home/michalis/installed/blender/2.82/scripts/addons/io_scene_x3d/__init__.py", line 241, in execute
    return export_x3d.save(context, **keywords)
  File "/home/michalis/installed/blender/2.82/scripts/addons/io_scene_x3d/export_x3d.py", line 1604, in save
    name_decorations=name_decorations,
  File "/home/michalis/installed/blender/2.82/scripts/addons/io_scene_x3d/export_x3d.py", line 1525, in export
    export_main()
  File "/home/michalis/installed/blender/2.82/scripts/addons/io_scene_x3d/export_x3d.py", line 1521, in export_main
    export_object(ident, None, obj_main, obj_main_children)
  File "/home/michalis/installed/blender/2.82/scripts/addons/io_scene_x3d/export_x3d.py", line 1439, in export_object
    me.name = obj.name.rstrip("1234567890").rstrip(".")
AttributeError: bpy_struct: attribute "name" from "Mesh" is read-only

location: <unknown location>:-1

I'll submit a patch for this shortly.

Revisions and Commits

rBA Blender Add-ons
D7183

Event Timeline

Michalis Kamburelis (kambi) created this task.Mar 19 2020, 7:05 PM
Michalis Kamburelis (kambi) added a comment.Mar 19 2020, 7:12 PM
This comment was removed by Michalis Kamburelis (kambi).
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).Mar 20 2020, 11:03 AM

Thx for the fix!

This has actually been reported before, see {T68452], will merge these reports... (and in this case, will merge the older one into the newer one, because we have the fix provided here...)

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Mar 20 2020, 11:03 AM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".
Philipp Oeser (lichtwerk) merged a task: T68452: X3D export broken for meshes with modifiers.
Philipp Oeser (lichtwerk) added subscribers: J. Scherich (mufti11), Don Brutzman (brutzman).
Brecht Van Lommel (brecht) closed this task as Resolved by committing rBA6c3fbd669d23: Fix T74934: exporting object with modifiers to X3D fails.Mar 27 2020, 12:43 AM
Brecht Van Lommel (brecht) claimed this task.
Brecht Van Lommel (brecht) added a commit: rBA6c3fbd669d23: Fix T74934: exporting object with modifiers to X3D fails.