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.
The patch also fixes an oversight in `readfile.c`'s `test_pointer_array`. It assumed that the length of pointers in the array was the same as the file in general's, but in an array which has been saved blindly by a version of Blender unaware that it held pointers it might not be. This led to a crash when saving a blend in a 64-bit build, re-saving it in a 32-bit build without this patch applied, then loading it in the 64-bit build again. To fix this the function now takes an optional "items" param from which it deduces the array's actual pointer size.
Original author: @artfunkel
Alexander (Blend4Web Team)