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

Importer : AttributeError: 'NoneType' object has no attribute 'data' #43

Open
cococolorful opened this issue Sep 24, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@cococolorful
Copy link

Impotter : AttributeError: 'NoneType' object has no attribute 'data'

Bug Description
When I try to import a scene(scenes\dragon\dragon.xml) from differentiable-sdf-rendering, the first error that occurs is Cannot resolve scene relative path "textures/cathedral.hdr".I think it is because <path value="../"/> doesn't work correctly, so I move the all the files(scenes\dragon\*) directly to scenes\.The error goes away, but a new one appears.

Traceback (most recent call last):
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\__init__.py", line 61, in execute
    importer.load_mitsuba_scene(context, scene, collection, self.filepath, axis_mat)
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\__init__.py", line 393, in load_mitsuba_scene
    if not instantiate_bl_data_node(mi_context, bl_scene_data_node):
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\__init__.py", line 356, in instantiate_bl_data_node
    if not _bl_node_instantiators[node_type](mi_context, bl_node):
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\__init__.py", line 224, in instantiate_bl_scene_node
    if not instantiate_bl_data_node(mi_context, child_node):
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\__init__.py", line 356, in instantiate_bl_data_node
    if not _bl_node_instantiators[node_type](mi_context, bl_node):
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\__init__.py", line 322, in instantiate_bl_properties_node
    if not _bl_properties_node_instantiators[node_prop_type](mi_context, bl_node):
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\__init__.py", line 308, in instantiate_sampler_properties_node
    return renderer.apply_mi_sampler_properties(mi_context, bl_node.mi_props)
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\renderer.py", line 248, in apply_mi_sampler_properties
    return _mi_sampler_properties_converters[mi_sampler_type](mi_context, mi_props)
  File "C:\Users\hgx\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\mitsuba-blender\io\importer\renderer.py", line 182, in apply_mi_independent_properties
    mi_camera = mi_context.bl_scene.camera.data.mitsuba
AttributeError: 'NoneType' object has no attribute 'data'

To Reproduce
Steps to reproduce the behavior:

  1. download scenes from differentiable-sdf-rendering
  2. import the xxx\scenes\dragon\dragon.xml which you will see the first error.
  3. move filesscenes\dragon\* to scenes\(I'm not sure if this is the right way to do it)
  4. See the second error

Expected behavior
Load the scene correctly

Environment (please complete the following information):

  • OS: [Windows]
  • Blender Version: [3.3]
  • Add-on Version: [latest]
@cococolorful cococolorful added the bug Something isn't working label Sep 24, 2022
@cococolorful cococolorful changed the title AttributeError: 'NoneType' object has no attribute 'data' Impotter : AttributeError: 'NoneType' object has no attribute 'data' Sep 24, 2022
@ros-dorian ros-dorian changed the title Impotter : AttributeError: 'NoneType' object has no attribute 'data' Importer : AttributeError: 'NoneType' object has no attribute 'data' Sep 24, 2022
@bathal1 bathal1 mentioned this issue May 27, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant