WRL import #83428

Open
opened 2020-12-05 12:46:23 +01:00 by Hanna Makowska · 14 comments

System Information
Not relevant

Blender Version
Broken: version:

  • 2.92.0 Alpha, branch: master, commit date: 2020-11-29 08:04, hash: blender/blender@13c820d87b
  • 2.91.0
    Worked: 2.79

Addon Information
Name: Web3D X3D/VRML2 format (2, 2, 5)
Author: Campbell Barton, Bart, Bastien Montagne, Seva Alekseyev

Short description of error
Importing wrl file does not work properly.

The same file imported fine in 2.79, but gives back this error when importing in 2.91

  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\__init__.py", line 78, in execute
    return import_x3d.load(context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 3639, in load
    global_matrix=global_matrix,
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 3535, in load_web3d
    importShape(bpycollection, node, ancestry, global_matrix)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 3141, in importShape
    is_vcol)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 2968, in importShape_LoadAppearance
    (bpymat, bpyima, tex_has_alpha) = appearance_Create(vrmlname, material, tex_node, ancestry, node, is_vcol)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 2876, in appearance_Create
    bpyima = appearance_LoadTexture(tex_node, ancestry, node)
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 2825, in appearance_LoadTexture
    bpyima.use_clight_x = not repeat_s
AttributeError: 'Image' object has no attribute 'use_clight_x'

location: <unknown location>:-1
**System Information** Not relevant **Blender Version** Broken: version: - 2.92.0 Alpha, branch: master, commit date: 2020-11-29 08:04, hash: `blender/blender@13c820d87b` - 2.91.0 Worked: 2.79 **Addon Information** Name: Web3D X3D/VRML2 format (2, 2, 5) Author: Campbell Barton, Bart, Bastien Montagne, Seva Alekseyev **Short description of error** Importing wrl file does not work properly. The same file imported fine in 2.79, but gives back this error when importing in 2.91 ``` File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\__init__.py", line 78, in execute return import_x3d.load(context, **keywords) File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 3639, in load global_matrix=global_matrix, File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 3535, in load_web3d importShape(bpycollection, node, ancestry, global_matrix) File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 3141, in importShape is_vcol) File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 2968, in importShape_LoadAppearance (bpymat, bpyima, tex_has_alpha) = appearance_Create(vrmlname, material, tex_node, ancestry, node, is_vcol) File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 2876, in appearance_Create bpyima = appearance_LoadTexture(tex_node, ancestry, node) File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_x3d\import_x3d.py", line 2825, in appearance_LoadTexture bpyima.use_clight_x = not repeat_s AttributeError: 'Image' object has no attribute 'use_clight_x' location: <unknown location>:-1 ```
Author

Added subscriber: @Hybryda

Added subscriber: @Hybryda

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

This error was introduced in 6aa8e130ef in 2018 when renaming lamp to light, which also unintentionally modified clamp to clight.

This error was introduced in 6aa8e130ef in 2018 when renaming `lamp` to `light`, which also unintentionally modified `clamp` to `clight`.
Robert Guetzkow self-assigned this 2020-12-05 13:33:49 +01:00

This issue was referenced by ff83176c7f

This issue was referenced by ff83176c7f46ec16666bec79bbda5d0147b5ed7c

This issue was referenced by blender/blender-addons-contrib@d71985e901

This issue was referenced by blender/blender-addons-contrib@d71985e901986970dfc86c3d5d1124d0f8c27518

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscriber: @DaveA

Added subscriber: @DaveA

This is not fixed in 2.93

image.png

Barrel.wrl

This is not fixed in 2.93 ![image.png](https://archive.blender.org/developer/F10280587/image.png) [Barrel.wrl](https://archive.blender.org/developer/F10280591/Barrel.wrl)

Changed status from 'Resolved' to: 'Confirmed'

Changed status from 'Resolved' to: 'Confirmed'

@DaveA You're right the Python API changed and use_clamp_x is no longer available. The commit only fixed the incorrect renaming. Thank you for noticing and providing a test file.

If there are more parts of the add-on that haven't been updated to the current Python API, then this might take some time.

Edit: The model can be imported when removing the outdated code, but the add-on definitely has to be checked for other instances of incorrect API usage. Additionally, use_clamp_x and use_clamp_y don't seem to have a direct replacement. The clamping/clipping may need to be recreated with nodes.

@DaveA You're right the Python API changed and `use_clamp_x` is no longer available. The commit only fixed the incorrect renaming. Thank you for noticing and providing a test file. If there are more parts of the add-on that haven't been updated to the current Python API, then this might take some time. Edit: The model can be imported when removing the outdated code, but the add-on definitely has to be checked for other instances of incorrect API usage. Additionally, `use_clamp_x` and `use_clamp_y` don't seem to have a direct replacement. The clamping/clipping may need to be recreated with nodes.

The add-on appears to depend on the old API in multiple areas. This will not be a quick fix.

The add-on appears to depend on the old API in multiple areas. This will not be a quick fix.
Robert Guetzkow removed their assignment 2021-08-15 18:36:58 +02:00

This issue was referenced by 0573bc7dae

This issue was referenced by 0573bc7daeb1e5fc1e0d0e6a37c5efc043aebb13

The attached file works in blender 4.2 with extension version 2.3.3. Seems to be resolved by now.

The attached file works in blender 4.2 with extension version 2.3.3. Seems to be resolved by now.
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 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#83428
No description provided.