Merge branch 'master' into blender2.8

This commit is contained in:
2018-06-08 08:10:35 +02:00
191 changed files with 36025 additions and 2057 deletions

View File

@@ -77,7 +77,7 @@ float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray& array, unsigned in
if (array.getType() == COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT)
return array.getFloatValues()->getData()[index];
else
else
return array.getDoubleValues()->getData()[index];
}
@@ -85,10 +85,10 @@ float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray& array, unsigned in
int bc_test_parent_loop(Object *par, Object *ob)
{
/* test if 'ob' is a parent somewhere in par's parents */
if (par == NULL) return 0;
if (ob == par) return 1;
return bc_test_parent_loop(par->parent, ob);
}
@@ -117,7 +117,7 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
mul_m4_m4m4(mat, par->obmat, ob->obmat);
copy_m4_m4(ob->obmat, mat);
}
// apply child obmat (i.e. decompose it into rot/loc/size)
BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
@@ -231,7 +231,7 @@ Object *bc_get_assigned_armature(Object *ob)
// IMPORTANT: This function expects that
// all exported objects have set:
// ob->id.tag & LIB_TAG_DOIT
Object *bc_get_highest_selected_ancestor_or_self(LinkNode *export_set, Object *ob)
Object *bc_get_highest_selected_ancestor_or_self(LinkNode *export_set, Object *ob)
{
Object *ancestor = ob;
while (ob->parent && bc_is_marked(ob->parent)) {
@@ -256,7 +256,7 @@ bool bc_is_in_Export_set(LinkNode *export_set, Object *ob)
bool bc_has_object_type(LinkNode *export_set, short obtype)
{
LinkNode *node;
for (node = export_set; node; node = node->next) {
Object *ob = (Object *)node->link;
/* XXX - why is this checking for ob->data? - we could be looking for empties */
@@ -290,7 +290,7 @@ void bc_bubble_sort_by_Object_name(LinkNode *export_set)
for (node = export_set; node->next && !sorted; node = node->next) {
sorted = true;
LinkNode *current;
for (current = export_set; current->next; current = current->next) {
Object *a = (Object *)current->link;
@@ -301,12 +301,12 @@ void bc_bubble_sort_by_Object_name(LinkNode *export_set)
current->next->link = a;
sorted = false;
}
}
}
}
/* Check if a bone is the top most exportable bone in the bone hierarchy.
/* Check if a bone is the top most exportable bone in the bone hierarchy.
* When deform_bones_only == false, then only bones with NO parent
* can be root bones. Otherwise the top most deform bones in the hierarchy
* are root bones.
@@ -367,13 +367,13 @@ void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene)
BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
}
void bc_match_scale(std::vector<Object *> *objects_done,
void bc_match_scale(std::vector<Object *> *objects_done,
UnitConverter &bc_unit,
bool scale_to_scene)
{
for (std::vector<Object *>::iterator it = objects_done->begin();
it != objects_done->end();
++it)
++it)
{
Object *ob = *it;
if (ob -> parent == NULL) {
@@ -781,7 +781,7 @@ float bc_get_property(Bone *bone, std::string key, float def)
/**
* Read a custom bone property and convert to matrix
* Return true if conversion was succesfull
*
*
* Return false if:
* - the property does not exist
* - is not an array of size 16