PyAPI: support returning non ID types when accessing Context.property
Previously accessing properties without an associated ID would return None, even when the non-ID data was available. Ref !116981
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
"""
|
||||
Get the property associated with a hovered button.
|
||||
Returns a tuple of the datablock, data path to the property, and array index.
|
||||
Returns a tuple of the data-block, data path to the property, and array index.
|
||||
|
||||
.. note::
|
||||
|
||||
When the property doesn't have an associated :class:`bpy.types.ID` non-ID data may be returned.
|
||||
This may occur when accessing windowing data, for example, operator properties.
|
||||
"""
|
||||
|
||||
# Example inserting keyframe for the hovered property.
|
||||
|
||||
@@ -1217,7 +1217,7 @@ context_type_map = {
|
||||
"particle_settings": ("ParticleSettings", False),
|
||||
"particle_system": ("ParticleSystem", False),
|
||||
"particle_system_editable": ("ParticleSystem", False),
|
||||
"property": ("(:class:`bpy.types.ID`, :class:`string`, :class:`int`)", False),
|
||||
"property": ("(:class:`bpy.types.AnyType`, :class:`string`, :class:`int`)", False),
|
||||
"pointcloud": ("PointCloud", False),
|
||||
"pose_bone": ("PoseBone", False),
|
||||
"pose_object": ("Object", False),
|
||||
|
||||
Reference in New Issue
Block a user