Discussion:
[Bf-python] Listing all data blocks in another .blend file
Arnaud Couturier
2014-09-18 21:56:26 UTC
Permalink
Hello,
I'm new to this list, so please forgive my mistakes if I use it incorrectly
^^'

I need to link all the groups that follow a naming convention, from another
blend file. And without having to know all of them in advance, so I can
add/update/remove groups in the library blend file, without touching the
linking code logic.

Is it possible ?
I haven't found anything about this in the Python API.

I added a request on the wiki
http://wiki.blender.org/index.php/Dev:Ref/Requests/Python2.6
(bottom of the page)
I'm not sure if it's the right place...

Thank you in advance
Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-python/attachments/20140919/5e9ba0c2/attachment.htm
Bassam Kurdali
2014-09-18 23:06:42 UTC
Permalink
I believe so, check out the docs:
http://www.blender.org/documentation/blender_python_api_2_71_0/bpy.types.BlendDataLibraries.html?highlight=library
specifically look at the line that starts with

# link all objects starting with 'A'

in the examples. I think that should be what you need (with your own
filtering code instead of just looking for that one letter)
Post by Arnaud Couturier
Hello,
I'm new to this list, so please forgive my mistakes if I use it
incorrectly ^^'
I need to link all the groups that follow a naming convention, from
another blend file. And without having to know all of them in advance,
so I can add/update/remove groups in the library blend file, without
touching the linking code logic.
Is it possible ?
I haven't found anything about this in the Python API.
I added a request on the wiki
http://wiki.blender.org/index.php/Dev:Ref/Requests/Python2.6
(bottom of the page)
I'm not sure if it's the right place...
Thank you in advance
Arnaud
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python
Arnaud Couturier
2014-09-19 00:02:54 UTC
Permalink
Thank you very much for the quick and precise answer!

I tested it, and that is exactly what I need indeed.
Excellent.
I removed the useless feature request from the wiki.

Cheers :)
Arnaud
Post by Bassam Kurdali
http://www.blender.org/documentation/blender_python_api_2_71_0/bpy.types.BlendDataLibraries.html?highlight=library
specifically look at the line that starts with
# link all objects starting with 'A'
in the examples. I think that should be what you need (with your own
filtering code instead of just looking for that one letter)
Post by Arnaud Couturier
Hello,
I'm new to this list, so please forgive my mistakes if I use it
incorrectly ^^'
I need to link all the groups that follow a naming convention, from
another blend file. And without having to know all of them in advance,
so I can add/update/remove groups in the library blend file, without
touching the linking code logic.
Is it possible ?
I haven't found anything about this in the Python API.
I added a request on the wiki
http://wiki.blender.org/index.php/Dev:Ref/Requests/Python2.6
(bottom of the page)
I'm not sure if it's the right place...
Thank you in advance
Arnaud
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-python/attachments/20140919/fdd9e588/attachment.htm
Loading...