X3D Import and Export returns error on meshes with vertex colors #69895

Closed
opened 2019-09-15 09:25:24 +02:00 by Metin Seven · 18 comments

System Information
Operating system: Windows 10 Pro 64-bit
Graphics card: NVIDIA GeForce RTX 2080 Ti

Blender Version
Broken: 2.81 alpha (multiple builds)
Worked: 2.7x

Short description of error
X3D file format Import and Export returns an error on meshes with vertex colors.

Exact steps for others to reproduce the error

  1. Open Blender.
  2. Activate the X3D Import / Export add-on.
  3. Enter Vertex Paint mode.
  4. Paint some vertices in a color (e.g. red to have a visible color).
  5. Export the model as X3D.
  6. An error message appears, and the export is saved as a zero bytes file.
  7. An error also appears when trying to import an X3D file containing vertex colors.
**System Information** Operating system: Windows 10 Pro 64-bit Graphics card: NVIDIA GeForce RTX 2080 Ti **Blender Version** Broken: 2.81 alpha (multiple builds) Worked: 2.7x **Short description of error** X3D file format Import and Export returns an error on meshes with vertex colors. **Exact steps for others to reproduce the error** 1. Open Blender. 2. Activate the X3D Import / Export add-on. 3. Enter Vertex Paint mode. 4. Paint some vertices in a color (e.g. red to have a visible color). 5. Export the model as X3D. 6. An error message appears, and the export is saved as a zero bytes file. 7. An error also appears when trying to import an X3D file containing vertex colors.
Author

Added subscriber: @MetinSeven-1

Added subscriber: @MetinSeven-1
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

are you changing any settings? I followed your example an had no error, exported with vert color and imported back with vert color.

are you changing any settings? I followed your example an had no error, exported with vert color and imported back with vert color.
Author

I've got a number of default settings changed in Preferences, but that shouldn't matter for an X3D export.

I can consistently reproduce the error here. I've sent along a screenshot.

image.png

Looking at the error I suspect it's got something to do with no assigned material, while there are vertex colors?

I've got a number of default settings changed in Preferences, but that shouldn't matter for an X3D export. I can consistently reproduce the error here. I've sent along a screenshot. ![image.png](https://archive.blender.org/developer/F7748158/image.png) Looking at the error I suspect it's got something to do with no assigned material, while there are vertex colors?

Added subscriber: @mont29

Added subscriber: @mont29

Please attach here a .x3d file that fails to import…

Please attach here a .x3d file that fails to import…
Author

I'm sorry, I haven't got X3D files I can publicly share. But I can reproduce the error every time if I follow the steps to reproduce the error. See the above reply for the error I get.

I suspect it's got something to do with vertex colors (maybe when no material is assigned).

I'm sorry, I haven't got X3D files I can publicly share. But I can reproduce the error every time if I follow the steps to reproduce the error. See the above reply for the error I get. I suspect it's got something to do with vertex colors (maybe when no material is assigned).

If you cannot share a 'work' x3d file, then you should be able to create a dummy one demonstrating the issue…

If you cannot share a 'work' x3d file, then you should be able to create a dummy one demonstrating the issue…
Author

The problem is: I can't import or export an X3D file. When I export a scene, I get the error and the file is 0 bytes.

The problem is: I can't import or export an X3D file. When I export a scene, I get the error and the file is 0 bytes.

Added subscriber: @filibis

Added subscriber: @filibis

Simple meshes exports fine (Using 2.81a). However when I add SubD modifier it gives below error (I also get same error with vertex colors):

Info: starting X3D export to 'C:\\Users\\filibis\\Desktop\\test1.x3d'...
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\__init__.py", line 158, in execute
    return export_x3d.save(context, **keywords)
  File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\export_x3d.py", line 1604, in save
    name_decorations=name_decorations,
  File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\export_x3d.py", line 1525, in export
    export_main()
  File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\export_x3d.py", line 1521, in export_main
    export_object(ident, None, obj_main, obj_main_children)
  File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\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

Here is a suzanne mesh i exported: suzanne.x3d

Simple meshes exports fine (Using 2.81a). However when I add SubD modifier it gives below error (I also get same error with vertex colors): ``` Info: starting X3D export to 'C:\\Users\\filibis\\Desktop\\test1.x3d'... Traceback (most recent call last): File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\__init__.py", line 158, in execute return export_x3d.save(context, **keywords) File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\export_x3d.py", line 1604, in save name_decorations=name_decorations, File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\export_x3d.py", line 1525, in export export_main() File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\scripts\addons\io_scene_x3d\export_x3d.py", line 1521, in export_main export_object(ident, None, obj_main, obj_main_children) File "C:\Program Files\Blender Foundation\blender-2.81.0-git.ae43b1d51b4a-windows64\2.81\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 ``` Here is a suzanne mesh i exported: [suzanne.x3d](https://archive.blender.org/developer/F7758374/suzanne.x3d)

Please report export issue in a separate thread, only ONE issue per task, otherwise it is impossible to manage things.

That suzanne.x3d file imports without any error here…

Please report export issue in a separate thread, only **ONE** issue per task, otherwise it is impossible to manage things. That `suzanne.x3d` file imports without any error here…

@MetinSeven-1 then add a .blend file that you cannot export as a first step…

@MetinSeven-1 then add a .blend file that you cannot export as a first step…
Author

I've attached a scene I can't export as an X3D (default export settings of the add-on).

This previous report might be related to the issue?X3D export error.blend

I've attached a scene I can't export as an X3D (default export settings of the add-on). [This previous report ](https://developer.blender.org/T61052) might be related to the issue?[X3D export error.blend](https://archive.blender.org/developer/F7758435/X3D_export_error.blend)

This issue was referenced by c06154e38a

This issue was referenced by c06154e38ac8c754f118b74befc8380b9a00e7ae

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Bastien Montagne self-assigned this 2019-09-19 18:30:08 +02:00

Added subscriber: @affan_ahmed

Added subscriber: @affan_ahmed

0GAk6.jpg

can any one help me with these errors no matter what type of x3d file I load the blender is always giving errors though it loads the models but the error remains and more over the floor doesnot get loaded in any of my models

![0GAk6.jpg](https://archive.blender.org/developer/F12306212/0GAk6.jpg) can any one help me with these errors no matter what type of x3d file I load the blender is always giving errors though it loads the models but the error remains and more over the floor doesnot get loaded in any of my models
Sign in to join this conversation.
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#69895
No description provided.