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
committerJulian Eisel <julian@blender.org>2022-03-14 18:50:49 +0300
commit9b298cf3dbec9e246748448cc635a5055fe90c19 (patch)
treec9fb6ddaf16bec463d9d4dd5a65a8c9d285afc8f /source/blender/editors/space_outliner
parentcff6eb65804da3a06bde3c9152bec26e01a24992 (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 3b14c8542bd..612baaa0752 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -1719,8 +1719,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);
@@ -1780,7 +1778,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 *********************** */