Blender  V3.3
Functions
MeshImporter.cpp File Reference
#include <algorithm>
#include <iostream>
#include "COLLADABUPlatform.h"
#include "COLLADAFWMeshPrimitive.h"
#include "COLLADAFWMeshVertexData.h"
#include "COLLADAFWPolygons.h"
#include "MEM_guardedalloc.h"
#include "BKE_customdata.h"
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_lib_id.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BLI_edgehash.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "ArmatureImporter.h"
#include "MeshImporter.h"
#include "collada_utils.h"

Go to the source code of this file.

Functions

template<class T >
static std::string bc_get_dae_name (T *node)
 
static const char * bc_primTypeToStr (COLLADAFW::MeshPrimitive::PrimitiveType type)
 
static const char * bc_geomTypeToStr (COLLADAFW::Geometry::GeometryType type)
 
template<typename T >
static void colladaAddColor (T values, MLoopCol *mloopcol, int v_index, int stride)
 
static std::string extract_vcolname (const COLLADAFW::String &collada_id)
 
static bool bc_has_same_material_configuration (Object *ob1, Object *ob2)
 
static void bc_copy_materials_to_data (Object *ob, Mesh *me)
 
static void bc_remove_materials_from_object (Object *ob, Mesh *me)
 

Function Documentation

◆ bc_copy_materials_to_data()

static void bc_copy_materials_to_data ( Object ob,
Mesh me 
)
static

Caution here: This code assumes that all materials are assigned to Object and no material is assigned to Data. That is true right after the objects have been imported.

Definition at line 906 of file MeshImporter.cpp.

References Mesh::mat, Object::mat, Object::matbits, and Object::totcol.

Referenced by MeshImporter::optimize_material_assignements().

◆ bc_geomTypeToStr()

static const char* bc_geomTypeToStr ( COLLADAFW::Geometry::GeometryType  type)
static

Definition at line 67 of file MeshImporter.cpp.

References type.

Referenced by MeshImporter::write_geometry().

◆ bc_get_dae_name()

template<class T >
static std::string bc_get_dae_name ( T node)
static

Definition at line 37 of file MeshImporter.cpp.

References node.

Referenced by MeshImporter::write_geometry().

◆ bc_has_same_material_configuration()

static bool bc_has_same_material_configuration ( Object ob1,
Object ob2 
)
static

this function checks if both objects have the same materials assigned to Object (in the same order) returns true if condition matches, otherwise false;

Definition at line 876 of file MeshImporter.cpp.

References Object::mat, Object::matbits, and Object::totcol.

Referenced by MeshImporter::optimize_material_assignements().

◆ bc_primTypeToStr()

static const char* bc_primTypeToStr ( COLLADAFW::MeshPrimitive::PrimitiveType  type)
static

Definition at line 42 of file MeshImporter.cpp.

References type.

◆ bc_remove_materials_from_object()

static void bc_remove_materials_from_object ( Object ob,
Mesh me 
)
static

Remove all references to materials from the object

Definition at line 919 of file MeshImporter.cpp.

References Object::mat, Object::matbits, and Object::totcol.

Referenced by MeshImporter::optimize_material_assignements().

◆ colladaAddColor()

template<typename T >
static void colladaAddColor ( T  values,
MLoopCol mloopcol,
int  v_index,
int  stride 
)
static

◆ extract_vcolname()

static std::string extract_vcolname ( const COLLADAFW::String &  collada_id)
static

Definition at line 398 of file MeshImporter.cpp.