Page MenuHome

LineArt: Fixing object loading iterator
ClosedPublic

Authored by YimingWu (NicksBest) on May 10 2022, 3:57 PM.

Details

Summary

This patch get rid of the _incorrectly used_ DG iterator in object loading, and uses scene objects iteration to prevent problems.

Diff Detail

Repository
rB Blender

Event Timeline

YimingWu (NicksBest) requested review of this revision.May 10 2022, 3:57 PM
YimingWu (NicksBest) created this revision.

I've updated the patch so it works a bit better now.

Things seems to work somewhat now.
However we need to do more work as add proper depsgraph relations when using the whole scene for example.
(And we need to discuss how to trigger updates when object visibility is affected, there seems like there is no way to do this currently)

We also should fix so that if you have an emitter object selected as the sole line art target, the emitted particles from that object should still be rendered.
Now the particles seems to be excluded because of the checks we do in lineart_usage_check.

YimingWu (NicksBest) commandeered this revision.May 11 2022, 7:26 AM

Oh actually I checked so it's like... the particle's visibility is connected to the instanced object/collection, so you can show/hide emitter and particles separately if you want, and the behaviour is consistent with the viewport. (Of course you need to enable "Instanced Objects" option.)

To me it's working correctly as-is now. It's just the add_relation part needs to always add the whole master collection because line art loads everything for visibility. Also, the lineart "exclude" option is already handled in add_relation.

I'll clean up the patch and update a new one.

Fixed add_relation, now handles full master collection correctly.

Updated for consistency in add_relation and line art computation. Only add relation for objects that are going to be needed in line art.

YimingWu (NicksBest) edited the summary of this revision. (Show Details)May 12 2022, 2:03 AM
This revision is now accepted and ready to land.May 13 2022, 5:43 PM
This revision was automatically updated to reflect the committed changes.

@Pratik Borhade (PratikPB2123) Hi there, this patch should probably be picked into 3.1 as well. Thanks!

Hi @YimingWu (NicksBest), you mean 3.2? then yes (but double check with developers before committing in 3.2)
3.1.2 was the last corrective release so no further bug fixes are expected in 3.1