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

Fix MTL conversion bug with Mineways MTLs #397

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions MCprep_addon/world_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,13 @@ def convert_mtl(filepath):
mtl = filepath.rsplit(".", 1)[0] + '.mtl'
lines = None
copied_file = None
with open(mtl, 'r') as mtl_file:
lines = mtl_file.readlines()

try:
with open(mtl, 'r') as mtl_file:
StandingPadAnimations marked this conversation as resolved.
Show resolved Hide resolved
lines = mtl_file.readlines()
except Exception as e:
StandingPadAnimations marked this conversation as resolved.
Show resolved Hide resolved
print(e)
return False

if bpy.context.scene.view_settings.view_transform in BUILTIN_SPACES:
return None
Expand Down