Blender Git Loki

Git Commits -> Revision a7b3047

Revision a7b3047 by Alexander Romanov (master)
April 13, 2017, 09:33 (GMT)
Datablock ID Properties

The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.

In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.

Original author: @artfunkel

Alexander (Blend4Web Team)

Reviewers: brecht, artfunkel, mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne

Maniphest Tasks: T37754

Differential Revision: https://developer.blender.org/D113

Commit Details:

Full Hash: a7b3047cefcbfae4d8b13e15026497fd5ae92730
Parent Commit: f90a243
Lines Changed: +983, -204

1 Added Path:

/tests/python/bl_pyapi_idprop_datablock.py (+338, -0) (View)

28 Modified Paths:

/source/blender/blenkernel/BKE_idprop.h (+8, -5) (Diff)
/source/blender/blenkernel/BKE_library.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_library_query.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/idprop.c (+82, -35) (Diff)
/source/blender/blenkernel/intern/library_query.c (+106, -13) (Diff)
/source/blender/blenkernel/intern/library_remap.c (+13, -17) (Diff)
/source/blender/blenkernel/intern/node.c (+1, -1) (Diff)
/source/blender/blenloader/intern/readfile.c (+145, -74) (Diff)
/source/blender/editors/object/object_relations.c (+29, -0) (Diff)
/source/blender/makesdna/DNA_ID.h (+0, -2) (Diff)
/source/blender/makesrna/intern/rna_access.c (+59, -17) (Diff)
/source/blender/makesrna/intern/rna_define.c (+13, -0) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+5, -1) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+1, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+2, -0) (Diff)
/source/blender/makesrna/RNA_define.h (+1, -0) (Diff)
/source/blender/makesrna/RNA_types.h (+2, -0) (Diff)
/source/blender/python/generic/idprop_py_api.c (+21, -0) (Diff)
/source/blender/python/intern/bpy_props.c (+107, -26) (Diff)
/source/blender/python/intern/bpy_props.h (+4, -0) (Diff)
/source/blender/python/intern/bpy_rna.c (+34, -10) (Diff)
/source/blender/python/intern/bpy_rna.h (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm.c (+1, -1) (Diff)
/tests/python/CMakeLists.txt (+4, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021