Blender  V2.93
Classes | Macros | Typedefs | Functions | Variables
mesh_convert.c File Reference
#include "CLG_log.h"
#include "MEM_guardedalloc.h"
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_pointcloud_types.h"
#include "DNA_scene_types.h"
#include "BLI_edgehash.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
#include "BKE_key.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_curve.h"
#include "BKE_object.h"
#include "BKE_pointcloud.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"

Go to the source code of this file.

Classes

struct  EdgeLink
 
struct  VertLink
 

Macros

#define ASSERT_IS_VALID_MESH(mesh)
 

Typedefs

typedef struct EdgeLink EdgeLink
 
typedef struct VertLink VertLink
 

Functions

void BKE_mesh_from_metaball (ListBase *lb, Mesh *me)
 
static void make_edges_mdata_extend (MEdge **r_alledge, int *r_totedge, const MPoly *mpoly, MLoop *mloop, const int totpoly)
 
int BKE_mesh_nurbs_to_mdata (Object *ob, MVert **r_allvert, int *r_totvert, MEdge **r_alledge, int *r_totedge, MLoop **r_allloop, MPoly **r_allpoly, int *r_totloop, int *r_totpoly)
 
int BKE_mesh_nurbs_displist_to_mdata (Object *ob, const ListBase *dispbase, MVert **r_allvert, int *r_totvert, MEdge **r_alledge, int *r_totedge, MLoop **r_allloop, MPoly **r_allpoly, MLoopUV **r_alluv, int *r_totloop, int *r_totpoly)
 
MeshBKE_mesh_new_nomain_from_curve_displist (Object *ob, ListBase *dispbase)
 
MeshBKE_mesh_new_nomain_from_curve (Object *ob)
 
void BKE_mesh_from_nurbs_displist (Main *bmain, Object *ob, ListBase *dispbase, const char *obdata_name, bool temporary)
 
void BKE_mesh_from_nurbs (Main *bmain, Object *ob)
 
static void prependPolyLineVert (ListBase *lb, unsigned int index)
 
static void appendPolyLineVert (ListBase *lb, unsigned int index)
 
void BKE_mesh_to_curve_nurblist (const Mesh *me, ListBase *nurblist, const int edge_users_test)
 
void BKE_mesh_to_curve (Main *bmain, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob)
 
void BKE_pointcloud_from_mesh (Mesh *me, PointCloud *pointcloud)
 
void BKE_mesh_to_pointcloud (Main *bmain, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob)
 
void BKE_mesh_from_pointcloud (const PointCloud *pointcloud, Mesh *me)
 
void BKE_mesh_edges_set_draw_render (Mesh *mesh)
 
void BKE_pointcloud_to_mesh (Main *bmain, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob)
 
static Objectobject_for_curve_to_mesh_create (Object *object)
 
static void curve_to_mesh_eval_ensure (Object *object)
 
static Meshmesh_new_from_curve_type_object (Object *object)
 
static Meshmesh_new_from_mball_object (Object *object)
 
static Meshmesh_new_from_mesh (Object *object, Mesh *mesh)
 
static Meshmesh_new_from_mesh_object_with_layers (Depsgraph *depsgraph, Object *object, const bool preserve_origindex)
 
static Meshmesh_new_from_mesh_object (Depsgraph *depsgraph, Object *object, const bool preserve_all_data_layers, const bool preserve_origindex)
 
MeshBKE_mesh_new_from_object (Depsgraph *depsgraph, Object *object, const bool preserve_all_data_layers, const bool preserve_origindex)
 
static int foreach_libblock_make_original_callback (LibraryIDLinkCallbackData *cb_data)
 
static int foreach_libblock_make_usercounts_callback (LibraryIDLinkCallbackData *cb_data)
 
MeshBKE_mesh_new_from_object_to_bmain (Main *bmain, Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers)
 
static void add_shapekey_layers (Mesh *mesh_dest, Mesh *mesh_src)
 
MeshBKE_mesh_create_derived_for_modifier (struct Depsgraph *depsgraph, Scene *scene, Object *ob_eval, ModifierData *md_eval, const bool build_shapekey_layers)
 
static void shapekey_layers_to_keyblocks (Mesh *mesh_src, Mesh *mesh_dst, int actshape_uid)
 
void BKE_mesh_nomain_to_mesh (Mesh *mesh_src, Mesh *mesh_dst, Object *ob, const CustomData_MeshMasks *mask, bool take_ownership)
 
void BKE_mesh_nomain_to_meshkey (Mesh *mesh_src, Mesh *mesh_dst, KeyBlock *kb)
 

Variables

static CLG_LogRef LOG = {"bke.mesh_convert"}
 

Macro Definition Documentation

◆ ASSERT_IS_VALID_MESH

#define ASSERT_IS_VALID_MESH (   mesh)

Definition at line 72 of file mesh_convert.c.

Typedef Documentation

◆ EdgeLink

typedef struct EdgeLink EdgeLink

◆ VertLink

typedef struct VertLink VertLink

Function Documentation

◆ add_shapekey_layers()

static void add_shapekey_layers ( Mesh mesh_dest,
Mesh mesh_src 
)
static

◆ appendPolyLineVert()

static void appendPolyLineVert ( ListBase lb,
unsigned int  index 
)
static

Definition at line 732 of file mesh_convert.c.

References BLI_addtail(), VertLink::index, and MEM_callocN.

Referenced by BKE_mesh_to_curve_nurblist().

◆ BKE_mesh_create_derived_for_modifier()

Mesh* BKE_mesh_create_derived_for_modifier ( struct Depsgraph depsgraph,
Scene scene,
Object ob_eval,
ModifierData md_eval,
const bool  build_shapekey_layers 
)

◆ BKE_mesh_edges_set_draw_render()

void BKE_mesh_edges_set_draw_render ( Mesh mesh)

Definition at line 983 of file mesh_convert.c.

References MEdge::flag, ME_EDGEDRAW, ME_EDGERENDER, Mesh::medge, mesh, and Mesh::totedge.

Referenced by object_convert_exec().

◆ BKE_mesh_from_metaball()

void BKE_mesh_from_metaball ( ListBase lb,
Mesh me 
)

◆ BKE_mesh_from_nurbs()

void BKE_mesh_from_nurbs ( Main bmain,
Object ob 
)

Definition at line 703 of file mesh_convert.c.

References Object::data, and NULL.

◆ BKE_mesh_from_nurbs_displist()

void BKE_mesh_from_nurbs_displist ( Main bmain,
Object ob,
ListBase dispbase,
const char *  obdata_name,
bool  temporary 
)

◆ BKE_mesh_from_pointcloud()

void BKE_mesh_from_pointcloud ( const PointCloud pointcloud,
Mesh me 
)

◆ BKE_mesh_new_from_object()

Mesh* BKE_mesh_new_from_object ( Depsgraph depsgraph,
Object object,
const bool  preserve_all_data_layers,
const bool  preserve_origindex 
)

◆ BKE_mesh_new_from_object_to_bmain()

Mesh* BKE_mesh_new_from_object_to_bmain ( Main bmain,
Depsgraph depsgraph,
Object object,
bool  preserve_all_data_layers 
)

◆ BKE_mesh_new_nomain_from_curve()

Mesh* BKE_mesh_new_nomain_from_curve ( Object ob)

◆ BKE_mesh_new_nomain_from_curve_displist()

Mesh* BKE_mesh_new_nomain_from_curve_displist ( Object ob,
ListBase dispbase 
)

◆ BKE_mesh_nomain_to_mesh()

void BKE_mesh_nomain_to_mesh ( Mesh mesh_src,
Mesh mesh_dst,
Object ob,
const CustomData_MeshMasks mask,
bool  take_ownership 
)

◆ BKE_mesh_nomain_to_meshkey()

void BKE_mesh_nomain_to_meshkey ( Mesh mesh_src,
Mesh mesh_dst,
KeyBlock kb 
)

◆ BKE_mesh_nurbs_displist_to_mdata()

int BKE_mesh_nurbs_displist_to_mdata ( Object ob,
const ListBase dispbase,
MVert **  r_allvert,
int *  r_totvert,
MEdge **  r_alledge,
int *  r_totedge,
MLoop **  r_allloop,
MPoly **  r_allpoly,
MLoopUV **  r_alluv,
int *  r_totloop,
int *  r_totpoly 
)

◆ BKE_mesh_nurbs_to_mdata()

int BKE_mesh_nurbs_to_mdata ( Object ob,
MVert **  r_allvert,
int *  r_totvert,
MEdge **  r_alledge,
int *  r_totedge,
MLoop **  r_allloop,
MPoly **  r_allpoly,
int *  r_totloop,
int *  r_totpoly 
)

◆ BKE_mesh_to_curve()

void BKE_mesh_to_curve ( Main bmain,
Depsgraph depsgraph,
Scene UNUSEDscene,
Object ob 
)

◆ BKE_mesh_to_curve_nurblist()

void BKE_mesh_to_curve_nurblist ( const Mesh me,
ListBase nurblist,
const int  edge_users_test 
)

◆ BKE_mesh_to_pointcloud()

void BKE_mesh_to_pointcloud ( Main bmain,
Depsgraph depsgraph,
Scene UNUSEDscene,
Object ob 
)

◆ BKE_pointcloud_from_mesh()

void BKE_pointcloud_from_mesh ( Mesh me,
PointCloud pointcloud 
)

◆ BKE_pointcloud_to_mesh()

void BKE_pointcloud_to_mesh ( Main bmain,
Depsgraph depsgraph,
Scene UNUSEDscene,
Object ob 
)

◆ curve_to_mesh_eval_ensure()

static void curve_to_mesh_eval_ensure ( Object object)
static

◆ foreach_libblock_make_original_callback()

static int foreach_libblock_make_original_callback ( LibraryIDLinkCallbackData cb_data)
static

◆ foreach_libblock_make_usercounts_callback()

static int foreach_libblock_make_usercounts_callback ( LibraryIDLinkCallbackData cb_data)
static

◆ make_edges_mdata_extend()

static void make_edges_mdata_extend ( MEdge **  r_alledge,
int *  r_totedge,
const MPoly mpoly,
MLoop mloop,
const int  totpoly 
)
static

◆ mesh_new_from_curve_type_object()

static Mesh* mesh_new_from_curve_type_object ( Object object)
static

◆ mesh_new_from_mball_object()

static Mesh* mesh_new_from_mball_object ( Object object)
static

◆ mesh_new_from_mesh()

static Mesh* mesh_new_from_mesh ( Object object,
Mesh mesh 
)
static

◆ mesh_new_from_mesh_object()

static Mesh* mesh_new_from_mesh_object ( Depsgraph depsgraph,
Object object,
const bool  preserve_all_data_layers,
const bool  preserve_origindex 
)
static

◆ mesh_new_from_mesh_object_with_layers()

static Mesh* mesh_new_from_mesh_object_with_layers ( Depsgraph depsgraph,
Object object,
const bool  preserve_origindex 
)
static

◆ object_for_curve_to_mesh_create()

static Object* object_for_curve_to_mesh_create ( Object object)
static

◆ prependPolyLineVert()

static void prependPolyLineVert ( ListBase lb,
unsigned int  index 
)
static

Definition at line 725 of file mesh_convert.c.

References BLI_addhead(), VertLink::index, and MEM_callocN.

Referenced by BKE_mesh_to_curve_nurblist().

◆ shapekey_layers_to_keyblocks()

static void shapekey_layers_to_keyblocks ( Mesh mesh_src,
Mesh mesh_dst,
int  actshape_uid 
)
static

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"bke.mesh_convert"}
static