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:
authorJulian Eisel <julian@blender.org>2022-01-13 22:40:52 +0300
committerJulian Eisel <julian@blender.org>2022-01-13 22:40:52 +0300
commit800fc17367480b82e07570d5234726aa61c38563 (patch)
tree4a00b76ac3b021bb7b6460f4865da3c0dab2122b /source/blender/editors
parent1c4a1c13e04e51d00767fdb478a9957faae815e2 (diff)
Fix/workaround MSVC compile error with messag-bus
Some of the message-bus macros are not safe to use in C++. This has come up before, but no good solution was found. Now @LazyDodo, @HooglyBoogly and I concluded this is the best duct tape "solution" for the moment. The message-bus API should address this.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.cc3
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.cc3
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.cc3
-rw-r--r--source/blender/editors/space_outliner/space_outliner.cc3
4 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc
index 9fc841fcba9..e4c4d41a04b 100644
--- a/source/blender/editors/space_outliner/outliner_collections.cc
+++ b/source/blender/editors/space_outliner/outliner_collections.cc
@@ -385,6 +385,8 @@ void outliner_collection_delete(
BLI_gset_free(data.collections_to_edit, nullptr);
}
+/* FIXME: See comment above #WM_msg_publish_rna_prop(). */
+extern "C" {
static int collection_hierarchy_delete_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
@@ -408,6 +410,7 @@ static int collection_hierarchy_delete_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
+}
void OUTLINER_OT_collection_hierarchy_delete(wmOperatorType *ot)
{
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 9c522effa5e..3d29f1762ec 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -668,6 +668,8 @@ static void scenes__collection_set_flag_recursive_fn(bContext *C, void *poin, vo
outliner_collection_set_flag_recursive_fn(C, nullptr, collection, propname);
}
+/* FIXME: See comment above #WM_msg_publish_rna_prop(). */
+extern "C" {
static void namebutton_fn(bContext *C, void *tsep, char *oldname)
{
Main *bmain = CTX_data_main(C);
@@ -865,6 +867,7 @@ static void namebutton_fn(bContext *C, void *tsep, char *oldname)
tselem->flag &= ~TSE_TEXTBUT;
}
}
+}
typedef struct RestrictProperties {
bool initialized;
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 097d7181c99..89d35f54e8c 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -1686,6 +1686,8 @@ static TreeTraversalAction outliner_find_objects_to_delete(TreeElement *te, void
return TRAVERSE_CONTINUE;
}
+/* FIXME: See comment above #WM_msg_publish_rna_prop(). */
+extern "C" {
static int outliner_delete_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
@@ -1745,6 +1747,7 @@ static int outliner_delete_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
+}
void OUTLINER_OT_delete(wmOperatorType *ot)
{
diff --git a/source/blender/editors/space_outliner/space_outliner.cc b/source/blender/editors/space_outliner/space_outliner.cc
index ea6ecbfe84c..d3a78425242 100644
--- a/source/blender/editors/space_outliner/space_outliner.cc
+++ b/source/blender/editors/space_outliner/space_outliner.cc
@@ -262,6 +262,8 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
}
}
+/* FIXME: See comment above #WM_msg_publish_rna_prop(). */
+extern "C" {
static void outliner_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
{
struct wmMsgBus *mbus = params->message_bus;
@@ -278,6 +280,7 @@ static void outliner_main_region_message_subscribe(const wmRegionMessageSubscrib
WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
}
}
+}
/* ************************ header outliner area region *********************** */