From 2223d63c58c9a2125fb4a2e6ee1c780c781a95bb Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 29 Jun 2018 12:46:54 +0200 Subject: Refactor static override code to pass Main around. Access to main database is actually rarely needed, but some custom 'apply' functions do need it (like Collections' overriding of objects or children collections). --- source/blender/blenkernel/BKE_library_override.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/BKE_library_override.h') diff --git a/source/blender/blenkernel/BKE_library_override.h b/source/blender/blenkernel/BKE_library_override.h index 6f32d565562..4792d203d23 100644 --- a/source/blender/blenkernel/BKE_library_override.h +++ b/source/blender/blenkernel/BKE_library_override.h @@ -62,10 +62,10 @@ struct IDOverrideStaticPropertyOperation *BKE_override_static_property_operation void BKE_override_static_property_operation_delete( struct IDOverrideStaticProperty *override_property, struct IDOverrideStaticPropertyOperation *override_property_operation); -bool BKE_override_static_status_check_local(struct ID *local); -bool BKE_override_static_status_check_reference(struct ID *local); +bool BKE_override_static_status_check_local(struct Main *bmain, struct ID *local); +bool BKE_override_static_status_check_reference(struct Main *bmain, struct ID *local); -bool BKE_override_static_operations_create(struct ID *local, const bool force_auto); +bool BKE_override_static_operations_create(struct Main *bmain, struct ID *local, const bool force_auto); void BKE_main_override_static_operations_create(struct Main *bmain, const bool force_auto); void BKE_override_static_update(struct Main *bmain, struct ID *local); @@ -78,7 +78,8 @@ void BKE_main_override_static_update(struct Main *bmain); typedef struct Main OverrideStaticStorage; OverrideStaticStorage *BKE_override_static_operations_store_initialize(void); -struct ID *BKE_override_static_operations_store_start(OverrideStaticStorage *override_storage, struct ID *local); +struct ID *BKE_override_static_operations_store_start( + struct Main *bmain, OverrideStaticStorage *override_storage, struct ID *local); void BKE_override_static_operations_store_end(OverrideStaticStorage *override_storage, struct ID *local); void BKE_override_static_operations_store_finalize(OverrideStaticStorage *override_storage); -- cgit v1.2.3