Skip to main content
added 36 characters in body
Source Link
Zhaie
  • 155
  • 9

So i'm working on a addon.

  • I'm creating Collections in the process and this collections (name) are store in enum ( so the user can load and unload it ).
  • I'm using collection name to find the collection, but if the user change it it wont work anymore.
  • So i could create an attribute on this collection, like : {addonname : Collection Name}
  • But that mean every time I'm loading the addon ( or every time the user is changing the name of a collection ) I had to check on all collections in blend file to refresh my enum. That's feel dirty to me.

I'm creating Collections in the process and this collections are store in enum ( so the user can load and unload it ). The question is this : I'm using collection name to find the collection, but if the user change it it wont work anymore. So i could create an attribute on this collection, like : {addonnameThe Question is : Collection Name} But that mean every time I'm loading the addon ( or every time the user is changing the name of a collection ) I had to check on all collections in blend file to refresh my enum. That's feel dirty to me. So isIs there an other way to reference a collection ? (I'm still new to python and Blender so there is probably things I don't think of )

So i'm working on a addon.

I'm creating Collections in the process and this collections are store in enum ( so the user can load and unload it ). The question is this : I'm using collection name to find the collection, but if the user change it it wont work anymore. So i could create an attribute on this collection, like : {addonname : Collection Name} But that mean every time I'm loading the addon ( or every time the user is changing the name of a collection ) I had to check on all collections in blend file to refresh my enum. That's feel dirty to me. So is there an other way to reference a collection ? (I'm still new to python and Blender so there is probably things I don't think of )

So i'm working on a addon.

  • I'm creating Collections in the process and this collections (name) are store in enum ( so the user can load and unload it ).
  • I'm using collection name to find the collection, but if the user change it it wont work anymore.
  • So i could create an attribute on this collection, like : {addonname : Collection Name}
  • But that mean every time I'm loading the addon ( or every time the user is changing the name of a collection ) I had to check on all collections in blend file to refresh my enum. That's feel dirty to me.

The Question is : Is there an other way to reference a collection ? (I'm still new to python and Blender so there is probably things I don't think of )

Source Link
Zhaie
  • 155
  • 9

Find "Type" of Object / Collection

So i'm working on a addon.

I'm creating Collections in the process and this collections are store in enum ( so the user can load and unload it ). The question is this : I'm using collection name to find the collection, but if the user change it it wont work anymore. So i could create an attribute on this collection, like : {addonname : Collection Name} But that mean every time I'm loading the addon ( or every time the user is changing the name of a collection ) I had to check on all collections in blend file to refresh my enum. That's feel dirty to me. So is there an other way to reference a collection ? (I'm still new to python and Blender so there is probably things I don't think of )