15 #include "COLLADAFWArrayPrimitiveType.h"
16 #include "COLLADAFWCamera.h"
17 #include "COLLADAFWColorOrTexture.h"
18 #include "COLLADAFWIndexList.h"
19 #include "COLLADAFWLibraryNodes.h"
20 #include "COLLADAFWLight.h"
21 #include "COLLADAFWMeshPrimitiveWithFaceVertexCount.h"
22 #include "COLLADAFWPolygons.h"
23 #include "COLLADAFWRoot.h"
24 #include "COLLADAFWSampler.h"
25 #include "COLLADAFWStableHeaders.h"
26 #include "COLLADAFWTypes.h"
27 #include "COLLADAFWVisualScene.h"
29 #include "COLLADASaxFWLIExtraDataCallbackHandler.h"
30 #include "COLLADASaxFWLLoader.h"
83 : import_settings(import_settings),
84 mImportStage(Fetching_Scene_data),
87 armature_importer(&unit_converter,
101 TagsMap::iterator etit;
102 etit = uid_tags_map.begin();
103 while (etit != uid_tags_map.end()) {
112 COLLADASaxFWL::Loader loader(&errorHandler);
113 COLLADAFW::Root root(&loader,
this);
116 loader.registerExtraDataCallbackHandler(ehandler);
121 std::string mFilename = std::string(this->import_settings->
filepath);
122 const std::string encodedFilename =
bc_url_encode(mFilename);
123 if (!root.loadDocument(encodedFilename)) {
124 fprintf(stderr,
"COLLADAFW::Root::loadDocument() returned false on 1st pass\n");
136 COLLADASaxFWL::Loader loader2;
137 COLLADAFW::Root root2(&loader2,
this);
139 if (!root2.loadDocument(encodedFilename)) {
140 fprintf(stderr,
"COLLADAFW::Root::loadDocument() returned false on 2nd pass\n");
176 std::vector<Object *> *objects_to_scale =
new std::vector<Object *>();
179 std::vector<const COLLADAFW::VisualScene *>::iterator sit;
180 for (sit = vscenes.begin(); sit != vscenes.end(); sit++) {
206 fprintf(stdout,
"Collada: Adjusting Blender units to Importset units: %f.\n", unit_factor);
210 fprintf(stderr,
"+-- Import Scene --------\n");
211 const COLLADAFW::NodePointerArray &roots = (*sit)->getRootNodes();
212 for (
unsigned int i = 0; i < roots.getCount(); i++) {
213 std::vector<Object *> *objects_done =
write_node(roots[i],
nullptr, sce,
nullptr,
false);
214 objects_to_scale->insert(
215 objects_to_scale->end(), objects_done->begin(), objects_done->end());
227 armature_importer.fix_animation();
230 for (
const COLLADAFW::VisualScene *vscene : vscenes) {
231 const COLLADAFW::NodePointerArray &roots = vscene->getRootNodes();
233 for (
unsigned int i = 0; i < roots.getCount(); i++) {
238 if (!libnode_ob.empty()) {
240 fprintf(stderr,
"| Cleanup: free %d library nodes\n", (
int)libnode_ob.size());
242 std::vector<Object *>::iterator it;
243 for (it = libnode_ob.begin(); it != libnode_ob.end(); it++) {
252 delete objects_to_scale;
261 COLLADAFW::Node *par =
nullptr,
273 if (root_map.find(par->getUniqueId()) == root_map.end()) {
274 root_map[
node->getUniqueId()] =
node;
277 root_map[
node->getUniqueId()] = root_map[par->getUniqueId()];
282 COLLADAFW::Transformation::TransformationType
types[] = {
283 COLLADAFW::Transformation::ROTATE,
284 COLLADAFW::Transformation::SCALE,
285 COLLADAFW::Transformation::TRANSLATE,
286 COLLADAFW::Transformation::MATRIX,
293 if (
node->getType() == COLLADAFW::Node::JOINT && par ==
nullptr) {
301 node, root_map, object_map, FW_object_map, uid_material_map);
302 COLLADAFW::NodePointerArray &children =
node->getChildNodes();
303 for (i = 0; i < children.getCount(); i++) {
311 const char AUTORING_TOOL[] =
"authoring_tool";
312 const std::string BLENDER(
"Blender ");
313 const COLLADAFW::FileInfo::ValuePairPointerArray &valuePairs = asset->getValuePairArray();
314 for (
size_t i = 0,
count = valuePairs.getCount(); i <
count; i++) {
315 const COLLADAFW::FileInfo::ValuePair *valuePair = valuePairs[i];
316 const COLLADAFW::String &key = valuePair->first;
317 const COLLADAFW::String &value = valuePair->second;
318 if (key == AUTORING_TOOL) {
319 if (value.compare(0, BLENDER.length(), BLENDER) == 0) {
321 std::string
v = value.substr(BLENDER.length());
324 return v.substr(0, n);
347 const COLLADAFW::UniqueId &cam_uid =
camera->getInstanciatedObjectId();
348 if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) {
355 Camera *cam = uid_camera_map[cam_uid];
364 const COLLADAFW::UniqueId &lamp_uid =
lamp->getInstanciatedObjectId();
365 if (uid_light_map.find(lamp_uid) == uid_light_map.end()) {
366 fprintf(stderr,
"Couldn't find light by UID.\n");
372 Light *la = uid_light_map[lamp_uid];
380 COLLADAFW::Node *source_node,
381 COLLADAFW::Node *instance_node,
383 bool is_library_node)
401 COLLADABU::Math::Matrix4
mat4 = source_node->getTransformationMatrix();
402 COLLADABU::Math::Matrix4 bmat4 =
405 for (
int i = 0; i < 4; i++) {
406 for (
int j = 0; j < 4; j++) {
407 mat[i][j] = bmat4[i][j];
421 COLLADAFW::NodePointerArray &children = source_node->getChildNodes();
422 if (children.getCount()) {
423 for (
unsigned int i = 0; i < children.getCount(); i++) {
424 COLLADAFW::Node *child_node = children[i];
425 const COLLADAFW::UniqueId &child_id = child_node->getUniqueId();
426 if (object_map.find(child_id) == object_map.end()) {
429 COLLADAFW::InstanceNodePointerArray &inodes = child_node->getInstanceNodes();
430 Object *new_child =
nullptr;
431 if (inodes.getCount()) {
432 const COLLADAFW::UniqueId &
id = inodes[0]->getInstanciatedObjectId();
433 fprintf(stderr,
"Doing %d child nodes\n", (
int)node_map.count(
id));
435 object_map.find(
id)->second, node_map[
id], child_node, sce, is_library_node);
439 object_map.find(child_id)->second, child_node,
nullptr, sce, is_library_node);
443 if (is_library_node) {
444 libnode_ob.push_back(new_child);
462 void DocumentImporter::report_unknown_reference(
const COLLADAFW::Node &
node,
463 const std::string object_type)
465 std::string
id =
node.getOriginalId();
466 std::string name =
node.getName();
468 "error: node id=\"%s\", name=\"%s\" refers to an undefined %s.\n",
471 object_type.c_str());
475 COLLADAFW::Node *parent_node,
478 bool is_library_node)
482 bool is_joint =
node->getType() == COLLADAFW::Node::JOINT;
483 bool read_transform =
true;
484 std::string
id =
node->getOriginalId();
485 std::string name =
node->getName();
488 COLLADAFW::NodePointerArray &child_nodes =
node->getChildNodes();
490 std::vector<Object *> *objects_done =
new std::vector<Object *>();
491 std::vector<Object *> *root_objects =
new std::vector<Object *>();
494 stderr,
"| %s id='%s', name='%s'\n", is_joint ?
"JOINT" :
"NODE ",
id.c_str(), name.c_str());
497 if (parent_node ==
nullptr && !is_library_node) {
501 objects_done->push_back(par);
502 root_objects->push_back(par);
503 object_map.insert(std::pair<COLLADAFW::UniqueId, Object *>(
node->getUniqueId(), par));
504 node_map[
node->getUniqueId()] =
node;
506 if (parent_node ==
nullptr || parent_node->getType() != COLLADAFW::Node::JOINT) {
510 if (parent_node ==
nullptr) {
517 COLLADAFW::InstanceGeometryPointerArray &geom =
node->getInstanceGeometries();
518 COLLADAFW::InstanceCameraPointerArray &
camera =
node->getInstanceCameras();
519 COLLADAFW::InstanceLightPointerArray &
lamp =
node->getInstanceLights();
520 COLLADAFW::InstanceControllerPointerArray &
controller =
node->getInstanceControllers();
521 COLLADAFW::InstanceNodePointerArray &inst_node =
node->getInstanceNodes();
522 size_t geom_done = 0;
523 size_t camera_done = 0;
524 size_t lamp_done = 0;
525 size_t controller_done = 0;
526 size_t inst_done = 0;
531 while (geom_done < geom.getCount()) {
534 report_unknown_reference(*
node,
"instance_mesh");
537 objects_done->push_back(ob);
538 if (parent_node ==
nullptr) {
539 root_objects->push_back(ob);
544 while (camera_done <
camera.getCount()) {
547 report_unknown_reference(*
node,
"instance_camera");
550 objects_done->push_back(ob);
551 if (parent_node ==
nullptr) {
552 root_objects->push_back(ob);
557 while (lamp_done <
lamp.getCount()) {
560 report_unknown_reference(*
node,
"instance_light");
563 objects_done->push_back(ob);
564 if (parent_node ==
nullptr) {
565 root_objects->push_back(ob);
570 while (controller_done <
controller.getCount()) {
571 COLLADAFW::InstanceGeometry *geometry = (COLLADAFW::InstanceGeometry *)
575 report_unknown_reference(*
node,
"instance_controller");
578 objects_done->push_back(ob);
579 if (parent_node ==
nullptr) {
580 root_objects->push_back(ob);
586 while (inst_done < inst_node.getCount()) {
587 const COLLADAFW::UniqueId &node_id = inst_node[inst_done]->getInstanciatedObjectId();
588 if (object_map.find(node_id) == object_map.end()) {
590 "Cannot find object for node referenced by <instance_node name=\"%s\">.\n",
591 inst_node[inst_done]->
getName().c_str());
595 std::pair<std::multimap<COLLADAFW::UniqueId, Object *>::iterator,
596 std::multimap<COLLADAFW::UniqueId, Object *>::iterator>
597 pair_iter = object_map.equal_range(node_id);
598 for (std::multimap<COLLADAFW::UniqueId, Object *>::iterator it2 = pair_iter.first;
599 it2 != pair_iter.second;
602 COLLADAFW::Node *source_node = node_map[node_id];
604 objects_done->push_back(ob);
605 if (parent_node ==
nullptr) {
606 root_objects->push_back(ob);
612 read_transform =
false;
617 if ((geom_done + camera_done + lamp_done + controller_done + inst_done) < 1) {
625 objects_done->push_back(ob);
626 if (parent_node ==
nullptr) {
627 root_objects->push_back(ob);
637 for (
Object *ob : *objects_done) {
638 std::string nodename =
node->getName().empty() ?
node->getOriginalId() :
node->getName();
640 object_map.insert(std::pair<COLLADAFW::UniqueId, Object *>(
node->getUniqueId(), ob));
641 node_map[
node->getUniqueId()] =
node;
643 if (is_library_node) {
644 libnode_ob.push_back(ob);
651 for (
Object *ob : *objects_done) {
652 if (read_transform) {
667 if (objects_done->empty()) {
671 ob = *objects_done->begin();
674 for (
unsigned int i = 0; i < child_nodes.getCount(); i++) {
675 std::vector<Object *> *child_objects;
676 child_objects =
write_node(child_nodes[i],
node, sce, ob, is_library_node);
677 delete child_objects;
703 vscenes.push_back(visualScene);
716 const COLLADAFW::NodePointerArray &nodes = libraryNodes->getNodes();
718 fprintf(stderr,
"+-- Read Library nodes ----------\n");
719 for (
unsigned int i = 0; i < nodes.getCount(); i++) {
720 std::vector<Object *> *child_objects;
721 child_objects =
write_node(nodes[i],
nullptr, sce,
nullptr,
true);
722 delete child_objects;
743 const std::string &str_mat_id = cmat->getName().empty() ? cmat->getOriginalId() :
748 this->uid_effect_map[cmat->getInstantiatedEffect()] = ma;
749 this->uid_material_map[cmat->getUniqueId()] = ma;
761 matNode.
set_ior(ef->getIndexOfRefraction());
762 matNode.
set_alpha(ef->getOpaqueMode(), ef->getTransparent(), ef->getTransparency());
785 const COLLADAFW::UniqueId &uid = effect->getUniqueId();
787 if (uid_effect_map.find(uid) == uid_effect_map.end()) {
788 fprintf(stderr,
"Couldn't find a material by UID.\n");
793 std::map<COLLADAFW::UniqueId, Material *>::iterator iter;
794 for (iter = uid_material_map.begin(); iter != uid_material_map.end(); iter++) {
795 if (iter->second == ma) {
796 this->FW_object_map[iter->first] = effect;
800 COLLADAFW::CommonEffectPointerArray common_efs = effect->getCommonEffects();
801 if (common_efs.getCount() < 1) {
802 fprintf(stderr,
"Couldn't find <profile_COMMON>.\n");
807 COLLADAFW::EffectCommon *ef = common_efs[0];
809 this->FW_object_map[effect->getUniqueId()] = effect;
822 std::string cam_id, cam_name;
825 cam_id =
camera->getOriginalId();
826 cam_name =
camera->getName();
827 if (cam_name.empty()) {
835 fprintf(stderr,
"Cannot create camera.\n");
849 case COLLADAFW::Camera::ORTHOGRAPHIC: {
852 case COLLADAFW::Camera::PERSPECTIVE: {
855 case COLLADAFW::Camera::UNDEFINED_CAMERATYPE: {
856 fprintf(stderr,
"Current camera type is not supported.\n");
861 switch (
camera->getDescriptionType()) {
862 case COLLADAFW::Camera::ASPECTRATIO_AND_Y: {
865 double ymag = 2 *
camera->getYMag().getValue();
866 double aspect =
camera->getAspectRatio().getValue();
867 double xmag = aspect * ymag;
872 double yfov =
camera->getYFov().getValue();
873 double aspect =
camera->getAspectRatio().getValue();
884 case COLLADAFW::Camera::ASPECTRATIO_AND_X:
885 case COLLADAFW::Camera::SINGLE_X:
886 case COLLADAFW::Camera::X_AND_Y: {
893 double x =
camera->getXFov().getValue();
899 case COLLADAFW::Camera::SINGLE_Y: {
906 double yfov =
camera->getYFov().getValue();
912 case COLLADAFW::Camera::UNDEFINED:
917 this->uid_camera_map[
camera->getUniqueId()] = cam;
929 const std::string &imagepath =
image->getImageURI().toNativePath();
933 const char *workpath;
936 BLI_join_dirfile(absolute_path,
sizeof(absolute_path), dir, imagepath.c_str());
938 workpath = absolute_path;
943 fprintf(stderr,
"|! Image not found: %s\n", imagepath.c_str());
946 workpath = imagepath.c_str();
951 fprintf(stderr,
"|! Cannot create image: %s\n", workpath);
954 this->uid_image_map[
image->getUniqueId()] = ima;
955 fprintf(stderr,
"| import Image: %s\n", workpath);
967 std::string la_id, la_name;
971 TagsMap::iterator etit;
973 etit = uid_tags_map.find(light->getUniqueId().toAscii());
974 if (etit != uid_tags_map.end()) {
979 la_id = light->getOriginalId();
980 la_name = light->getName();
981 if (la_name.empty()) {
989 fprintf(stderr,
"Cannot create light.\n");
1025 float constatt = light->getConstantAttenuation().getValue();
1026 float linatt = light->getLinearAttenuation().getValue();
1027 float quadatt = light->getQuadraticAttenuation().getValue();
1033 if (light->getColor().isValid()) {
1040 if (
IS_EQ(linatt, 0.0f) && quadatt > 0.0f) {
1042 d =
sqrt(1.0f / quadatt);
1045 else if (
IS_EQ(quadatt, 0.0f) && linatt > 0.0f) {
1047 d = (1.0f / linatt);
1049 else if (
IS_EQ(constatt, 1.0f)) {
1062 switch (light->getLightType()) {
1063 case COLLADAFW::Light::AMBIENT_LIGHT: {
1066 case COLLADAFW::Light::SPOT_LIGHT: {
1070 if (
IS_EQ(att1, 0.0f) && att2 > 0) {
1073 if (
IS_EQ(att2, 0.0f) && att1 > 0) {
1079 case COLLADAFW::Light::DIRECTIONAL_LIGHT: {
1083 case COLLADAFW::Light::POINT_LIGHT: {
1087 if (
IS_EQ(att1, 0.0f) && att2 > 0) {
1090 if (
IS_EQ(att2, 0.0f) && att1 > 0) {
1094 case COLLADAFW::Light::UNDEFINED: {
1095 fprintf(stderr,
"Current light type is not supported.\n");
1101 this->uid_light_map[light->getUniqueId()] =
lamp;
1102 this->FW_object_map[light->getUniqueId()] = light;
1125 #if WITH_OPENCOLLADA_ANIMATION_CLIP
1126 bool DocumentImporter::writeAnimationClip(
const COLLADAFW::AnimationClip *animationClip)
1166 if (uid_tags_map.find(uid.toAscii()) == uid_tags_map.end()) {
1169 return uid_tags_map[uid.toAscii()];
1174 uid_tags_map[uid.toAscii()] = extra_tags;
1180 COLLADAFW::NodePointerArray &child_nodes =
node->getChildNodes();
1181 for (
unsigned int i = 0; i < child_nodes.getCount(); i++) {
1182 if (child_nodes[i]->getType() == COLLADAFW::Node::JOINT) {
typedef float(TangentPoint)[2]
Camera data-block and utility functions.
void * BKE_camera_add(struct Main *bmain, const char *name)
void BKE_collection_object_add_from(struct Main *bmain, struct Scene *scene, struct Object *ob_src, struct Object *ob_dst)
bool BKE_scene_collections_object_remove(struct Main *bmain, struct Scene *scene, struct Object *object, bool free_us)
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, short type)
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct Image * BKE_image_load_exists(struct Main *bmain, const char *filepath)
void BKE_view_layer_base_deselect_all(struct ViewLayer *view_layer)
struct ID * BKE_id_copy(struct Main *bmain, const struct ID *id)
void BKE_libblock_rename(struct Main *bmain, struct ID *id, const char *name) ATTR_NONNULL()
void id_us_min(struct ID *id)
void BKE_id_free_us(struct Main *bmain, void *idv) ATTR_NONNULL()
General operations, lookup, etc. for blender lights.
struct Light * BKE_light_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT
General operations, lookup, etc. for materials.
struct Material * BKE_material_add(struct Main *bmain, const char *name)
void BKE_object_apply_mat4(struct Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
float fov_to_focallength(float fov, float sensor)
void BLI_split_dir_part(const char *string, char *dir, size_t dirlen)
void BLI_join_dirfile(char *__restrict dst, size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
#define LA_FALLOFF_INVSQUARE
#define LA_FALLOFF_INVLINEAR
#define USER_UNIT_IMPERIAL
static Controller * controller
_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 or normal between camera
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual const char * getName() const
void read_node_transform(COLLADAFW::Node *node, Object *ob)
bool write_animation_list(const COLLADAFW::AnimationList *animlist)
void translate_Animations(COLLADAFW::Node *Node, std::map< COLLADAFW::UniqueId, COLLADAFW::Node * > &root_map, std::multimap< COLLADAFW::UniqueId, Object * > &object_map, std::map< COLLADAFW::UniqueId, const COLLADAFW::Object * > FW_object_map, std::map< COLLADAFW::UniqueId, Material * > uid_material_map)
bool write_animation(const COLLADAFW::Animation *anim)
void set_import_from_version(std::string import_from_version)
void make_shape_keys(bContext *C)
void make_armatures(bContext *C, std::vector< Object * > &objects_to_scale)
bool write_skin_controller_data(const COLLADAFW::SkinControllerData *data)
bool write_controller(const COLLADAFW::Controller *controller)
void set_tags_map(TagsMap &tags_map)
void add_root_joint(COLLADAFW::Node *node, Object *parent)
void write_profile_COMMON(COLLADAFW::EffectCommon *, Material *)
std::vector< Object * > * write_node(COLLADAFW::Node *, COLLADAFW::Node *, Scene *, Object *, bool)
std::string get_import_version(const COLLADAFW::FileInfo *asset)
bool addExtraTags(const COLLADAFW::UniqueId &uid, ExtraTags *extra_tags)
@ Fetching_Controller_data
Object * create_light_object(COLLADAFW::InstanceLight *, Scene *)
bool writeGeometry(const COLLADAFW::Geometry *)
bool writeKinematicsScene(const COLLADAFW::KinematicsScene *)
void cancel(const COLLADAFW::String &errorMessage)
bool writeEffect(const COLLADAFW::Effect *)
bool writeLibraryNodes(const COLLADAFW::LibraryNodes *)
bool writeFormulas(const COLLADAFW::Formulas *)
void translate_anim_recursive(COLLADAFW::Node *, COLLADAFW::Node *, Object *)
bool writeVisualScene(const COLLADAFW::VisualScene *)
bool writeScene(const COLLADAFW::Scene *)
Object * create_instance_node(Object *, COLLADAFW::Node *, COLLADAFW::Node *, Scene *, bool)
bool writeAnimationList(const COLLADAFW::AnimationList *)
bool writeAnimation(const COLLADAFW::Animation *)
bool writeController(const COLLADAFW::Controller *)
void create_constraints(ExtraTags *et, Object *ob)
DocumentImporter(bContext *C, const ImportSettings *import_settings)
bool writeImage(const COLLADAFW::Image *)
bool writeSkinControllerData(const COLLADAFW::SkinControllerData *)
bool writeCamera(const COLLADAFW::Camera *)
ExtraTags * getExtraTags(const COLLADAFW::UniqueId &uid)
bool writeLight(const COLLADAFW::Light *)
bool writeMaterial(const COLLADAFW::Material *)
Object * create_camera_object(COLLADAFW::InstanceCamera *, Scene *)
bool writeGlobalAsset(const COLLADAFW::FileInfo *)
bool is_armature(COLLADAFW::Node *node)
Handler class for parser errors.
Handler class for <extra> data, through which different profiles can be handled.
void set_reflectivity(COLLADAFW::FloatOrParam &val)
void set_shininess(COLLADAFW::FloatOrParam &val)
void set_specular(COLLADAFW::ColorOrTexture &cot)
void update_material_nodetree()
void set_ior(COLLADAFW::FloatOrParam &val)
void set_reflective(COLLADAFW::ColorOrTexture &cot)
void set_emission(COLLADAFW::ColorOrTexture &cot)
void set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode, COLLADAFW::ColorOrTexture &cot, COLLADAFW::FloatOrParam &val)
void set_diffuse(COLLADAFW::ColorOrTexture &cot)
void set_ambient(COLLADAFW::ColorOrTexture &cot)
void optimize_material_assignements()
bool write_geometry(const COLLADAFW::Geometry *geom)
Object * create_mesh_object(COLLADAFW::Node *node, COLLADAFW::InstanceGeometry *geom, bool isController, std::map< COLLADAFW::UniqueId, Material * > &uid_material_map)
void read_asset(const COLLADAFW::FileInfo *asset)
void calculate_scale(Scene &sce)
UnitConverter::UnitSystem isMetricSystem(void)
float getLinearMeter(void)
bool bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene)
std::string bc_url_encode(std::string data)
Object * bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
struct CameraDOFSettings dof
void WM_event_add_notifier(const bContext *C, uint type, void *reference)