Blender Git Loki

Git Commits -> Revision a3f48d6

Revision a3f48d6 by Alexander Romanov (datablock_idprops)
March 21, 2017, 14:23 (GMT)
Datablock ID Properties

Summary:
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

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

Maniphest Tasks: T37754

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

Commit Details:

Full Hash: a3f48d65df19ff4c0dd4e83e2d19493318001b7a
Parent Commit: a0f16e1
Lines Changed: +952, -132

1 Added Path:

/tests/python/bl_pyapi_datablock_idprop.py (+334, -0) (View)

34 Modified Paths:

/source/blender/blenkernel/BKE_idprop.h (+11, -2) (Diff)
/source/blender/blenkernel/BKE_library_query.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/idprop.c (+118, -14) (Diff)
/source/blender/blenkernel/intern/library_query.c (+78, -14) (Diff)
/source/blender/blenkernel/intern/library_remap.c (+11, -7) (Diff)
/source/blender/blenloader/intern/readfile.c (+99, -16) (Diff)
/source/blender/editors/include/UI_interface.h (+1, -1) (Diff)
/source/blender/editors/interface/interface.c (+1, -1) (Diff)
/source/blender/editors/interface/interface_intern.h (+1, -1) (Diff)
/source/blender/editors/interface/interface_layout.c (+2, -1) (Diff)
/source/blender/editors/interface/interface_regions.c (+11, -7) (Diff)
/source/blender/editors/interface/interface_templates.c (+6, -1) (Diff)
/source/blender/editors/interface/interface_utils.c (+5, -5) (Diff)
/source/blender/editors/object/object_relations.c (+31, -0) (Diff)
/source/blender/makesdna/DNA_ID.h (+0, -2) (Diff)
/source/blender/makesrna/intern/rna_access.c (+48, -18) (Diff)
/source/blender/makesrna/intern/rna_define.c (+10, -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 (+3, -2) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_userdef.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 (+14, -0) (Diff)
/source/blender/python/intern/bpy_props.c (+107, -28) (Diff)
/source/blender/python/intern/bpy_props.h (+4, -0) (Diff)
/source/blender/python/intern/bpy_rna.c (+32, -10) (Diff)
/source/blender/python/intern/bpy_rna.h (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+1, -0) (Diff)
/source/creator/creator.c (+1, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+1, -0) (Diff)
/tests/python/CMakeLists.txt (+6, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021