Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-12-14 14:20:56 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-12-14 14:20:56 +0300
commit0e76ff18b5bac34fb7f3b96c4849024ec9b2c2fb (patch)
treec6855aa3a1459c9106d3028c462d5facc802ef59 /source/blender/editors/object
parentdc4c1be1a4455e84d1f72ce2703ab7425152965c (diff)
Fix T58351: Make Single User crashes
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_relations.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index ead000819b7..d61c5334ee6 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1754,7 +1754,7 @@ static void new_id_matar(Main *bmain, Material **matar, const int totcol)
}
}
-static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer, const int flag)
+static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
{
Lamp *la;
Curve *cu;
@@ -1763,7 +1763,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
Lattice *lat;
ID *id;
- FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
+ FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, v3d, flag, ob)
{
if (!ID_IS_LINKED(ob)) {
id = ob->data;
@@ -1844,9 +1844,9 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
}
}
-static void single_object_action_users(Main *bmain, Scene *scene, ViewLayer *view_layer, const int flag)
+static void single_object_action_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
{
- FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
+ FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, v3d, flag, ob)
{
if (!ID_IS_LINKED(ob)) {
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
@@ -1856,12 +1856,12 @@ static void single_object_action_users(Main *bmain, Scene *scene, ViewLayer *vie
FOREACH_OBJECT_FLAG_END;
}
-static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, const int flag)
+static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const int flag)
{
Material *ma, *man;
int a;
- FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
+ FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, v3d, flag, ob)
{
if (!ID_IS_LINKED(ob)) {
for (a = 1; a <= ob->totcol; a++) {
@@ -1919,8 +1919,8 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo
single_object_users(bmain, scene, NULL, 0, copy_collections);
if (full) {
- single_obdata_users(bmain, scene, NULL, 0);
- single_object_action_users(bmain, scene, NULL, 0);
+ single_obdata_users(bmain, scene, NULL, NULL, 0);
+ single_object_action_users(bmain, scene, NULL, NULL, 0);
single_mat_users_expand(bmain);
}
@@ -2456,15 +2456,15 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
}
if (RNA_boolean_get(op->ptr, "obdata")) {
- single_obdata_users(bmain, scene, view_layer, flag);
+ single_obdata_users(bmain, scene, view_layer, v3d, flag);
}
if (RNA_boolean_get(op->ptr, "material")) {
- single_mat_users(bmain, scene, view_layer, flag);
+ single_mat_users(bmain, scene, view_layer, v3d, flag);
}
if (RNA_boolean_get(op->ptr, "animation")) {
- single_object_action_users(bmain, scene, view_layer, flag);
+ single_object_action_users(bmain, scene, view_layer, v3d, flag);
}
BKE_main_id_clear_newpoins(bmain);