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:
-rw-r--r--source/blender/blenkernel/BKE_library.h1
-rw-r--r--source/blender/blenkernel/intern/library.c5
-rw-r--r--source/blender/collada/MeshImporter.cpp4
-rw-r--r--source/blender/draw/engines/overlay/overlay_extra.c3
-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
7 files changed, 6 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 21dd5aaaf8f..c41cd50eba5 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -184,7 +184,6 @@ void id_us_plus(struct ID *id);
void id_us_min(struct ID *id);
void id_fake_user_set(struct ID *id);
void id_fake_user_clear(struct ID *id);
-int BKE_id_num_real_users(const struct ID *id);
void BKE_id_clear_newpoin(struct ID *id);
void BKE_id_make_local_generic(struct Main *bmain,
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index dabf44be42e..e051dc946cb 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -294,11 +294,6 @@ void id_fake_user_clear(ID *id)
}
}
-int BKE_id_num_real_users(const ID *id)
-{
- return (id->flag & LIB_FAKEUSER) ? id->us - 1 : id->us;
-}
-
void BKE_id_clear_newpoin(ID *id)
{
if (id->newid) {
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 94791df7b6f..e02a7a014f1 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -1014,12 +1014,12 @@ void MeshImporter::optimize_material_assignements()
++it) {
Object *ob = (*it);
Mesh *me = (Mesh *)ob->data;
- if (BKE_id_num_real_users(&me->id) == 1) {
+ if (ID_REAL_USERS(&me->id) == 1) {
bc_copy_materials_to_data(ob, me);
bc_remove_materials_from_object(ob, me);
bc_remove_mark(ob);
}
- else if (BKE_id_num_real_users(&me->id) > 1) {
+ else if (ID_REAL_USERS(&me->id) > 1) {
bool can_move = true;
std::vector<Object *> mesh_users = get_all_users_of(me);
if (mesh_users.size() > 1) {
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c
index 5350468d26c..38f340524b8 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.c
+++ b/source/blender/draw/engines/overlay/overlay_extra.c
@@ -29,7 +29,6 @@
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_global.h"
-#include "BKE_library.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_movieclip.h"
@@ -1501,7 +1500,7 @@ static void OVERLAY_object_center(OVERLAY_ExtraCallBuffers *cb,
OVERLAY_PrivateData *pd,
ViewLayer *view_layer)
{
- const bool is_library = BKE_id_num_real_users(&ob->id) > 1 || ID_IS_LINKED(ob);
+ const bool is_library = ID_REAL_USERS(&ob->id) > 1 || ID_IS_LINKED(ob);
if (ob == OBACT(view_layer)) {
DRW_buffer_add_entry(cb->center_active, ob->obmat[3]);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 24c1c53c25e..452b349cfbf 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2344,7 +2344,7 @@ static int convert_exec(bContext *C, wmOperator *op)
if (!keep_original) {
/* other users */
- if (BKE_id_num_real_users(&cu->id) > 1) {
+ if (ID_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 c3056fff8c5..7e3b0e378ba 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7562,8 +7562,7 @@ 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 = (BKE_id_num_real_users(&mesh->id) >
- 1); /* Always needed for linked duplicates. */
+ bool need_tag = (ID_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 a069b231150..366eeae219c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -46,7 +46,6 @@
#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"
@@ -633,7 +632,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
}
}
- tag_update |= BKE_id_num_real_users(ob->data) > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d);
+ tag_update |= ID_REAL_USERS(ob->data) > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d);
if (ss->shapekey_active || ss->deform_modifiers_active) {
Mesh *mesh = ob->data;