|
Blender V5.0
|
#include <sstream>#include "BKE_duplilist.hh"#include "BKE_geometry_set.hh"#include "BKE_geometry_set_instances.hh"#include "BKE_idtype.hh"#include "BKE_instances.hh"#include "BKE_lib_id.hh"#include "BKE_mesh_wrapper.hh"#include "BKE_pointcloud.hh"#include "DEG_depsgraph_query.hh"#include "DNA_ID.h"#include "DNA_collection_types.h"#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "DNA_pointcloud_types.h"#include "RNA_enum_types.hh"#include "RNA_prototypes.hh"#include "bpy_geometry_set.hh"#include "bpy_rna.hh"#include "../generic/py_capi_utils.hh"Go to the source code of this file.
Classes | |
| struct | BPy_GeometrySet |
Functions | |
| static BPy_GeometrySet * | python_object_from_geometry_set (GeometrySet geometry={}) |
| static PyObject * | BPy_GeometrySet_new (PyTypeObject *, PyObject *args, PyObject *kwds) |
| static void | BPy_GeometrySet_dealloc (BPy_GeometrySet *self) |
| PyDoc_STRVAR (bpy_geometry_set_from_evaluated_object_doc, ".. staticmethod:: from_evaluated_object(evaluated_object)\n" "\n" " Create a geometry set from the evaluated geometry of an evaluated object.\n" " Typically, it's more convenient to use :func:`bpy.types.Object.evaluated_geometry`.\n" "\n" " :arg evaluated_object: The evaluated object to create a geometry set from.\n" " :type evaluated_object: bpy.types.Object\n") | |
| static BPy_GeometrySet * | BPy_GeometrySet_static_from_evaluated_object (PyObject *, PyObject *args, PyObject *kwds) |
| static PyObject * | BPy_GeometrySet_repr (BPy_GeometrySet *self) |
| PyDoc_STRVAR (bpy_geometry_set_get_instances_pointcloud_doc, ".. method:: instances_pointcloud()\n" "\n" " Get a pointcloud that encodes information about the instances of the geometry.\n" " The returned pointcloud should not be modified.\n" " There is a point per instance and per-instance data is stored in point attributes.\n" " The local transforms are stored in the ``instance_transform`` attribute.\n" " The data instanced by each point is referenced by the ``.reference_index`` attribute,\n" " indexing into the list returned by :func:`bpy.types.GeometrySet.instance_references`.\n" "\n" " :rtype: bpy.types.PointCloud\n") | |
| static PyObject * | BPy_GeometrySet_get_instances_pointcloud (BPy_GeometrySet *self) |
| PyDoc_STRVAR (bpy_geometry_set_get_instance_references_doc, ".. method:: instance_references()\n" "\n" " This returns a list of geometries that is indexed by the ``.reference_index``\n" " attribute of the pointcloud returned by \n" " :func:`bpy.types.GeometrySet.instances_pointcloud`.\n" " It may contain other geometry sets, objects, collections and None values.\n" "\n" " :rtype: list[None | bpy.types.Object | bpy.types.Collection | bpy.types.GeometrySet]\n") | |
| static PyObject * | BPy_GeometrySet_get_instance_references (BPy_GeometrySet *self) |
| PyDoc_STRVAR (bpy_geometry_set_name_doc, "The name of the geometry set. It can be used for debugging purposes and is not unique.\n" "\n" ":type: str\n") | |
| static PyObject * | BPy_GeometrySet_get_name (BPy_GeometrySet *self, void *) |
| static int | BPy_GeometrySet_set_name (BPy_GeometrySet *self, PyObject *value, void *) |
| PyDoc_STRVAR (bpy_geometry_set_mesh_doc, "The mesh data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Mesh`\n") | |
| static PyObject * | BPy_GeometrySet_get_mesh (BPy_GeometrySet *self, void *) |
| PyDoc_STRVAR (bpy_geometry_set_mesh_base_doc, "The mesh data-block in the geometry set without final subdivision.\n" "\n" ":type: :class:`bpy.types.Mesh`\n") | |
| static PyObject * | BPy_GeometrySet_get_mesh_base (BPy_GeometrySet *self, void *) |
| PyDoc_STRVAR (bpy_geometry_set_pointcloud_doc, "The point cloud data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.PointCloud`\n") | |
| static PyObject * | BPy_GeometrySet_get_pointcloud (BPy_GeometrySet *self, void *) |
| PyDoc_STRVAR (bpy_geometry_set_curves_doc, "The curves data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Curves`\n") | |
| static PyObject * | BPy_GeometrySet_get_curves (BPy_GeometrySet *self, void *) |
| PyDoc_STRVAR (bpy_geometry_set_volume_doc, "The volume data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Volume`\n") | |
| static PyObject * | BPy_GeometrySet_get_volume (BPy_GeometrySet *self, void *) |
| PyDoc_STRVAR (bpy_geometry_set_grease_pencil_doc, "The Grease Pencil data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.GreasePencil`\n") | |
| static PyObject * | BPy_GeometrySet_get_grease_pencil (BPy_GeometrySet *self, void *) |
| PyDoc_STRVAR (bpy_geometry_set_doc, "Stores potentially multiple geometry components of different types.\n" "For example, it might contain a mesh, curves and nested instances.\n") | |
| PyObject * | BPyInit_geometry_set_type () |
Variables | |
| PyTypeObject | bpy_geometry_set_Type |
| static PyGetSetDef | BPy_GeometrySet_getseters [] |
| static PyMethodDef | BPy_GeometrySet_methods [] |
This file contains the bpy.types.GeometrySet Python API which is a wrapper for the internal GeometrySet type.
It's not implemented as RNA type because a GeometrySet is standalone (i.e. is not necessarily owned by anything else in Blender like an ID), is wrapping a DNA type and is itself a non-trivial owner of other data (like sub-geometries).
Definition in file bpy_geometry_set.cc.
|
static |
Definition at line 78 of file bpy_geometry_set.cc.
References BKE_id_free(), and self.
|
static |
Definition at line 325 of file bpy_geometry_set.cc.
References pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 347 of file bpy_geometry_set.cc.
References pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 221 of file bpy_geometry_set.cc.
References blender::bke::InstanceReference::Collection, blender::bke::InstanceReference::collection(), blender::bke::InstanceReference::geometry_set(), blender::bke::InstanceReference::GeometrySet, i, Collection::id, Span< T >::index_range(), blender::bke::InstanceReference::None, blender::bke::InstanceReference::Object, blender::bke::InstanceReference::object(), pyrna_id_CreatePyObject(), python_object_from_geometry_set(), blender::bke::Instances::references(), self, Span< T >::size(), and blender::bke::InstanceReference::type().
|
static |
Definition at line 189 of file bpy_geometry_set.cc.
References blender::bke::Instances::attributes(), BKE_pointcloud_new_nomain(), blender::bke::gather_attributes(), blender::bke::Instance, blender::bke::Instances::instances_num(), blender::bke::Point, pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 285 of file bpy_geometry_set.cc.
References BKE_mesh_wrapper_ensure_subdivision(), pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 301 of file bpy_geometry_set.cc.
References pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 263 of file bpy_geometry_set.cc.
References PyC_UnicodeFromStdStr(), and self.
|
static |
Definition at line 313 of file bpy_geometry_set.cc.
References pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 336 of file bpy_geometry_set.cc.
References pyrna_id_CreatePyObject(), and self.
|
static |
Definition at line 69 of file bpy_geometry_set.cc.
References python_object_from_geometry_set().
|
static |
Definition at line 168 of file bpy_geometry_set.cc.
References PyC_UnicodeFromStdStr(), self, and str.
|
static |
Definition at line 268 of file bpy_geometry_set.cc.
|
static |
Definition at line 97 of file bpy_geometry_set.cc.
References blender::bke::Instances::add_instance(), blender::bke::Instances::add_new_reference(), BKE_idtype_idcode_to_name(), DEG_get_depsgraph_by_id(), DEG_get_input_scene(), DEG_is_evaluated(), DEG_object_geometry_is_evaluated(), depsgraph, GS, ID_OB, blender::MatBase< float, 4, 4 >::identity(), Object::instance_collection, blender::bke::Instances::instances_num(), ID::name, OB_EMPTY, OB_TYPE_IS_GEOMETRY, object_duplilist_legacy_instances(), blender::bke::object_get_evaluated_geometry_set(), pyrna_id_FromPyObject(), python_object_from_geometry_set(), RNA_enum_name_from_value(), rna_enum_object_type_items, self, and Object::type.
|
nodiscard |
Definition at line 487 of file bpy_geometry_set.cc.
References bpy_geometry_set_Type.
Referenced by BPy_init_modules().
| PyDoc_STRVAR | ( | bpy_geometry_set_curves_doc | , |
| "The curves data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Curves`\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_doc | , |
| "Stores potentially multiple geometry components of different types.\n" "For | example, | ||
| it might contain a | mesh, | ||
| curves and nested instances.\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_from_evaluated_object_doc | , |
| ".. staticmethod:: from_evaluated_object(evaluated_object)\n" "\n" " Create a geometry set from the evaluated geometry of an evaluated object.\n" " | Typically, | ||
| it 's more convenient to use :func:`bpy.types.Object.evaluated_geometry`.\n" "\n" " :arg evaluated_object:The evaluated object to create a geometry set from.\n" " :type evaluated_object:bpy.types.Object\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_get_instance_references_doc | , |
| ".. method:: instance_references()\n" "\n" " This returns a list of geometries that is indexed by the ``.reference_index``\n" " attribute of the pointcloud returned by \n" " :func:`bpy.types.GeometrySet.instances_pointcloud`.\n" " It may contain other geometry | sets, | ||
| objects | , | ||
| collections and None values.\n" "\n" " :rtype:list\n" | [None|bpy.types.Object|bpy.types.Collection|bpy.types.GeometrySet] ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_get_instances_pointcloud_doc | , |
| ".. method:: instances_pointcloud()\n" "\n" " Get a pointcloud that encodes information about the instances of the geometry.\n" " The returned pointcloud should not be modified.\n" " There is a point per instance and per-instance data is stored in point attributes.\n" " The local transforms are stored in the ``instance_transform`` attribute.\n" " The data instanced by each point is referenced by the ``.reference_index`` | attribute, | ||
| \n" " indexing into the list returned by :func:`bpy.types.GeometrySet.instance_references`.\n" "\n" " :rtype:bpy.types.PointCloud\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_grease_pencil_doc | , |
| "The Grease Pencil data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.GreasePencil`\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_mesh_base_doc | , |
| "The mesh data-block in the geometry set without final subdivision.\n" "\n" ":type: :class:`bpy.types.Mesh`\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_mesh_doc | , |
| "The mesh data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Mesh`\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_name_doc | , |
| "The name of the geometry set. It can be used for debugging purposes and is not unique.\n" "\n" ":type: str\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_pointcloud_doc | , |
| "The point cloud data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.PointCloud`\n" | ) |
| PyDoc_STRVAR | ( | bpy_geometry_set_volume_doc | , |
| "The volume data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Volume`\n" | ) |
|
static |
Definition at line 53 of file bpy_geometry_set.cc.
Referenced by BPy_GeometrySet_get_instance_references(), BPy_GeometrySet_new(), and BPy_GeometrySet_static_from_evaluated_object().
| PyTypeObject bpy_geometry_set_Type |
Definition at line 446 of file bpy_geometry_set.cc.
Referenced by BPyInit_geometry_set_type().
|
static |
Definition at line 353 of file bpy_geometry_set.cc.
|
static |
Definition at line 417 of file bpy_geometry_set.cc.