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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-20 11:50:09 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-20 11:50:09 +0300
commita5a30e485ff94ecc82cd2c93e3e6f3fa1ad3bfe7 (patch)
treefd85225d89aef6e96fa89da168d2e2879053b61a /source/blender/editors
parentfb26d25405319191eed286a0f9bdd58b899c6009 (diff)
parent02f6722350d9b613450016505db0c24ba2bc9109 (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 09a8af6333c..64c4abd1446 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2325,7 +2325,7 @@ static int convert_exec(bContext *C, wmOperator *op)
if (!keep_original) {
/* other users */
- if (cu->id.us > 1) {
+ if (BKE_id_num_real_users(&cu->id) > 1) {
for (ob1 = bmain->objects.first; ob1; ob1 = ob1->id.next) {
if (ob1->data == ob->data) {
ob1->type = OB_CURVE;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index a9334edd39b..c3056fff8c5 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7562,7 +7562,8 @@ static void sculpt_flush_update_done(const bContext *C, Object *ob, SculptUpdate
RegionView3D *rv3d = CTX_wm_region_view3d(C);
SculptSession *ss = ob->sculpt;
Mesh *mesh = ob->data;
- bool need_tag = (mesh->id.us > 1); /* Always needed for linked duplicates. */
+ bool need_tag = (BKE_id_num_real_users(&mesh->id) >
+ 1); /* Always needed for linked duplicates. */
if (rv3d) {
rv3d->rflag &= ~RV3D_PAINTING;
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 2e77c7cceeb..a069b231150 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -46,6 +46,7 @@
#include "BKE_multires.h"
#include "BKE_paint.h"
#include "BKE_key.h"
+#include "BKE_library.h"
#include "BKE_mesh.h"
#include "BKE_scene.h"
#include "BKE_subsurf.h"
@@ -632,7 +633,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
}
}
- tag_update |= ((Mesh *)ob->data)->id.us > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d);
+ tag_update |= BKE_id_num_real_users(ob->data) > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d);
if (ss->shapekey_active || ss->deform_modifiers_active) {
Mesh *mesh = ob->data;