[Bf-blender-cvs] [a35e733ff18] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Thu Jun 15 15:54:38 CEST 2017
Commit: a35e733ff18fcdf5b57937cd85f9bcd6aec236b0
Author: Bastien Montagne
Date: Thu Jun 15 15:54:11 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBa35e733ff18fcdf5b57937cd85f9bcd6aec236b0
Merge branch 'master' into blender2.8
Conflicts:
source/blender/collada/MeshImporter.cpp
source/blender/editors/object/object_add.c
source/blender/editors/screen/screen_edit.c
===================================================================
===================================================================
diff --cc source/blender/collada/MeshImporter.cpp
index 616c254a6ea,6ca53c64299..9c95d4de695
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@@ -1156,8 -1173,13 +1156,9 @@@ Object *MeshImporter::create_mesh_objec
BKE_mesh_assign_object(ob, new_mesh);
BKE_mesh_calc_normals(new_mesh);
- if (old_mesh->id.us == 0) BKE_libblock_free(G.main, old_mesh);
-
+ id_us_plus(&old_mesh->id); /* Because BKE_mesh_assign_object would have already decreased it... */
+ BKE_libblock_free_us(G.main, old_mesh);
+
- char layername[100];
- layername[0] = '\0';
- MTFace *texture_face = NULL;
-
COLLADAFW::MaterialBindingArray& mat_array =
geom->getMaterialBindings();
diff --cc source/blender/editors/object/object_add.c
index 33af8f94d04,a901560079a..e8343dce384
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@@ -1738,8 -1677,21 +1738,21 @@@ static int convert_exec(bContext *C, wm
* on other objects data masks too, see: T50950. */
{
for (CollectionPointerLink *link = selected_editable_bases.first; link; link = link->next) {
-- Base *base = link->ptr.data;
++ BaseLegacy *base = link->ptr.data;
+ ob = base->object;
+
+ /* The way object type conversion works currently (enforcing conversion of *all* objetcs using converted
+ * obdata, even some un-selected/hidden/inother scene ones, sounds totally bad to me.
+ * However, changing this is more design than bugfix, not to mention convoluted code below,
+ * so that will be for later.
+ * But at the very least, do not do that with linked IDs! */
+ if ((ID_IS_LINKED_DATABLOCK(ob) || ID_IS_LINKED_DATABLOCK(ob->data)) && !keep_original) {
+ keep_original = true;
+ BKE_reportf(op->reports, RPT_INFO,
+ "Converting some linked object/object data, enforcing 'Keep Original' option to True");
+ }
+
- DAG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
}
uint64_t customdata_mask_prev = scene->customdata_mask;
@@@ -1749,7 -1701,7 +1762,7 @@@
}
for (CollectionPointerLink *link = selected_editable_bases.first; link; link = link->next) {
-- Base *base = link->ptr.data;
++ BaseLegacy *base = link->ptr.data;
ob = base->object;
if (ob->flag & OB_DONE || !IS_TAGGED(ob->data)) {
More information about the Bf-blender-cvs
mailing list