8 #include "COLLADABUPlatform.h"
10 #include "COLLADAFWGeometry.h"
11 #include "COLLADAFWMeshPrimitive.h"
12 #include "COLLADAFWMeshVertexData.h"
71 if (index >=
array.getValuesCount()) {
75 if (
array.getType() == COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT) {
76 return array.getFloatValues()->getData()[index];
79 return array.getDoubleValues()->getData()[index];
103 if (cti ==
nullptr) {
128 const bool xmirror =
false;
129 const bool keep_transform =
false;
131 if (par && is_parent_space) {
136 nullptr,
C,
scene, ob, par, partype, xmirror, keep_transform,
nullptr);
142 std::vector<bAction *> actions;
151 actions.push_back(act);
156 actions.push_back(action);
164 std::string channel_type,
165 std::string axis_name,
166 std::string axis_separator)
168 std::string
result = action_name +
"_" + channel_type;
169 if (ob_name.length() > 0) {
172 if (axis_name.length() > 0) {
173 result += axis_separator + axis_name;
180 Main *bmain = blender_context.get_main();
210 bool apply_modifiers,
214 Mesh *tmpmesh =
nullptr;
215 if (apply_modifiers) {
217 switch (export_mesh_type) {
229 Scene *scene_eval = blender_context.get_evaluated_scene();
230 Object *ob_eval = blender_context.get_evaluated_object(ob);
291 for (current = export_set; current->
next; current = current->
next) {
295 if (strcmp(
a->id.name,
b->id.name) > 0) {
306 if (deform_bones_only) {
307 Bone *root =
nullptr;
315 return (aBone == root);
336 const std::string &pattern,
337 const std::string &replacement)
340 while ((
pos =
data.find(pattern,
pos)) != std::string::npos) {
341 data.replace(
pos, pattern.length(), replacement);
342 pos += replacement.length();
349 if (scale_to_scene) {
360 for (
Object *ob : *objects_done) {
361 if (ob->parent ==
nullptr) {
391 float mat_from[4][4];
405 bool use_beauty =
false;
406 bool tag_only =
false;
415 bm_from_me_params.calc_vert_normal =
true;
454 int bit = 1u << layer;
468 std::string key = armature->
id.
name;
472 extended_bone_maps[key] =
result;
479 std::map<std::string, BoneExtensionMap *>::iterator map_it;
480 for (map_it = extended_bone_maps.begin(); map_it != extended_bone_maps.end(); ++map_it) {
482 for (
auto &extended_bone : *extended_bones) {
483 delete extended_bone.second;
485 extended_bones->clear();
486 delete extended_bones;
498 this->chain_length = 0;
499 this->is_leaf =
false;
500 this->tail[0] = 0.0f;
501 this->tail[1] = 0.5f;
502 this->tail[2] = 0.0f;
503 this->use_connect = -1;
505 this->bone_layers = 0;
507 this->has_custom_tail =
false;
508 this->has_custom_roll =
false;
528 chain_length = aLength;
544 this->has_custom_roll =
true;
549 return this->has_custom_roll;
559 this->tail[0] = vec[0];
560 this->tail[1] = vec[1];
561 this->tail[2] = vec[2];
562 this->has_custom_tail =
true;
567 return this->has_custom_tail;
577 if (s.empty() || ((!isdigit(s[0])) && (s[0] !=
'-') && (s[0] !=
'+'))) {
582 strtol(s.c_str(), &p, 10);
589 std::stringstream ss(layerString);
593 while (ss >> layer) {
597 pos = atoi(layer.c_str());
598 if (
pos >= 0 &&
pos < 32) {
605 pos = find(layer_labels.begin(), layer_labels.end(), layer) - layer_labels.begin();
606 if (
pos >= layer_labels.size()) {
607 layer_labels.push_back(layer);
612 "Too many layers in Import. Layer %s mapped to Blender layer 31\n",
628 std::ostringstream ss;
629 for (
int i = 0; i < 32; i++) {
630 if (bit & bitfield) {
642 return (bone_layers == 0) ? 1 : bone_layers;
647 this->use_connect = use_connect;
652 return this->use_connect;
658 if (idgroup ==
nullptr) {
661 ebone->
prop = idgroup;
670 for (
int i = 0; i < 4; i++) {
671 for (
int j = 0; j < 4; j++) {
672 array[4 * i + j] = mat[i][j];
710 switch (property->type) {
730 if (property && property->type ==
IDP_ARRAY && property->len == 16) {
732 for (
int i = 0; i < 4; i++) {
733 for (
int j = 0; j < 4; j++) {
734 mat[i][j] =
array[4 * i + j];
768 char bone_name_esc[
sizeof(((
Bone *)
nullptr)->name) * 2];
770 BLI_snprintf(prefix,
sizeof(prefix),
"pose.bones[\"%s\"]", bone_name_esc);
818 temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
825 temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
836 static float MIN_DISTANCE = 0.00001;
838 if (values.size() < 2) {
842 BCMatrixSampleMap::iterator it;
844 for (it = values.begin(); it != values.end(); ++it) {
845 const BCMatrix *matrix = it->second;
847 if (refmat ==
nullptr) {
852 if (!matrix->
in_range(*refmat, MIN_DISTANCE)) {
903 const Matrix &from_mat,
912 const Vector &from_vec,
953 float from_mat[4][4],
954 bool use_local_space)
959 static const float V0[3] = {0, 0, 0};
961 if (!
has_custom_props(bone, export_settings.get_keep_bind_info(),
"restpose_loc") &&
962 !
has_custom_props(bone, export_settings.get_keep_bind_info(),
"restpose_rot") &&
963 !
has_custom_props(bone, export_settings.get_keep_bind_info(),
"restpose_scale")) {
972 if (export_settings.get_keep_bind_info()) {
975 if (use_local_space && bone->
parent) {
988 if (export_settings.get_keep_bind_info()) {
1000 if (export_settings.get_keep_bind_info()) {
1009 for (
int i = 0; i < 3; i++) {
1018 for (
int i = 0; i < 3; i++) {
1025 for (
int i = 0; i < 4; i++) {
1026 for (
int j = 0; j < 4; j++) {
1034 for (
int i = 0; i < 4; i++) {
1035 for (
int j = 0; j < 4; j++) {
1043 for (
int i = 0; i < 4; i++) {
1044 for (
int j = 0; j < 4; j++) {
1052 for (
int i = 0; i < 4; i++) {
1053 for (
int j = 0; j < 4; j++) {
1061 for (
int i = 0; i < 4; i++) {
1062 for (
int j = 0; j < 4; j++) {
1077 return std::string(layer_name);
1099 if (num_layers && layer < num_layers) {
1102 return std::string(layer_name);
1122 if (
label.length() > 0) {
1153 node_group_input_verify(
ntree, inputGroup, (
ID *)
ntree);
1174 node_group_output_verify(
ntree, outputGroup, (
ID *)
ntree);
1186 bc_group_add_input_socket(gtree, nmap[
"main"], 0,
"Diffuse");
1187 bc_group_add_input_socket(gtree, nmap[
"emission"], 0,
"Emission");
1188 bc_group_add_input_socket(gtree, nmap[
"mix"], 0,
"Transparency");
1189 bc_group_add_input_socket(gtree, nmap[
"emission"], 1,
"Emission");
1190 bc_group_add_input_socket(gtree, nmap[
"main"], 4,
"Metallic");
1191 bc_group_add_input_socket(gtree, nmap[
"main"], 5,
"Specular");
1193 bc_group_add_output_socket(gtree, nmap[
"mix"], 0,
"Shader");
1209 std::map<std::string, bNode *> nmap;
1226 bc_make_group(
C,
ntree, nmap);
1237 Color default_color = {ma->
r, ma->
g, ma->
b, 1.0};
1248 Color default_color = {0, 0, 0, 1};
1254 double emission_strength = 0.0;
1256 if (emission_strength == 0.0) {
1264 double final_color[3] = {
col.getRed(),
col.getGreen(),
col.getBlue()};
1268 double max_color = fmax(fmax(final_color[0], final_color[1]), final_color[2]);
1269 if (max_color > 1.0) {
1273 cot.getColor().set(final_color[0], final_color[1], final_color[2],
col.getAlpha());
1280 Color default_color = {0, 0, 0, 1.0};
1286 Color default_color = {0, 0, 0, 1.0};
1292 Color default_color = {0, 0, 0, 1.0};
1298 double alpha = ma->
a;
1328 double reflectivity = ma->
spec;
1333 return reflectivity;
1341 val = (
double)ref->
value;
1349 Color &default_color,
1359 return bc_get_cot(default_color, with_alpha);
1378 COLLADASW::ColorOrTexture cot(
color);
1385 COLLADASW::ColorOrTexture cot(
color);
typedef float(TangentPoint)[2]
std::map< int, const BCMatrix * > BCMatrixSampleMap
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
bool BKE_collection_object_add(struct Main *bmain, struct Collection *collection, struct Object *ob)
const bConstraintTypeInfo * BKE_constraint_typeinfo_get(struct bConstraint *con)
struct Scene * CTX_data_scene(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
int CustomData_get_active_layer_index(const struct CustomData *data, int type)
int CustomData_number_of_layers(const struct CustomData *data, int type)
const CustomData_MeshMasks CD_MASK_MESH
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
struct IDProperty * IDP_GetPropertyFromGroup(const struct IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
struct Key * BKE_key_from_object(struct Object *ob)
struct LayerCollection * BKE_layer_collection_get_active(struct ViewLayer *view_layer)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
void BKE_view_layer_base_select_and_set_active(struct ViewLayer *view_layer, struct Base *selbase)
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, int flag)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
void BKE_mesh_tessface_ensure(struct Mesh *mesh)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
#define SH_NODE_MIX_SHADER
struct bNode * ntreeFindType(const struct bNodeTree *ntree, int type)
#define SH_NODE_BSDF_PRINCIPLED
#define SH_NODE_ADD_SHADER
struct bNodeSocket * ntreeAddSocketInterfaceFromSocket(struct bNodeTree *ntree, struct bNode *from_node, struct bNodeSocket *from_sock)
#define SH_NODE_BSDF_TRANSPARENT
#define SH_NODE_OUTPUT_MATERIAL
struct bNodeLink * nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock)
struct bNodeSocket * nodeFindSocket(const struct bNode *node, eNodeSocketInOut in_out, const char *identifier)
struct bNodeTree * ntreeAddTree(struct Main *bmain, const char *name, const char *idname)
struct bNode * nodeAddStaticNode(const struct bContext *C, struct bNodeTree *ntree, int type)
General operations, lookup, etc. for blender objects.
void * BKE_object_obdata_add_from_type(struct Main *bmain, int type, const char *name) ATTR_NONNULL(1)
void BKE_object_apply_mat4(struct Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
void BKE_scene_frame_set(struct Scene *scene, float frame)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
double double_round(double x, int ndigits)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
bool invert_m4(float R[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void loc_eulO_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3], short order)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void mat4_to_size(float size[3], const float M[4][4])
void mat4_to_eul(float eul[3], const float mat[4][4])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void mat4_to_quat(float q[4], const float mat[4][4])
void quat_to_mat4(float mat[4][4], const float q[4])
MINLINE void mul_v3db_db(double r[3], double f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
#define STREQLEN(a, b, n)
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
@ MOD_TRIANGULATE_QUAD_SHORTEDGE
Object is a sort of wrapper for general info.
bool ED_object_parent_set(struct ReportList *reports, const struct bContext *C, struct Scene *scene, struct Object *const ob, struct Object *const par, int partype, bool xmirror, bool keep_transform, const int vert_par[3])
void ED_update_for_newframe(struct Main *bmain, struct Depsgraph *depsgraph)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color or the default fallback if none is specified Separate Split a vector into its and Z components Generates normals with round corners and may slow down renders Vector Displace the surface along an arbitrary direction White Return a random value or color based on an input seed Float Map an input float to a curve and outputs a float value Separate Color
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
ATTR_WARN_UNUSED_RESULT BMesh * bm
const BMAllocTemplate bm_mesh_allocsize_default
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const struct BMeshCreateParams *params)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshParams *params)
void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMeshParams *params)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void BM_mesh_triangulate(BMesh *bm, const int quad_method, const int ngon_method, const int min_vertices, const bool tag_only, BMOperator *op, BMOpSlot *slot_facemap_out, BMOpSlot *slot_facemap_double_out)
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void add_transform(Matrix &to, const Matrix &transform, const Matrix &from, bool inverted=false)
void get_matrix(DMatrix &matrix, bool transposed=false, int precision=-1) const
void apply_transform(Matrix &to, const Matrix &transform, const Matrix &from, bool inverse=false)
bool in_range(const BCMatrix &other, float distance) const
void set_use_connect(int use_connect)
void set_roll(float roll)
void set_name(char *aName)
void set_tail(const float vec[])
void set_leaf_bone(bool state)
void set_bone_layers(std::string layers, std::vector< std::string > &layer_labels)
BoneExtended(EditBone *aBone)
void set_chain_length(int aLength)
BoneExtensionMap & getExtensionMap(bArmature *armature)
float(& get_rotation())[4]
std::string translate_id(const char *idString)
COLLADASW::ColorOrTexture bc_get_specular(Material *ma)
COLLADASW::ColorOrTexture bc_get_ambient(Material *ma)
bool bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
void bc_copy_farray_m4(float *r, float a[4][4])
bool bc_is_root_bone(Bone *aBone, bool deform_bones_only)
Mesh * bc_get_mesh_copy(BlenderContext &blender_context, Object *ob, BC_export_mesh_type export_mesh_type, bool apply_modifiers, bool triangulate)
double bc_get_alpha(Material *ma)
void bc_triangulate_mesh(Mesh *me)
COLLADASW::ColorOrTexture bc_get_cot_from_shader(bNode *shader, std::string nodeid, Color &default_color, bool with_alpha)
float bc_get_property(Bone *bone, std::string key, float def)
void bc_add_global_transform(Matrix &to_mat, const Matrix &from_mat, const BCMatrix &global_transform, const bool invert)
void bc_copy_v44_m4d(std::vector< std::vector< double >> &r, double(&a)[4][4])
void bc_sanitize_v3(float v[3], int precision)
IDProperty * bc_get_IDProperty(Bone *bone, std::string key)
COLLADASW::ColorOrTexture bc_get_cot(float r, float g, float b, float a)
bool bc_has_animations(Object *ob)
void bc_apply_global_transform(Matrix &to_mat, const BCMatrix &global_transform, const bool invert)
COLLADASW::ColorOrTexture bc_get_emission(Material *ma)
COLLADASW::ColorOrTexture bc_get_reflective(Material *ma)
static bool has_custom_props(Bone *bone, bool enabled, std::string key)
bNode * bc_get_master_shader(Material *ma)
static std::string bc_get_uvlayer_name(Mesh *me, int layer)
bool isInteger(const std::string &s)
void bc_rotate_from_reference_quat(float quat_to[4], float quat_from[4], float mat_to[4][4])
double bc_get_reflectivity(Material *ma)
EditBone * bc_get_edit_bone(bArmature *armature, char *name)
std::vector< bAction * > bc_getSceneActions(const bContext *C, Object *ob, bool all_actions)
void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene)
void bc_get_property_vector(Bone *bone, std::string key, float val[3], const float def[3])
void bc_add_default_shader(bContext *C, Material *ma)
static bNodeTree * prepare_material_nodetree(Material *ma)
static void bc_node_add_link(bNodeTree *ntree, bNode *from_node, int from_index, bNode *to_node, int to_index)
void bc_set_IDPropertyMatrix(EditBone *ebone, const char *key, float mat[4][4])
bool bc_is_animated(BCMatrixSampleMap &values)
void bc_create_restpose_mat(BCExportSettings &export_settings, Bone *bone, float to_mat[4][4], float from_mat[4][4], bool use_local_space)
bool bc_get_float_from_shader(bNode *shader, double &val, std::string nodeid)
int bc_get_active_UVLayer(Object *ob)
void bc_bubble_sort_by_Object_name(LinkNode *export_set)
bool bc_validateConstraints(bConstraint *con)
std::string bc_url_encode(std::string data)
Object * bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
double bc_get_shininess(Material *ma)
bool bc_get_property_matrix(Bone *bone, std::string key, float mat[4][4])
COLLADASW::ColorOrTexture bc_get_base_color(Material *ma)
Object * bc_get_assigned_armature(Object *ob)
float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray &array, unsigned int index)
double bc_get_ior(Material *ma)
static std::string bc_get_active_uvlayer_name(Mesh *me)
int bc_set_layer(int bitfield, int layer)
void bc_update_scene(BlenderContext &blender_context, float ctime)
static bNode * bc_add_node(bContext *C, bNodeTree *ntree, int node_type, int locx, int locy, std::string label)
std::string bc_replace_string(std::string data, const std::string &pattern, const std::string &replacement)
bool bc_bone_matrix_local_get(Object *ob, Bone *bone, Matrix &mat, bool for_opensim)
void bc_copy_darray_m4d(double *r, double a[4][4])
void bc_decompose(float mat[4][4], float *loc, float eul[3], float quat[4], float *size)
void bc_copy_m4_farray(float r[4][4], float *a)
bool bc_has_object_type(LinkNode *export_set, short obtype)
void bc_enable_fcurves(bAction *act, char *bone_name)
std::string bc_get_action_id(std::string action_name, std::string ob_name, std::string channel_type, std::string axis_name, std::string axis_separator)
bool bc_is_leaf_bone(Bone *bone)
void bc_copy_m4d_v44(double(&r)[4][4], std::vector< std::vector< double >> &a)
int bc_test_parent_loop(Object *par, Object *ob)
bAction * bc_getSceneObjectAction(Object *ob)
char * bc_CustomData_get_active_layer_name(const CustomData *data, int type)
void bc_set_IDProperty(EditBone *ebone, const char *key, float value)
bAction * bc_getSceneLightAction(Object *ob)
char * bc_CustomData_get_layer_name(const CustomData *data, int type, int n)
bAction * bc_getSceneCameraAction(Object *ob)
std::map< std::string, BoneExtended * > BoneExtensionMap
const Depsgraph * depsgraph
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static bNode * node_group_make_from_selected(const bContext &C, bNodeTree &ntree, const char *ntype, const char *ntreetype)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken ior("ior", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
bNodeSocket * node_group_output_find_socket(bNode *node, const char *identifier)
bNodeSocket * node_group_input_find_socket(bNode *node, const char *identifier)
struct Collection * collection
struct bNodeTree * nodetree
void(* evaluate_constraint)(struct bConstraint *con, struct bConstraintOb *cob, struct ListBase *targets)
struct bPoseChannel * parent
struct IDPropertyTemplate::@27 array
ccl_device_inline int mod(int x, int m)