11#include "COLLADAFWColorOrTexture.h"
12#include "COLLADAFWFloatOrDoubleArray.h"
13#include "COLLADAFWGeometry.h"
14#include "COLLADAFWMeshPrimitive.h"
15#include "COLLADAFWTypes.h"
16#include "COLLADASWEffectProfile.h"
67extern void bc_update_scene(BlenderContext &blender_context,
float ctime);
115 std::string channel_type,
116 std::string axis_name,
117 std::string axis_separator =
"_");
137 bool apply_modifiers,
161 size_t i = s.rfind(probe);
162 if (i != std::string::npos) {
163 return (s.substr(i + probe.length(), s.length() - i));
170 size_t i = s.find(probe);
171 if (i != std::string::npos) {
172 return s.substr(0, i);
177inline bool bc_startswith(std::string
const &value, std::string
const &starting)
179 if (starting.size() > value.size()) {
182 return (value.substr(0, starting.size()) == starting);
185inline bool bc_endswith(
const std::string &value,
const std::string &ending)
187 if (ending.size() > value.size()) {
191 return value.compare(value.size() - ending.size(), ending.size(), ending) == 0;
195inline bool bc_endswith(std::string
const &value, std::string
const &ending)
197 if (ending.size() > value.size()) {
200 return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
205 const std::string &pattern,
206 const std::string &replacement);
216 bool scale_to_scene);
221extern void bc_decompose(
float mat[4][4],
float *loc,
float eul[3],
float quat[4],
float *
size);
243extern int bc_set_layer(
int bitfield,
int layer,
bool enable);
248 return fabsf(a -
b) < range;
253void bc_copy_m4d_v44(
double (&r)[4][4], std::vector<std::vector<double>> &a);
254void bc_copy_v44_m4d(std::vector<std::vector<double>> &r,
double (&a)[4][4]);
296 const Matrix &from_mat,
324 float from_mat[4][4],
325 bool use_local_space);
329 std::vector<Object *> base_objects;
334 base_objects.push_back(ob);
339 std::vector<Object *>::iterator it = std::find(base_objects.begin(), base_objects.end(), ob);
340 return (it != base_objects.end());
345 return base_objects.size();
350 return base_objects[index];
355 std::vector<unsigned int> normal_indices;
360 normal_indices.push_back(index);
365 return normal_indices[i];
378 std::vector<std::string> bone_collections;
381 bool has_custom_tail;
382 bool has_custom_roll;
424 std::map<std::string, BoneExtensionMap *> extended_bone_maps;
453 Color &default_color,
454 bool with_alpha =
true);
456COLLADASW::ColorOrTexture
bc_get_cot(
float r,
float g,
float b,
float a);
std::map< int, const BCMatrix * > BCMatrixSampleMap
General operations, lookup, etc. for blender objects.
Object is a sort of wrapper for general info.
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 Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves 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 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 Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture 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 camera
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void add_index(unsigned int index)
unsigned int operator[](unsigned int i)
void set_use_connect(int use_connect)
void set_roll(float roll)
const std::vector< std::string > & get_bone_collections()
void set_name(char *aName)
void set_bone_collections(std::vector< std::string > bone_collections)
void set_tail(const float vec[])
void set_leaf_bone(bool state)
BoneExtended(EditBone *aBone)
void set_chain_length(int aLength)
BoneExtensionMap & getExtensionMap(bArmature *armature)
bool contains(Object *ob)
std::set< Object * > BCObjectSet
Object * bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
COLLADASW::ColorOrTexture bc_get_specular(Material *ma)
COLLADASW::ColorOrTexture bc_get_ambient(Material *ma)
void bc_copy_farray_m4(float *r, float a[4][4])
const char * bc_CustomData_get_active_layer_name(const CustomData *data, eCustomDataType type)
bool bc_is_root_bone(Bone *aBone, bool deform_bones_only)
double bc_get_alpha(Material *ma)
AnimData * bc_getSceneLightAnimData(Object *ob)
float bc_get_property(Bone *bone, std::string key, float def)
bool bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space=true)
bNode * bc_get_master_shader(Material *ma)
std::vector< bAction * > bc_getSceneActions(const bContext *C, Object *ob, bool all_actions)
COLLADASW::ColorOrTexture bc_get_cot(float r, float g, float b, float a)
AnimData * bc_getSceneCameraAnimData(Object *ob)
IDProperty * bc_get_IDProperty(Bone *bone, std::string key)
constexpr int LIMITTED_PRECISION
COLLADASW::ColorOrTexture bc_get_emission(Material *ma)
COLLADASW::ColorOrTexture bc_get_reflective(Material *ma)
const char * bc_CustomData_get_layer_name(const CustomData *data, eCustomDataType type, int n)
bool bc_in_range(float a, float b, float range)
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)
std::map< std::string, Image * > KeyImageMap
bool bc_endswith(const std::string &value, const std::string &ending)
void bc_copy_m4d_v44(double(&r)[4][4], std::vector< std::vector< double > > &a)
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])
std::map< COLLADAFW::TextureMapId, std::vector< MTex * > > TexIndexTextureArrayMap
void bc_set_IDProperty(EditBone *ebone, const char *key, float value)
bAction * bc_getSceneObjectAction(Object *ob)
AnimData * bc_getSceneMaterialAnimData(Material *ma)
Object * bc_get_assigned_armature(Object *ob)
void bc_add_global_transform(Matrix &to_mat, const Matrix &from_mat, const BCMatrix &global_transform, bool invert=false)
std::string bc_string_after(const std::string &s, const std::string probe)
std::string bc_string_before(const std::string &s, const std::string probe)
void bc_add_default_shader(bContext *C, Material *ma)
bool bc_startswith(std::string const &value, std::string const &starting)
Object * bc_add_armature(COLLADAFW::Node *node, ExtraTags *node_extra_tags, Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
void bc_set_IDPropertyMatrix(EditBone *ebone, const char *key, float mat[4][4])
bool bc_is_animated(BCMatrixSampleMap &values)
int bc_set_layer(int bitfield, int layer, bool enable)
void bc_triangulate_mesh(Mesh *mesh)
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)
Mesh * bc_get_mesh_copy(BlenderContext &blender_context, Object *ob, BC_export_mesh_type export_mesh_type, bool apply_modifiers, bool triangulate)
std::string bc_url_encode(std::string data)
bool bc_has_animations(Scene *sce, LinkNode *export_set)
double bc_get_shininess(Material *ma)
bool bc_get_property_matrix(Bone *bone, std::string key, float mat[4][4])
COLLADASW::ColorOrTexture bc_get_cot_from_shader(bNode *shader, std::string nodeid, Color &default_color, bool with_alpha=true)
COLLADASW::ColorOrTexture bc_get_base_color(Material *ma)
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="_")
float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray &array, unsigned int index)
double bc_get_ior(Material *ma)
void bc_copy_v44_m4d(std::vector< std::vector< double > > &r, double(&a)[4][4])
void bc_update_scene(BlenderContext &blender_context, float ctime)
void bc_sanitize_v3(double v[3], int precision)
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_apply_global_transform(Matrix &to_mat, const BCMatrix &global_transform, bool invert=false)
std::map< COLLADAFW::UniqueId, Image * > UidImageMap
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)
std::map< std::string, BoneExtended * > BoneExtensionMap
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)
bool bc_is_leaf_bone(Bone *bone)
int bc_test_parent_loop(Object *par, Object *ob)
EditBone * bc_get_edit_bone(bArmature *armature, char *name)
local_group_size(16, 16) .push_constant(Type b
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)