[FEATURE REQUEST] - Using a collection of meshes for LED effect
Would it be possible to allow using a collection of mesh objects instead of a single object for the "Mesh" option of LED effect?
This would reduce the copying of LED effects for me and allow for better organization of LED effects. Joining multiple mesh objects into a single object is not a solution because then they can't be animated independently.
Related to #16 as both would require a redesign of how a mesh is associated to a light effect.
In theory this could be solved in three ways (not sure which one is possible with Blender's Python API):
- We could change the type of the associated mesh to accept either a single mesh or a Blender collection containing meshes. When the associated object is a collection, the lgiht effect evaluator would need to iterate over all meshes contained in the collection and evaluate containment for all of them. We need to keep open the possibility of letting the user choose between a containment test for all meshes vs any of the meshes as both options would have valid use-cases.
- If associating a collection or a mesh to a single Blender property is not possible, we would need to add another property to the light effect that lets the user pick a collection instead of a single mesh. Otherwise it would be the same as option 1 but with the added inconvenience of having two separate props, one for a single mesh and one for a collection.
- We could host a collection of meshes in the light effect itself. This is a backwards-incompatible change if we remove the single-mesh property and it would not allow the user to re-use the same mesh collection in multiple light effects.
@mrkvel If we added an option to select a collection instead of a single mesh only, would that solve the problem for you? This way we would not need to add widgets to manage the contents of the collection as you could build the collection in the Outliner.
@ntamas Thanks for looking into this. ad 1.) My idea was only to expand the single-mesh option to a collection of meshes by iterating the input collection. Right now I don't see any benefit in testing the containment for all meshes. ad 2.) I don't know how "painful" it would be for other users but could this be solved by forcing the user to use a collection? And then the containment test would be done against any of the meshes inside the collection. There would be more collections inside the outliner but it would also force the user to have a better "bookkeeping" of the meshes ad 3.) I would not go this way.
@mrkvel If we added an option to select a collection instead of a single mesh only, would that solve the problem for you? This way we would not need to add widgets to manage the contents of the collection as you could build the collection in the Outliner.
yes, this would work.