Cleanup: Move BKE_blender.h
to CPP header.
Also fix comment in `build_files/cmake/macros.cmake`, CMake blender version parsing depends in the (still C) `BKE_blender_version.h` header now.
This commit is contained in:
parent
45e7827898
commit
b21ceece05
@ -849,7 +849,7 @@ function(get_blender_version)
|
||||
# - BLENDER_VERSION_PATCH
|
||||
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
|
||||
|
||||
# So CMAKE depends on `BKE_blender.h`, beware of infinite-loops!
|
||||
# So CMAKE depends on `BKE_blender_version.h`, beware of infinite-loops!
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender_version.h.done
|
||||
|
@ -6,7 +6,7 @@
|
||||
* \ingroup asset_system
|
||||
*/
|
||||
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_preferences.h"
|
||||
|
||||
#include "BLI_path_util.h"
|
||||
|
@ -8,10 +8,6 @@
|
||||
* \brief Blender util stuff
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "BLI_compiler_attrs.h"
|
||||
|
||||
struct Main;
|
||||
@ -26,40 +22,35 @@ void BKE_blender_globals_init(void);
|
||||
void BKE_blender_globals_clear(void);
|
||||
|
||||
/** Replace current global Main by the given one, freeing existing one. */
|
||||
void BKE_blender_globals_main_replace(struct Main *bmain);
|
||||
void BKE_blender_globals_main_replace(Main *bmain);
|
||||
/**
|
||||
* Replace current global Main by the given one, returning the old one.
|
||||
*
|
||||
* \warning Advanced, risky workaround addressing the issue that current RNA is not able to process
|
||||
* correctly non-G_MAIN data, use with (a lot of) care.
|
||||
*/
|
||||
struct Main *BKE_blender_globals_main_swap(struct Main *new_gmain);
|
||||
Main *BKE_blender_globals_main_swap(Main *new_gmain);
|
||||
|
||||
void BKE_blender_userdef_data_swap(struct UserDef *userdef_a, struct UserDef *userdef_b);
|
||||
void BKE_blender_userdef_data_set(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_data_set_and_free(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_data_swap(UserDef *userdef_a, UserDef *userdef_b);
|
||||
void BKE_blender_userdef_data_set(UserDef *userdef);
|
||||
void BKE_blender_userdef_data_set_and_free(UserDef *userdef);
|
||||
|
||||
/**
|
||||
* This function defines which settings a template will override for the user preferences.
|
||||
*
|
||||
* \note the order of `userdef_a` & `userdef_b` isn't important as values are simply swapped.
|
||||
*/
|
||||
void BKE_blender_userdef_app_template_data_swap(struct UserDef *userdef_a,
|
||||
struct UserDef *userdef_b);
|
||||
void BKE_blender_userdef_app_template_data_set(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_app_template_data_set_and_free(struct UserDef *userdef);
|
||||
void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *userdef_b);
|
||||
void BKE_blender_userdef_app_template_data_set(UserDef *userdef);
|
||||
void BKE_blender_userdef_app_template_data_set_and_free(UserDef *userdef);
|
||||
|
||||
/**
|
||||
* When loading a new userdef from file,
|
||||
* or when exiting Blender.
|
||||
*/
|
||||
void BKE_blender_userdef_data_free(struct UserDef *userdef, bool clear_fonts);
|
||||
void BKE_blender_userdef_data_free(UserDef *userdef, bool clear_fonts);
|
||||
|
||||
/* Blenders' own atexit (avoids leaking) */
|
||||
void BKE_blender_atexit_register(void (*func)(void *user_data), void *user_data);
|
||||
void BKE_blender_atexit_unregister(void (*func)(void *user_data), const void *user_data);
|
||||
void BKE_blender_atexit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -341,7 +341,7 @@ set(SRC
|
||||
BKE_bake_items_paths.hh
|
||||
BKE_bake_items_serialize.hh
|
||||
BKE_bake_items_socket.hh
|
||||
BKE_blender.h
|
||||
BKE_blender.hh
|
||||
BKE_blender_copybuffer.hh
|
||||
BKE_blender_undo.hh
|
||||
BKE_blender_user_menu.hh
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "IMB_moviecache.hh"
|
||||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_blender.h" /* own include */
|
||||
#include "BKE_blender.hh" /* own include */
|
||||
#include "BKE_blender_user_menu.hh" /* own include */
|
||||
#include "BKE_blender_version.h" /* own include */
|
||||
#include "BKE_blendfile.hh"
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_blender_version.h"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_bpath.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_fcurve.h"
|
||||
#include "BKE_global.h"
|
||||
|
@ -62,7 +62,7 @@
|
||||
#undef DNA_GENFILE_VERSIONING_MACROS
|
||||
|
||||
#include "BKE_animsys.h"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_brush.hh"
|
||||
#include "BKE_cloth.hh"
|
||||
#include "BKE_collection.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "BKE_DerivedMesh.hh"
|
||||
#include "BKE_attribute.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_customdata.hh"
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_gpencil_legacy.h"
|
||||
#include "BKE_layer.hh"
|
||||
|
@ -173,7 +173,7 @@ static const EnumPropertyItem rna_enum_preference_gpu_backend_items[] = {
|
||||
# include "DNA_object_types.h"
|
||||
# include "DNA_screen_types.h"
|
||||
|
||||
# include "BKE_blender.h"
|
||||
# include "BKE_blender.hh"
|
||||
# include "BKE_global.h"
|
||||
# include "BKE_idprop.h"
|
||||
# include "BKE_image.h"
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_autoexec.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_blender_version.h"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "BLO_undofile.hh"
|
||||
#include "BLO_writefile.hh"
|
||||
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_context.hh"
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
/* Mostly initialization functions. */
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_brush.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_callbacks.h"
|
||||
|
Loading…
Reference in New Issue
Block a user