Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Model {
private @Nullable ResourcePath<Model> parent;
private Map<String, TextureVariable> textures = new HashMap<>();
private Element @Nullable [] elements;
private boolean ambientocclusion = true;
@Getter(AccessLevel.NONE) private Boolean ambientocclusion;

private transient boolean culling = false;
private transient boolean occluding = false;
Expand Down Expand Up @@ -101,6 +101,10 @@ public synchronized void applyParent(ResourcePool<Model> modelPool) {
if (parent != null) {
parent.applyParent(modelPool);

if (this.ambientocclusion == null && parent.ambientocclusion != null) {
this.ambientocclusion = parent.ambientocclusion;
}

parent.textures.forEach(this::applyTextureVariable);
if (this.elements == null && parent.elements != null) {
this.elements = new Element[parent.elements.length];
Expand Down Expand Up @@ -150,4 +154,9 @@ public synchronized void calculateProperties(ResourcePool<Texture> texturePool)
}
}

public boolean isAmbientocclusion() {
if (ambientocclusion == null) return true;
return ambientocclusion;
}

}
Loading