[Bf-blender-cvs] [9b16782aefb] temp-T96710-pbvh-pixels: Remove msg bus subscribe.
Jeroen Bakker
noreply at git.blender.org
Wed Apr 13 13:37:54 CEST 2022
Commit: 9b16782aefbe373c613fe36327890f029af707cf
Author: Jeroen Bakker
Date: Wed Apr 13 11:06:21 2022 +0200
Branches: temp-T96710-pbvh-pixels
https://developer.blender.org/rB9b16782aefbe373c613fe36327890f029af707cf
Remove msg bus subscribe.
===================================================================
M source/blender/editors/include/ED_sculpt.h
M source/blender/editors/sculpt_paint/CMakeLists.txt
D source/blender/editors/sculpt_paint/sculpt_image.cc
M source/blender/editors/space_view3d/space_view3d.c
===================================================================
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index fbe71329423..54d67c50d5c 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -58,11 +58,6 @@ int ED_sculpt_face_sets_active_update_and_get(struct bContext *C,
void ED_sculpt_undo_push_multires_mesh_begin(struct bContext *C, const char *str);
void ED_sculpt_undo_push_multires_mesh_end(struct bContext *C, const char *str);
-/**
- * Subscribe to messages that will trigger a PBVH update.
- */
-void ED_sculpt_pbvh_message_subscribe(const struct wmRegionMessageSubscribeParams *params);
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt
index 71cc3ec1cad..abdae5c44f9 100644
--- a/source/blender/editors/sculpt_paint/CMakeLists.txt
+++ b/source/blender/editors/sculpt_paint/CMakeLists.txt
@@ -67,7 +67,6 @@ set(SRC
sculpt_filter_mask.c
sculpt_filter_mesh.c
sculpt_geodesic.c
- sculpt_image.cc
sculpt_mask_expand.c
sculpt_mask_init.c
sculpt_multiplane_scrape.c
diff --git a/source/blender/editors/sculpt_paint/sculpt_image.cc b/source/blender/editors/sculpt_paint/sculpt_image.cc
deleted file mode 100644
index 395d26f0bf0..00000000000
--- a/source/blender/editors/sculpt_paint/sculpt_image.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later
- * Copyright 2022 Blender Foundation. All rights reserved. */
-#include "DNA_object_types.h"
-
-#include "BKE_context.h"
-#include "BKE_paint.h"
-#include "BKE_pbvh.h"
-#include "BKE_screen.h"
-
-#include "WM_message.h"
-#include "WM_types.h"
-
-#include "ED_sculpt.h"
-
-extern "C" {
-
-static void sculpt_pbvh_do_msg_tag_rebuild_pixels(bContext *C,
- wmMsgSubscribeKey *UNUSED(msg_key),
- wmMsgSubscribeValue *UNUSED(msg_val))
-{
- Object *ob = CTX_data_active_object(C);
- if (ob == nullptr) {
- return;
- }
- SculptSession *ss = ob->sculpt;
- if (ss == nullptr) {
- return;
- }
- BKE_pbvh_mark_update_pixels(ss->pbvh);
-}
-
-void ED_sculpt_pbvh_message_subscribe(const wmRegionMessageSubscribeParams *params)
-{
- struct wmMsgBus *mbus = params->message_bus;
-
- wmMsgSubscribeValue notify_msg = {nullptr};
- notify_msg.notify = sculpt_pbvh_do_msg_tag_rebuild_pixels;
-
- WM_msg_subscribe_rna_anon_prop(mbus, Object, active_material_index, ¬ify_msg);
- WM_msg_subscribe_rna_anon_prop(mbus, MeshUVLoopLayer, active, ¬ify_msg);
- WM_msg_subscribe_rna_anon_type(mbus, Image, ¬ify_msg);
- WM_msg_subscribe_rna_anon_type(mbus, UDIMTile, ¬ify_msg);
-}
-}
\ No newline at end of file
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index c89f4c63351..fafd6c9106a 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1404,11 +1404,10 @@ static void view3d_main_region_message_subscribe(const wmRegionMessageSubscribeP
break;
case OB_MODE_SCULPT:
- ED_sculpt_pbvh_message_subscribe(params);
WM_msg_subscribe_rna_anon_prop(
mbus, WorkSpace, tools, &msg_sub_value_workbench_view_update);
break;
-
+
default:
break;
}
More information about the Bf-blender-cvs
mailing list