Page MenuHome

Fix inconsistencies in materials between objects and obdata due to placeholders generation for missing libdata.
ClosedPublic

Authored by Bastien Montagne (mont29) on Tue, Aug 6, 6:01 PM.

Details

Summary

This patch is a quick attempt to fix the crashes caused by mismatch between materials count in objects and obdata, due to placeholders generation for missing libdata.

This is a rather brute-force approach, but at least it is simple and quiet reliable I think.

Note that we cannot do that when generating the obdata placeholder, as not all objects using it might be already loaded... So this has to be done near the end of the reading/linking process anyway. We could add a new tag for obdata that would need that processing, but don't think it would be worth it?

Diff Detail

Repository
rB Blender

Event Timeline

Is there a way to avoid the loop over all datablocks?

This stuff gets expensive if we do it for many specific issues like this.

Better (less brute-force) approach to fix materials issues from placeholders.

Is there a way to avoid the loop over all datablocks?
This stuff gets expensive if we do it for many specific issues like this.

Yeah, you are totally right, should have seen this immediately... We can just loop once on the objects, and do the thing if their obdata is a placeholder. Much simpler and efficient.

This revision is now accepted and ready to land.Mon, Aug 12, 11:15 AM