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-03-14 18:39:42 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:30:40 +0300
commitd0a8f300c13dd01658f79ddf201bd5344320c60f (patch)
treeef3c1f602a0e6810dbdbe048f01bf077a9d801af /source/blender/editors/space_outliner
parentd67bca9ee4dd177357d1e2eb02de62e1d69f7c24 (diff)
RNA: Generate property declerations header, solving msg-bus C++ incompatibility
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/CMakeLists.txt5
-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
5 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt
index a91de37fa76..b57525854d6 100644
--- a/source/blender/editors/space_outliner/CMakeLists.txt
+++ b/source/blender/editors/space_outliner/CMakeLists.txt
@@ -15,6 +15,8 @@ set(INC
../../../../intern/clog
../../../../intern/glew-mx
../../../../intern/guardedalloc
+ # RNA_prototypes.h
+ ${CMAKE_BINARY_DIR}/source/blender/makesrna
)
@@ -82,3 +84,6 @@ set(LIB
blender_add_lib(bf_editor_space_outliner "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+
+# RNA_prototypes.h
+add_dependencies(bf_editor_space_outliner bf_rna)
diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc
index 7c0ccd7b14c..716d5b67fe3 100644
--- a/source/blender/editors/space_outliner/outliner_collections.cc
+++ b/source/blender/editors/space_outliner/outliner_collections.cc
@@ -391,8 +391,6 @@ 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);
@@ -416,7 +414,6 @@ 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 7b62b28abc5..4ef0bbbcde8 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -660,8 +660,6 @@ 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);
@@ -859,7 +857,6 @@ static void namebutton_fn(bContext *C, void *tsep, char *oldname)
tselem->flag &= ~TSE_TEXTBUT;
}
}
-}
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 8fe40dde118..77336dc1867 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -1712,8 +1712,6 @@ 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);
@@ -1773,7 +1771,6 @@ 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 655010bb59f..f75182d25a0 100644
--- a/source/blender/editors/space_outliner/space_outliner.cc
+++ b/source/blender/editors/space_outliner/space_outliner.cc
@@ -259,8 +259,6 @@ 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;
@@ -277,7 +275,6 @@ 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 *********************** */