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

[OOT] Fix wrong segments on import #275

Closed
wants to merge 4 commits into from
Closed
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
10 changes: 8 additions & 2 deletions fast64_internal/oot/oot_model_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,21 @@ def processDLName(self, name):
except:
if name == "gEmptyDL":
return None
return name
else:
for attr_name in dir(self.materialContext.ootMaterial.opaque):
if re.match("segment[89ABCD]", attr_name):
setattr(self.materialContext.ootMaterial.opaque, attr_name, False)
for attr_name in dir(self.materialContext.ootMaterial.transparent):
if re.match("segment[89ABCD]", attr_name):
setattr(self.materialContext.ootMaterial.transparent, attr_name, False)
return name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would like an explanation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to admit, I didn't look at it 4Head

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the loop is different tho, should I zip it?

else:
segment = pointer >> 24
if segment >= 0x08 and segment <= 0x0D:
setattr(self.materialContext.ootMaterial.opaque, "segment" + format(segment, "1X"), True)
setattr(self.materialContext.ootMaterial.transparent, "segment" + format(segment, "1X"), True)
self.materialChanged = True
return None
return name

def processTextureName(self, textureName):
try:
Expand Down