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

Setting base color texture cause error #77

Closed
ronh991 opened this issue Mar 18, 2022 · 7 comments
Closed

Setting base color texture cause error #77

ronh991 opened this issue Mar 18, 2022 · 7 comments

Comments

@ronh991
Copy link
Contributor

ronh991 commented Mar 18, 2022

Current Behavior

Setting a texture to Base Color causes error. - not shown

Expected Behavior

to add texture to texture node

Steps To Reproduce

Open model
migrate standard texture (has standard texture already) will not carry over.
set the texture to the required texture get error.

Traceback (most recent call last):
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 128, in update_base_color_texture
msfs.setBaseColorTex(self.msfs_base_color_texture)
AttributeError: 'NoneType' object has no attribute 'setBaseColorTex'
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 123, in update_base_color_texture
Traceback (most recent call last):
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 128, in update_base_color_texture
msfs.setBaseColorTex(self.msfs_base_color_texture)
AttributeError: 'NoneType' object has no attribute 'setBaseColorTex'
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 123, in update_base_color_texture

Environment

- OS:win 10
- Blender:3.1
- glTF-Blender-IO-MSFS:1.1.2

Anything else?

No response

@ronh991
Copy link
Contributor Author

ronh991 commented Mar 18, 2022

DA40CGDFQ_March 18, 2022_14h51m38s

@mamu82
Copy link

mamu82 commented Mar 18, 2022

Here migrate material works fine

That .001 in the texture name Is suspicious, Is your texture name really that?
Usually a .001 come from copying textured meshes between files, and cause missing textures in the Sim

Just my 2 cents 😊

@BlueMeshs
Copy link

BlueMeshs commented Mar 18, 2022

Delete your actual material, close Blender, restart the software and then create a new one, it should work correctly. It happen when you copy a mesh from an other .blend file.

@pepperoni505
Copy link
Contributor

@ronh991 Does the above solve your issue?

@ronh991
Copy link
Contributor Author

ronh991 commented Mar 20, 2022

Guys this is due to the migration of materials. The 001 was me doing things numerous times. trying to add the material manually after the migration.

This is the error with migrate.
location: :-1
Error: Python: Traceback (most recent call last):
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_panel.py", line 129, in execute
MSFS_Material_Property_Update.update_msfs_material_type(mat, context)
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 111, in update_msfs_material_type
msfs_mat = MSFS_Fresnel_Fade(self, buildTree=True)
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\material\msfs_material_fresnel_fade.py", line 22, in init
super().init(material, buildTree)
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_function.py", line 130, in init
self.force_update_properties()
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_function.py", line 143, in force_update_properties
MSFS_Material_Property_Update.update_base_color_texture(
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 128, in update_base_color_texture
msfs.setBaseColorTex(self.msfs_base_color_texture)
AttributeError: 'NoneType' object has no attribute 'setBaseColorTex'

location: :-1

@ronh991
Copy link
Contributor Author

ronh991 commented Mar 20, 2022

this is the error after trying to add the texture myself

location: :-1

Traceback (most recent call last):
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 128, in update_base_color_texture
msfs.setBaseColorTex(self.msfs_base_color_texture)
AttributeError: 'NoneType' object has no attribute 'setBaseColorTex'
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 123, in update_base_color_texture
Traceback (most recent call last):
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 128, in update_base_color_texture
msfs.setBaseColorTex(self.msfs_base_color_texture)
AttributeError: 'NoneType' object has no attribute 'setBaseColorTex'
File "C:\Users\Ron\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\blender\msfs_material_prop_update.py", line 123, in update_base_color_texture

@ronh991
Copy link
Contributor Author

ronh991 commented Apr 8, 2022

fixed in migration fix branch

@ronh991 ronh991 closed this as completed Apr 8, 2022
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

4 participants