diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-08 15:36:25 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-08 19:11:20 +0300 |
commit | ab993e373cf31c1790f7283b52bbd29b4849fbe7 (patch) | |
tree | a4bfc1772f30985fb9aecef5b0b2b965cbffaad2 /source/blender/editors | |
parent | 71f5df9f44dd6dfd125d6ea7f7f6542e6f9e7faa (diff) |
Rework/split test_object_materials().
Now test_object_materials only handles one object. New test_all_objects_materials
checks the whole bmain->object list for cases where it is actually needed.
Should avoid some useless looping over all objects!
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 123f701d405..05145f7bf29 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -540,7 +540,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) if (matmap) MEM_freeN(matmap); /* other mesh users */ - test_object_materials(bmain, (ID *)me); + test_all_objects_materials(bmain, (ID *)me); /* free temp copy of destination shapekeys (if applicable) */ if (nkey) { diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 9a6fe5ae48b..af1c840b902 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1564,7 +1564,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) ob_dst->data = obdata_id; /* if amount of material indices changed: */ - test_object_materials(bmain, ob_dst->data); + test_object_materials(ob_dst, ob_dst->data); DAG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); break; |