Skip to content

Commit

Permalink
Fixed Loop iteration when one material is faulty
Browse files Browse the repository at this point in the history
  • Loading branch information
HerzogVonWiesel authored Jun 26, 2023
1 parent c42d9a4 commit 767bcbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TexToMatO_v1_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def importTexturesFromBase(derive_folder_from_base = False, delete_base_texture

if base_color_tex is None:
c4d.gui.MessageDialog("No base texture found in Material %s" % RSMaterial.GetMaterialName(), c4d.GEMB_ICONEXCLAMATION)
return
continue

texture_path = base_color_tex.GetInputs().FindChild(_RS_NODE_PREFIX+"texturesampler.tex0").FindChild('path').GetDefaultValue()
texture_path = str(texture_path)
Expand All @@ -243,7 +243,7 @@ def importTexturesFromBase(derive_folder_from_base = False, delete_base_texture
print(f"Prefix: {texture_name_without_channel} | Found in: {channel_name}")
else:
c4d.gui.MessageDialog("No regex match in base texture found in Material %s" % RSMaterial.GetMaterialName(), c4d.GEMB_ICONEXCLAMATION)
return
continue

if delete_base_texture:
RSMaterial.RemoveShader(base_color_tex)
Expand Down

0 comments on commit 767bcbd

Please sign in to comment.