Cleanup: Move `BKE_callbacks.h` and `BKE_cachefile.h` to CPP headers.
This commit is contained in:
parent
a9b2cf8ce6
commit
deab8c085a
|
@ -19,7 +19,7 @@
|
|||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
struct IDRemapper;
|
||||
struct Main;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "BLI_string.h"
|
||||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
||||
#include "DNA_asset_types.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "AS_asset_catalog.hh"
|
||||
#include "AS_asset_library.hh"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "asset_library_service.hh"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "asset_library_service.hh"
|
||||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "BLI_fileops.h"
|
||||
#include "BLI_path_util.h"
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
/* SPDX-FileCopyrightText: 2016 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma once
|
||||
|
||||
/** \file
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct CacheFile;
|
||||
struct CacheFileLayer;
|
||||
struct CacheReader;
|
||||
struct Depsgraph;
|
||||
struct Main;
|
||||
struct Object;
|
||||
struct Scene;
|
||||
|
||||
void BKE_cachefiles_init(void);
|
||||
void BKE_cachefiles_exit(void);
|
||||
|
||||
void *BKE_cachefile_add(struct Main *bmain, const char *name);
|
||||
|
||||
void BKE_cachefile_reload(struct Depsgraph *depsgraph, struct CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_eval(struct Main *bmain,
|
||||
struct Depsgraph *depsgraph,
|
||||
struct CacheFile *cache_file);
|
||||
|
||||
bool BKE_cachefile_filepath_get(const struct Main *bmain,
|
||||
const struct Depsgraph *depsgraph,
|
||||
const struct CacheFile *cache_file,
|
||||
char r_filepath[1024]);
|
||||
|
||||
double BKE_cachefile_time_offset(const struct CacheFile *cache_file, double time, double fps);
|
||||
|
||||
/* Modifiers and constraints open and free readers through these. */
|
||||
void BKE_cachefile_reader_open(struct CacheFile *cache_file,
|
||||
struct CacheReader **reader,
|
||||
struct Object *object,
|
||||
const char *object_path);
|
||||
void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader);
|
||||
|
||||
/**
|
||||
* Determine whether the #CacheFile should use a render engine procedural. If so, data is not read
|
||||
* from the file and bounding boxes are used to represent the objects in the Scene.
|
||||
* Render engines will receive the bounding box as a placeholder but can instead
|
||||
* load the data directly if they support it.
|
||||
*/
|
||||
bool BKE_cache_file_uses_render_procedural(const struct CacheFile *cache_file,
|
||||
struct Scene *scene);
|
||||
|
||||
/**
|
||||
* Add a layer to the cache_file. Return NULL if the `filepath` is already that of an existing
|
||||
* layer or if the number of layers exceeds the maximum allowed layer count.
|
||||
*/
|
||||
struct CacheFileLayer *BKE_cachefile_add_layer(struct CacheFile *cache_file,
|
||||
const char filepath[1024]);
|
||||
|
||||
struct CacheFileLayer *BKE_cachefile_get_active_layer(struct CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_remove_layer(struct CacheFile *cache_file, struct CacheFileLayer *layer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,58 @@
|
|||
/* SPDX-FileCopyrightText: 2016 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma once
|
||||
|
||||
/** \file
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
struct CacheFile;
|
||||
struct CacheFileLayer;
|
||||
struct CacheReader;
|
||||
struct Depsgraph;
|
||||
struct Main;
|
||||
struct Object;
|
||||
struct Scene;
|
||||
|
||||
void BKE_cachefiles_init(void);
|
||||
void BKE_cachefiles_exit(void);
|
||||
|
||||
void *BKE_cachefile_add(Main *bmain, const char *name);
|
||||
|
||||
void BKE_cachefile_reload(Depsgraph *depsgraph, CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_eval(Main *bmain, Depsgraph *depsgraph, CacheFile *cache_file);
|
||||
|
||||
bool BKE_cachefile_filepath_get(const Main *bmain,
|
||||
const Depsgraph *depsgraph,
|
||||
const CacheFile *cache_file,
|
||||
char r_filepath[1024]);
|
||||
|
||||
double BKE_cachefile_time_offset(const CacheFile *cache_file, double time, double fps);
|
||||
|
||||
/* Modifiers and constraints open and free readers through these. */
|
||||
void BKE_cachefile_reader_open(CacheFile *cache_file,
|
||||
CacheReader **reader,
|
||||
Object *object,
|
||||
const char *object_path);
|
||||
void BKE_cachefile_reader_free(CacheFile *cache_file, CacheReader **reader);
|
||||
|
||||
/**
|
||||
* Determine whether the #CacheFile should use a render engine procedural. If so, data is not read
|
||||
* from the file and bounding boxes are used to represent the objects in the Scene.
|
||||
* Render engines will receive the bounding box as a placeholder but can instead
|
||||
* load the data directly if they support it.
|
||||
*/
|
||||
bool BKE_cache_file_uses_render_procedural(const CacheFile *cache_file, Scene *scene);
|
||||
|
||||
/**
|
||||
* Add a layer to the cache_file. Return NULL if the `filepath` is already that of an existing
|
||||
* layer or if the number of layers exceeds the maximum allowed layer count.
|
||||
*/
|
||||
CacheFileLayer *BKE_cachefile_add_layer(CacheFile *cache_file, const char filepath[1024]);
|
||||
|
||||
CacheFileLayer *BKE_cachefile_get_active_layer(CacheFile *cache_file);
|
||||
|
||||
void BKE_cachefile_remove_layer(CacheFile *cache_file, CacheFileLayer *layer);
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct Depsgraph;
|
||||
struct ID;
|
||||
struct Main;
|
||||
|
@ -117,24 +113,18 @@ typedef enum {
|
|||
BKE_CB_EVT_TOT,
|
||||
} eCbEvent;
|
||||
|
||||
typedef struct bCallbackFuncStore {
|
||||
struct bCallbackFuncStore *next, *prev;
|
||||
void (*func)(struct Main *, struct PointerRNA **, int num_pointers, void *arg);
|
||||
struct bCallbackFuncStore {
|
||||
bCallbackFuncStore *next, *prev;
|
||||
void (*func)(Main *, PointerRNA **, int num_pointers, void *arg);
|
||||
void *arg;
|
||||
short alloc;
|
||||
} bCallbackFuncStore;
|
||||
};
|
||||
|
||||
void BKE_callback_exec(struct Main *bmain,
|
||||
struct PointerRNA **pointers,
|
||||
int num_pointers,
|
||||
eCbEvent evt);
|
||||
void BKE_callback_exec_null(struct Main *bmain, eCbEvent evt);
|
||||
void BKE_callback_exec_id(struct Main *bmain, struct ID *id, eCbEvent evt);
|
||||
void BKE_callback_exec_id_depsgraph(struct Main *bmain,
|
||||
struct ID *id,
|
||||
struct Depsgraph *depsgraph,
|
||||
eCbEvent evt);
|
||||
void BKE_callback_exec_string(struct Main *bmain, eCbEvent evt, const char *str);
|
||||
void BKE_callback_exec(Main *bmain, PointerRNA **pointers, int num_pointers, eCbEvent evt);
|
||||
void BKE_callback_exec_null(Main *bmain, eCbEvent evt);
|
||||
void BKE_callback_exec_id(Main *bmain, ID *id, eCbEvent evt);
|
||||
void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, eCbEvent evt);
|
||||
void BKE_callback_exec_string(Main *bmain, eCbEvent evt, const char *str);
|
||||
void BKE_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt);
|
||||
void BKE_callback_remove(bCallbackFuncStore *funcstore, eCbEvent evt);
|
||||
|
||||
|
@ -143,7 +133,3 @@ void BKE_callback_global_init(void);
|
|||
* Call on application exit.
|
||||
*/
|
||||
void BKE_callback_global_finalize(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -352,8 +352,8 @@ set(SRC
|
|||
BKE_bpath.hh
|
||||
BKE_brush.hh
|
||||
BKE_bvhutils.hh
|
||||
BKE_cachefile.h
|
||||
BKE_callbacks.h
|
||||
BKE_cachefile.hh
|
||||
BKE_callbacks.hh
|
||||
BKE_camera.h
|
||||
BKE_ccg.h
|
||||
BKE_cdderivedmesh.h
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#include "BKE_blender_version.h" /* own include */
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_brush.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_idprop.h"
|
||||
#include "BKE_image.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_bpath.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_lib_id.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "BKE_animsys.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_bvhutils.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_camera.h"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_curve.hh"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "DNA_workspace_types.h"
|
||||
#include "DNA_world_types.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math_rotation.h"
|
||||
#include "BLI_string.h"
|
||||
|
@ -59,7 +59,7 @@
|
|||
#include "BKE_animsys.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_bpath.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_colortools.hh"
|
||||
#include "BKE_curveprofile.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_idtype.hh"
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include "BKE_animsys.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_bake_geometry_nodes_modifier.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_curve.hh"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_gpencil_geom_legacy.h"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "BKE_action.h"
|
||||
#include "BKE_blender_version.h"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_colorband.hh"
|
||||
#include "BKE_colortools.hh"
|
||||
#include "BKE_constraint.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_lib_id.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "BLI_string.h"
|
||||
|
||||
#include "BKE_attribute.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_editmesh.hh"
|
||||
#include "BKE_global.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "DNA_userdef_types.h"
|
||||
#include "DNA_workspace_types.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_editmesh.hh"
|
||||
#include "BKE_fcurve.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "DNA_text_types.h"
|
||||
#include "DNA_world_types.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_image.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "BLI_fileops.h"
|
||||
#include "BLI_path_util.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_main.hh"
|
||||
#include "BKE_preferences.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "BLT_translation.hh"
|
||||
|
||||
#include "BKE_blender_undo.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_layer.hh"
|
||||
|
|
|
@ -28,7 +28,7 @@ using namespace Freestyle;
|
|||
#include "DNA_material_types.h"
|
||||
#include "DNA_text_types.h"
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_freestyle.h"
|
||||
#include "BKE_global.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_curve.hh"
|
||||
#include "BKE_global.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender_version.h"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
|
|
|
@ -27,7 +27,7 @@ const EnumPropertyItem rna_enum_velocity_unit_items[] = {
|
|||
|
||||
# include "BLI_string.h"
|
||||
|
||||
# include "BKE_cachefile.h"
|
||||
# include "BKE_cachefile.hh"
|
||||
|
||||
# include "DEG_depsgraph.hh"
|
||||
# include "DEG_depsgraph_build.hh"
|
||||
|
|
|
@ -279,7 +279,7 @@ static const EnumPropertyItem modifier_noise_random_mode_items[] = {
|
|||
# include "DNA_material_types.h"
|
||||
# include "DNA_particle_types.h"
|
||||
|
||||
# include "BKE_cachefile.h"
|
||||
# include "BKE_cachefile.hh"
|
||||
# include "BKE_context.hh"
|
||||
# include "BKE_gpencil_legacy.h"
|
||||
# include "BKE_gpencil_modifier_legacy.h"
|
||||
|
|
|
@ -731,7 +731,7 @@ const EnumPropertyItem rna_enum_subdivision_boundary_smooth_items[] = {
|
|||
# include "DNA_material_types.h"
|
||||
# include "DNA_particle_types.h"
|
||||
|
||||
# include "BKE_cachefile.h"
|
||||
# include "BKE_cachefile.hh"
|
||||
# include "BKE_context.hh"
|
||||
# include "BKE_deform.hh"
|
||||
# include "BKE_material.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "BKE_addon.h"
|
||||
#include "BKE_appdir.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_sound.h"
|
||||
#include "BKE_studiolight.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_lib_query.hh"
|
||||
#include "BKE_mesh.hh"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "BLI_utildefines.h"
|
||||
#include <Python.h>
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_prototypes.h"
|
||||
|
@ -41,7 +41,7 @@ static PyTypeObject BlenderAppCbType;
|
|||
"the file being loaded, an empty string for the startup-file."
|
||||
|
||||
/**
|
||||
* See `BKE_callbacks.h` #eCbEvent declaration for the policy on naming.
|
||||
* See `BKE_callbacks.hh` #eCbEvent declaration for the policy on naming.
|
||||
*/
|
||||
static PyStructSequence_Field app_cb_info_fields[] = {
|
||||
{"frame_change_pre",
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include "BKE_anim_data.h"
|
||||
#include "BKE_animsys.h" /* <------ should this be here?, needed for sequencer update */
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_camera.h"
|
||||
#include "BKE_colortools.hh"
|
||||
#include "BKE_global.h"
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#include "BKE_blender.hh"
|
||||
#include "BKE_blender_version.h"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_idprop.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_blendfile.hh"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_icons.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* \ingroup wm
|
||||
*/
|
||||
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_idprop.h"
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "BKE_appdir.hh"
|
||||
#include "BKE_blender.hh"
|
||||
#include "BKE_brush.hh"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_callbacks.h"
|
||||
#include "BKE_cachefile.hh"
|
||||
#include "BKE_callbacks.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_cpp_types.hh"
|
||||
#include "BKE_global.h"
|
||||
|
|
Loading…
Reference in New Issue