Blender Git Loki

Blender Git "tmp-id-users" branch commits.

January 6, 2016, 18:39 (GMT)
Move pyrna_set_to_enum_bitmap to bpy_rna.c
January 6, 2016, 18:33 (GMT)
Fix docstring and broken logic (inversion between key and value filtering).
January 6, 2016, 18:32 (GMT)
Link to valid set values
January 6, 2016, 18:25 (GMT)
Merge branch 'master' into tmp-id-users
January 6, 2016, 18:09 (GMT)
Correction to last commit and add docstring
January 6, 2016, 17:58 (GMT)
Add key and value type filters

allows for eg:

bpy.data.user_map(key_types={'MESH'}, value_types={'OBJECT', 'MATERIAL'})

Without this, return values could get very large.
January 6, 2016, 17:01 (GMT)
de-duplicate some checks
January 6, 2016, 17:01 (GMT)
Correct docstring.
January 6, 2016, 16:49 (GMT)
Edits to the docstring
January 6, 2016, 16:41 (GMT)
Add error-checking on PySequence_Fast result.
January 6, 2016, 16:37 (GMT)
Rename 'iter' since this is no longer an iterator
January 6, 2016, 16:20 (GMT)
Fix leak when wrong args passed
January 6, 2016, 16:16 (GMT)
Minor edits, comments, cleanup & style
January 6, 2016, 15:16 (GMT)
Merge branch 'master' into tmp-id-users
January 6, 2016, 15:14 (GMT)
Address suggestions and comments from review.
January 5, 2016, 18:23 (GMT)
Avoid re-creating a pyobject for each and every ID just to check dict key.

Nice hack suggested by Campbell. :)
January 5, 2016, 16:11 (GMT)
Move Py-side of 'users of ID' from rna to bpy.

Note that I kept 'user_of_id' in RNA for now (this one is not an issue re looping over whole main),
but not really sure it's that useful in the end, we could just keep the bpy dict generator I guess...
January 5, 2016, 08:41 (GMT)
'users of ID' API (from id-remap).

This adds iterator over all (ID) users of a given datablock.
Mostly handy through the associated RNA API.

Note that it also had to fix an issue with RNA using DNA's ListBase struct (this
works OK with py, but breaks with cpp due to missing include - and we do not want to have to
include a DNA header just for that ;) ).

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1678
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021