Grim-es / material-combiner-addon

Blender addon for material combining, uv bounds fixing
MIT License
451 stars 36 forks source link

Limit material list to only visible objects #57

Closed Mysteryem closed 10 months ago

Mysteryem commented 1 year ago

Checking Object.hide_get isn't enough to determine if an Object is hidden as it could also be disabled globally in the viewport (can be checked with Object.hide_viewport) or all the Collections the Object is in could be hidden either temporarily or globally, which would also hide the Object. Object.visible_get can be used to test if an Object is visible, taking into account all visibility settings, alternatively, given a screen Context, Context.visible_objects provides access to all Objects visible in that Context, which is what this PR uses.