Skip to content

Commit

Permalink
#7004 Ensure outliner only adds enabled render components
Browse files Browse the repository at this point in the history
  • Loading branch information
MAG-AdrianMeredith committed Oct 3, 2024
1 parent fd974ee commit 3989cfc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/extras/renderers/outline-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,16 @@ class OutlineRenderer {

const renders = recursive ? entity.findComponents('render') : (entity.render ? [entity.render] : []);
renders.forEach((render) => {
meshInstances.push(...render.meshInstances);
if (render.entity.enabled && render.enabled) {
meshInstances.push(...render.meshInstances);
}
});

const models = recursive ? entity.findComponents('model') : (entity.model ? [entity.model] : []);
models.forEach((model) => {
meshInstances.push(...model.meshInstances);
if (model.entity.enabled && model.enabled) {
meshInstances.push(...model.meshInstances);
}
});

return meshInstances;
Expand Down

0 comments on commit 3989cfc

Please sign in to comment.