Blender V5.0
bpy_geometry_set.cc File Reference
#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_GeometrySetpython_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_GeometrySetBPy_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 []

Detailed Description

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.

Function Documentation

◆ BPy_GeometrySet_dealloc()

void BPy_GeometrySet_dealloc ( BPy_GeometrySet * self)
static

Definition at line 78 of file bpy_geometry_set.cc.

References BKE_id_free(), and self.

◆ BPy_GeometrySet_get_curves()

PyObject * BPy_GeometrySet_get_curves ( BPy_GeometrySet * self,
void *  )
static

Definition at line 325 of file bpy_geometry_set.cc.

References pyrna_id_CreatePyObject(), and self.

◆ BPy_GeometrySet_get_grease_pencil()

PyObject * BPy_GeometrySet_get_grease_pencil ( BPy_GeometrySet * self,
void *  )
static

Definition at line 347 of file bpy_geometry_set.cc.

References pyrna_id_CreatePyObject(), and self.

◆ BPy_GeometrySet_get_instance_references()

◆ BPy_GeometrySet_get_instances_pointcloud()

◆ BPy_GeometrySet_get_mesh()

PyObject * BPy_GeometrySet_get_mesh ( BPy_GeometrySet * self,
void *  )
static

◆ BPy_GeometrySet_get_mesh_base()

PyObject * BPy_GeometrySet_get_mesh_base ( BPy_GeometrySet * self,
void *  )
static

Definition at line 301 of file bpy_geometry_set.cc.

References pyrna_id_CreatePyObject(), and self.

◆ BPy_GeometrySet_get_name()

PyObject * BPy_GeometrySet_get_name ( BPy_GeometrySet * self,
void *  )
static

Definition at line 263 of file bpy_geometry_set.cc.

References PyC_UnicodeFromStdStr(), and self.

◆ BPy_GeometrySet_get_pointcloud()

PyObject * BPy_GeometrySet_get_pointcloud ( BPy_GeometrySet * self,
void *  )
static

Definition at line 313 of file bpy_geometry_set.cc.

References pyrna_id_CreatePyObject(), and self.

◆ BPy_GeometrySet_get_volume()

PyObject * BPy_GeometrySet_get_volume ( BPy_GeometrySet * self,
void *  )
static

Definition at line 336 of file bpy_geometry_set.cc.

References pyrna_id_CreatePyObject(), and self.

◆ BPy_GeometrySet_new()

PyObject * BPy_GeometrySet_new ( PyTypeObject * ,
PyObject * args,
PyObject * kwds )
static

Definition at line 69 of file bpy_geometry_set.cc.

References python_object_from_geometry_set().

◆ BPy_GeometrySet_repr()

PyObject * BPy_GeometrySet_repr ( BPy_GeometrySet * self)
static

Definition at line 168 of file bpy_geometry_set.cc.

References PyC_UnicodeFromStdStr(), self, and str.

◆ BPy_GeometrySet_set_name()

int BPy_GeometrySet_set_name ( BPy_GeometrySet * self,
PyObject * value,
void *  )
static

Definition at line 268 of file bpy_geometry_set.cc.

References name, and self.

◆ BPy_GeometrySet_static_from_evaluated_object()

◆ BPyInit_geometry_set_type()

PyObject * BPyInit_geometry_set_type ( )
nodiscard

Definition at line 487 of file bpy_geometry_set.cc.

References bpy_geometry_set_Type.

Referenced by BPy_init_modules().

◆ PyDoc_STRVAR() [1/11]

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() [2/11]

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() [3/11]

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() [4/11]

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() [5/11]

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() [6/11]

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() [7/11]

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() [8/11]

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() [9/11]

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() [10/11]

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() [11/11]

PyDoc_STRVAR ( bpy_geometry_set_volume_doc ,
"The volume data-block in the geometry set.\n" "\n" ":type: :class:`bpy.types.Volume`\n"  )

◆ python_object_from_geometry_set()

BPy_GeometrySet * python_object_from_geometry_set ( GeometrySet geometry = {})
static

Variable Documentation

◆ bpy_geometry_set_Type

PyTypeObject bpy_geometry_set_Type

Definition at line 446 of file bpy_geometry_set.cc.

Referenced by BPyInit_geometry_set_type().

◆ BPy_GeometrySet_getseters

PyGetSetDef BPy_GeometrySet_getseters[]
static

Definition at line 353 of file bpy_geometry_set.cc.

◆ BPy_GeometrySet_methods

PyMethodDef BPy_GeometrySet_methods[]
static
Initial value:
= {
{"from_evaluated_object",
reinterpret_cast<PyCFunction>(BPy_GeometrySet_static_from_evaluated_object),
METH_VARARGS | METH_KEYWORDS | METH_STATIC,
bpy_geometry_set_from_evaluated_object_doc},
{"instances_pointcloud",
reinterpret_cast<PyCFunction>(BPy_GeometrySet_get_instances_pointcloud),
METH_NOARGS,
bpy_geometry_set_get_instances_pointcloud_doc},
{"instance_references",
reinterpret_cast<PyCFunction>(BPy_GeometrySet_get_instance_references),
METH_NOARGS,
bpy_geometry_set_get_instance_references_doc},
{nullptr, nullptr, 0, nullptr},
}
static BPy_GeometrySet * BPy_GeometrySet_static_from_evaluated_object(PyObject *, PyObject *args, PyObject *kwds)
static PyObject * BPy_GeometrySet_get_instances_pointcloud(BPy_GeometrySet *self)
static PyObject * BPy_GeometrySet_get_instance_references(BPy_GeometrySet *self)

Definition at line 417 of file bpy_geometry_set.cc.