Python API Docs: document when fields use mathutils types.
When accessing certain structure fields from Python, they return mathutils types instead of generic arrays (this is based on subtype). This exposes this information in the Python API documentation. Differential Revision: https://developer.blender.org/D16626
This commit is contained in:
@@ -1294,6 +1294,7 @@ def pycontext2sphinx(basepath):
|
||||
|
||||
type_descr = prop.get_type_description(
|
||||
class_fmt=":class:`bpy.types.%s`",
|
||||
mathutils_fmt=":class:`mathutils.%s`",
|
||||
collection_id=_BPY_PROP_COLLECTION_ID,
|
||||
enum_descr_override=enum_descr_override,
|
||||
)
|
||||
@@ -1446,6 +1447,7 @@ def pyrna2sphinx(basepath):
|
||||
identifier = " %s" % prop.identifier
|
||||
|
||||
kwargs["class_fmt"] = ":class:`%s`"
|
||||
kwargs["mathutils_fmt"] = ":class:`mathutils.%s`"
|
||||
|
||||
kwargs["collection_id"] = _BPY_PROP_COLLECTION_ID
|
||||
|
||||
@@ -1565,6 +1567,7 @@ def pyrna2sphinx(basepath):
|
||||
|
||||
type_descr = prop.get_type_description(
|
||||
class_fmt=":class:`%s`",
|
||||
mathutils_fmt=":class:`mathutils.%s`",
|
||||
collection_id=_BPY_PROP_COLLECTION_ID,
|
||||
enum_descr_override=enum_descr_override,
|
||||
)
|
||||
@@ -1631,6 +1634,7 @@ def pyrna2sphinx(basepath):
|
||||
|
||||
type_descr = prop.get_type_description(
|
||||
as_ret=True, class_fmt=":class:`%s`",
|
||||
mathutils_fmt=":class:`mathutils.%s`",
|
||||
collection_id=_BPY_PROP_COLLECTION_ID,
|
||||
enum_descr_override=enum_descr_override,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user