17#include "COLLADAFWArrayPrimitiveType.h"
18#include "COLLADAFWCamera.h"
19#include "COLLADAFWColorOrTexture.h"
20#include "COLLADAFWIndexList.h"
21#include "COLLADAFWLibraryNodes.h"
22#include "COLLADAFWLight.h"
23#include "COLLADAFWMeshPrimitiveWithFaceVertexCount.h"
24#include "COLLADAFWPolygons.h"
25#include "COLLADAFWRoot.h"
26#include "COLLADAFWSampler.h"
27#include "COLLADAFWStableHeaders.h"
28#include "COLLADAFWTypes.h"
29#include "COLLADAFWVisualScene.h"
31#include "COLLADASaxFWLIExtraDataCallbackHandler.h"
32#include "COLLADASaxFWLLoader.h"
81 : import_settings(import_settings),
82 mImportStage(Fetching_Scene_data),
85 armature_importer(&unit_converter,
91 mesh_importer(&unit_converter,
92 import_settings->custom_normals,
97 anim_importer(C, &unit_converter, &armature_importer,
CTX_data_scene(C))
103 TagsMap::iterator etit;
104 etit = uid_tags_map.begin();
105 while (etit != uid_tags_map.end()) {
114 COLLADASaxFWL::Loader loader(&errorHandler);
115 COLLADAFW::Root root(&loader,
this);
118 loader.registerExtraDataCallbackHandler(ehandler);
123 std::string mFilename = std::string(this->import_settings->
filepath);
124 const std::string encodedFilename =
bc_url_encode(mFilename);
125 if (!root.loadDocument(encodedFilename)) {
126 fprintf(stderr,
"COLLADAFW::Root::loadDocument() returned false on 1st pass\n");
138 COLLADASaxFWL::Loader loader2;
139 COLLADAFW::Root root2(&loader2,
this);
141 if (!root2.loadDocument(encodedFilename)) {
142 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 (
uint 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 (
uint 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());
322 std::string::size_type n =
v.find(
" ");
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 (
uint 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);
461void DocumentImporter::report_unknown_reference(
const COLLADAFW::Node &node,
462 const std::string object_type)
464 std::string
id = node.getOriginalId();
465 std::string name = node.getName();
467 "error: node id=\"%s\", name=\"%s\" refers to an undefined %s.\n",
470 object_type.c_str());
474 COLLADAFW::Node *parent_node,
477 bool is_library_node)
481 bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
482 bool read_transform =
true;
483 std::string
id = node->getOriginalId();
484 std::string name = node->getName();
487 COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes();
489 std::vector<Object *> *objects_done =
new std::vector<Object *>();
490 std::vector<Object *> *root_objects =
new std::vector<Object *>();
493 stderr,
"| %s id='%s', name='%s'\n", is_joint ?
"JOINT" :
"NODE ",
id.c_str(), name.c_str());
496 if (parent_node ==
nullptr && !is_library_node) {
500 objects_done->push_back(par);
501 root_objects->push_back(par);
502 object_map.insert(std::pair<COLLADAFW::UniqueId, Object *>(node->getUniqueId(), par));
503 node_map[node->getUniqueId()] =
node;
505 if (parent_node ==
nullptr || parent_node->getType() != COLLADAFW::Node::JOINT) {
509 if (parent_node ==
nullptr) {
516 COLLADAFW::InstanceGeometryPointerArray &geom = node->getInstanceGeometries();
517 COLLADAFW::InstanceCameraPointerArray &camera = node->getInstanceCameras();
518 COLLADAFW::InstanceLightPointerArray &
lamp = node->getInstanceLights();
519 COLLADAFW::InstanceControllerPointerArray &
controller = node->getInstanceControllers();
520 COLLADAFW::InstanceNodePointerArray &inst_node = node->getInstanceNodes();
521 size_t geom_done = 0;
522 size_t camera_done = 0;
523 size_t lamp_done = 0;
524 size_t controller_done = 0;
525 size_t inst_done = 0;
530 while (geom_done < geom.getCount()) {
531 ob = mesh_importer.
create_mesh_object(node, geom[geom_done],
false, uid_material_map);
533 report_unknown_reference(*node,
"instance_mesh");
536 objects_done->push_back(ob);
537 if (parent_node ==
nullptr) {
538 root_objects->push_back(ob);
543 while (camera_done < camera.getCount()) {
546 report_unknown_reference(*node,
"instance_camera");
549 objects_done->push_back(ob);
550 if (parent_node ==
nullptr) {
551 root_objects->push_back(ob);
556 while (lamp_done <
lamp.getCount()) {
559 report_unknown_reference(*node,
"instance_light");
562 objects_done->push_back(ob);
563 if (parent_node ==
nullptr) {
564 root_objects->push_back(ob);
569 while (controller_done <
controller.getCount()) {
570 COLLADAFW::InstanceGeometry *geometry = (COLLADAFW::InstanceGeometry *)
574 report_unknown_reference(*node,
"instance_controller");
577 objects_done->push_back(ob);
578 if (parent_node ==
nullptr) {
579 root_objects->push_back(ob);
585 while (inst_done < inst_node.getCount()) {
586 const COLLADAFW::UniqueId &node_id = inst_node[inst_done]->getInstanciatedObjectId();
587 if (object_map.find(node_id) == object_map.end()) {
589 "Cannot find object for node referenced by <instance_node name=\"%s\">.\n",
590 inst_node[inst_done]->
getName().c_str());
594 std::pair<std::multimap<COLLADAFW::UniqueId, Object *>::iterator,
595 std::multimap<COLLADAFW::UniqueId, Object *>::iterator>
596 pair_iter = object_map.equal_range(node_id);
597 for (std::multimap<COLLADAFW::UniqueId, Object *>::iterator it2 = pair_iter.first;
598 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) {
626 objects_done->push_back(ob);
627 if (parent_node ==
nullptr) {
628 root_objects->push_back(ob);
638 for (
Object *ob : *objects_done) {
639 std::string nodename = node->getName().empty() ? node->getOriginalId() : node->getName();
641 object_map.insert(std::pair<COLLADAFW::UniqueId, Object *>(node->getUniqueId(), ob));
642 node_map[node->getUniqueId()] =
node;
644 if (is_library_node) {
645 libnode_ob.push_back(ob);
652 for (
Object *ob : *objects_done) {
653 if (read_transform) {
668 if (objects_done->empty()) {
672 ob = *objects_done->begin();
675 for (
uint i = 0; i < child_nodes.getCount(); i++) {
676 std::vector<Object *> *child_objects;
677 child_objects =
write_node(child_nodes[i], node, sce, ob, is_library_node);
678 delete child_objects;
704 vscenes.push_back(visualScene);
717 const COLLADAFW::NodePointerArray &nodes = libraryNodes->getNodes();
719 fprintf(stderr,
"+-- Read Library nodes ----------\n");
720 for (
uint i = 0; i < nodes.getCount(); i++) {
721 std::vector<Object *> *child_objects;
722 child_objects =
write_node(nodes[i],
nullptr, sce,
nullptr,
true);
723 delete child_objects;
744 const std::string &str_mat_id = cmat->getName().empty() ? cmat->getOriginalId() :
749 this->uid_effect_map[cmat->getInstantiatedEffect()] = ma;
750 this->uid_material_map[cmat->getUniqueId()] = ma;
762 matNode.
set_ior(ef->getIndexOfRefraction());
763 matNode.
set_alpha(ef->getOpaqueMode(), ef->getTransparent(), ef->getTransparency());
786 const COLLADAFW::UniqueId &uid = effect->getUniqueId();
788 if (uid_effect_map.find(uid) == uid_effect_map.end()) {
789 fprintf(stderr,
"Couldn't find a material by UID.\n");
794 std::map<COLLADAFW::UniqueId, Material *>::iterator iter;
795 for (iter = uid_material_map.begin(); iter != uid_material_map.end(); iter++) {
796 if (iter->second == ma) {
797 this->FW_object_map[iter->first] = effect;
801 COLLADAFW::CommonEffectPointerArray common_efs = effect->getCommonEffects();
802 if (common_efs.getCount() < 1) {
803 fprintf(stderr,
"Couldn't find <profile_COMMON>.\n");
808 COLLADAFW::EffectCommon *ef = common_efs[0];
810 this->FW_object_map[effect->getUniqueId()] = effect;
823 std::string cam_id, cam_name;
826 cam_id = camera->getOriginalId();
827 cam_name = camera->getName();
828 if (cam_name.empty()) {
836 fprintf(stderr,
"Cannot create camera.\n");
845 cam->
clip_start = camera->getNearClippingPlane().getValue();
846 cam->
clip_end = camera->getFarClippingPlane().getValue();
848 COLLADAFW::Camera::CameraType type = camera->getCameraType();
850 case COLLADAFW::Camera::ORTHOGRAPHIC: {
854 case COLLADAFW::Camera::PERSPECTIVE: {
858 case COLLADAFW::Camera::UNDEFINED_CAMERATYPE: {
859 fprintf(stderr,
"Current camera type is not supported.\n");
865 switch (camera->getDescriptionType()) {
866 case COLLADAFW::Camera::ASPECTRATIO_AND_Y: {
869 double ymag = 2 * camera->getYMag().getValue();
870 double aspect = camera->getAspectRatio().getValue();
871 double xmag = aspect * ymag;
877 double yfov = camera->getYFov().getValue();
878 double aspect = camera->getAspectRatio().getValue();
891 case COLLADAFW::Camera::ASPECTRATIO_AND_X:
892 case COLLADAFW::Camera::SINGLE_X:
893 case COLLADAFW::Camera::X_AND_Y: {
900 double x = camera->getXFov().getValue();
908 case COLLADAFW::Camera::SINGLE_Y: {
915 double yfov = camera->getYFov().getValue();
923 case COLLADAFW::Camera::UNDEFINED:
928 this->uid_camera_map[camera->getUniqueId()] = cam;
929 this->FW_object_map[camera->getUniqueId()] =
camera;
940 const std::string &imagepath = image->getImageURI().toNativePath();
944 const char *workpath;
947 BLI_path_join(absolute_path,
sizeof(absolute_path), dir, imagepath.c_str());
949 workpath = absolute_path;
954 fprintf(stderr,
"|! Image not found: %s\n", imagepath.c_str());
957 workpath = imagepath.c_str();
962 fprintf(stderr,
"|! Cannot create image: %s\n", workpath);
965 this->uid_image_map[image->getUniqueId()] = ima;
966 fprintf(stderr,
"| import Image: %s\n", workpath);
978 std::string la_id, la_name;
982 TagsMap::iterator etit;
984 etit = uid_tags_map.find(light->getUniqueId().toAscii());
985 if (etit != uid_tags_map.end()) {
990 la_id = light->getOriginalId();
991 la_name = light->getName();
992 if (la_name.empty()) {
1000 fprintf(stderr,
"Cannot create light.\n");
1028 if (light->getColor().isValid()) {
1029 COLLADAFW::Color
col = light->getColor();
1037 switch (light->getLightType()) {
1038 case COLLADAFW::Light::AMBIENT_LIGHT: {
1042 case COLLADAFW::Light::SPOT_LIGHT: {
1048 case COLLADAFW::Light::DIRECTIONAL_LIGHT: {
1053 case COLLADAFW::Light::POINT_LIGHT: {
1057 case COLLADAFW::Light::UNDEFINED: {
1058 fprintf(stderr,
"Current light type is not supported.\n");
1065 this->uid_light_map[light->getUniqueId()] =
lamp;
1066 this->FW_object_map[light->getUniqueId()] = light;
1089#if WITH_OPENCOLLADA_ANIMATION_CLIP
1090bool DocumentImporter::writeAnimationClip(
const COLLADAFW::AnimationClip *animationClip)
1130 if (uid_tags_map.find(uid.toAscii()) == uid_tags_map.end()) {
1133 return uid_tags_map[uid.toAscii()];
1138 uid_tags_map[uid.toAscii()] = extra_tags;
1144 COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes();
1145 for (
uint i = 0; i < child_nodes.getCount(); i++) {
1146 if (child_nodes[i]->getType() == COLLADAFW::Node::JOINT) {
Camera data-block and utility functions.
void * BKE_camera_add(struct Main *bmain, const char *name)
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, bool free_us)
void BKE_collection_object_add_from(Main *bmain, Scene *scene, Object *ob_src, Object *ob_dst)
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, short type)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
Image * BKE_image_load_exists(Main *bmain, const char *filepath, bool *r_exists=nullptr)
void BKE_view_layer_base_deselect_all(const Scene *scene, ViewLayer *view_layer)
void BKE_id_free_us(Main *bmain, void *idv) ATTR_NONNULL()
IDNewNameResult BKE_libblock_rename(Main &bmain, ID &id, blender::StringRefNull name, const IDNewNameMode mode=IDNewNameMode::RenameExistingNever)
ID * BKE_id_copy(Main *bmain, const ID *id)
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(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 hfov, float sensor)
#define BLI_path_join(...)
void void BLI_path_split_dir_part(const char *filepath, char *dir, size_t dir_maxncpy) ATTR_NONNULL(1
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
static Controller * controller
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 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 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)
Object * bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
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)
Object * bc_add_armature(COLLADAFW::Node *node, ExtraTags *node_extra_tags, Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
std::string bc_url_encode(std::string data)
draw_view in_light_buf[] float
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
PointerRNA RNA_id_pointer_create(ID *id)
struct CameraDOFSettings dof
ObjectRuntimeHandle * runtime
void WM_event_add_notifier(const bContext *C, uint type, void *reference)