Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] - Using a collection of meshes for LED effect #17

Open
MartinMerkl opened this issue Mar 22, 2024 · 5 comments
Open

Comments

@MartinMerkl
Copy link

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.
image

@MartinMerkl MartinMerkl changed the title [FEATURE REQUEST] - [FEATURE REQUEST] - Using a collection of meshes for LED effect Mar 22, 2024
@ntamas
Copy link
Member

ntamas commented Mar 25, 2024

Related to #16 as both would require a redesign of how a mesh is associated to a light effect.

@ntamas
Copy link
Member

ntamas commented Mar 25, 2024

In theory this could be solved in three ways (not sure which one is possible with Blender's Python API):

  1. 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.
  2. 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.
  3. 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.

@ntamas
Copy link
Member

ntamas commented Mar 25, 2024

@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.

@MartinMerkl
Copy link
Author

@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.

@MartinMerkl
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants