remove unused variants

remove unused variants

quirin.friedl
Enthusiast Enthusiast
524 Views
2 Replies
Message 1 of 3

remove unused variants

quirin.friedl
Enthusiast
Enthusiast

Hi Forum,

 

am I right that there is no good way of deleting unused variants (variants that not referenced in any variant set any more)?

 

I don't find anything in the UI and I also have a hard time solving it in Python, as I don't find a method to select all variants that are in the scene and then iterate through them. Also nothing to access them via name or delete or anything. Or am I missing something essential here?

 

If you keep on working with existing scenes, the list of variants just grows and grows, which is nasty but can also create issues when you export your variants to another software.

0 Likes
525 Views
2 Replies
Replies (2)
Message 2 of 3

seiferp
Community Manager
Community Manager

Not sure if I understand your question correctly. Are you talking about variants that show in the variants module but not part of the scene anymore? Or do you want to clean up variant sets that contain variants that are not in the scene anymore? There is a clear and create all in the context menu of the variant module. Not sure if it helps in your case.

Message 3 of 3

quirin.friedl
Enthusiast
Enthusiast

Thanks Pascal for your quick reply. I thought my variant sets will break when I clear and recreate. I wasnt aware of this, pretty cool!

 

This basically does what I needed, yet not 100%. "Create all" creates variants of all (node and material) switches and transform variants I have in my scene, correct? But if I create a geometry variant for a node that is not a switch, it will not recreate it, which means my variant set will be broken after the clear.

 

To describe again what I want to achieve: First part is correct, I want to get rid of "variants that show in the variants module but not part of the scene anymore". But I also want to get rid of variants that are in the scene but don't occur in any variant set and are therefore never used. The latter is more for cosmetic reasons and not that important.

0 Likes