[Bf-blender-cvs] [0588ca9] asset-experiments: Merge branch 'asset-engine' into asset-experiments

Bastien Montagne noreply at git.blender.org
Thu Feb 25 15:07:43 CET 2016


Commit: 0588ca9c08762dc91cbfd0a3a6a7fa38414c2f8e
Author: Bastien Montagne
Date:   Thu Feb 25 15:07:27 2016 +0100
Branches: asset-experiments
https://developer.blender.org/rB0588ca9c08762dc91cbfd0a3a6a7fa38414c2f8e

Merge branch 'asset-engine' into asset-experiments

Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_operators.c

===================================================================



===================================================================

diff --cc source/blender/blenkernel/BKE_library.h
index bfa5ef5,2039ae7..af787a6
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@@ -150,9 -121,22 +151,22 @@@ void BKE_id_ui_prefix(char name[66 + 1]
  
  void BKE_library_make_local(struct Main *bmain, struct Library *lib, bool untagged_only, bool set_fake);
  
+ void BKE_library_asset_repository_init(struct Library *lib, const struct AssetEngineType *aet, const char *repo_root);
+ void BKE_library_asset_repository_clear(struct Library *lib);
+ void BKE_library_asset_repository_free(struct Library *lib);
+ struct AssetRef *BKE_library_asset_repository_asset_add(struct Library *lib, const void *idv);
+ void BKE_library_asset_repository_asset_remove(struct Library *lib, const void *idv);
+ struct AssetRef *BKE_library_asset_repository_asset_find(struct Library *lib, const void *idv);
+ void BKE_library_asset_repository_subdata_add(struct AssetRef *aref, const void *idv);
+ void BKE_library_asset_repository_subdata_remove(struct AssetRef *aref, const void *idv);
+ 
+ void BKE_libraries_asset_subdata_remove(struct Main *bmain, const void *idv);
+ void BKE_libraries_asset_repositories_clear(struct Main *bmain);
+ void BKE_libraries_asset_repositories_rebuild(struct Main *bmain);
+ 
  typedef void (*BKE_library_free_window_manager_cb)(struct bContext *, struct wmWindowManager *);
  typedef void (*BKE_library_free_notifier_reference_cb)(const void *);
 -typedef void (*BKE_library_free_editor_id_reference_cb)(const struct ID *);
 +typedef void (*BKE_library_remap_editor_id_reference_cb)(struct ID *, struct ID *);
  
  void BKE_library_callback_free_window_manager_set(BKE_library_free_window_manager_cb func);
  void BKE_library_callback_free_notifier_reference_set(BKE_library_free_notifier_reference_cb func);
diff --cc source/blender/blenloader/BLO_readfile.h
index 10b8d7c,ab001b8..34b7367
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@@ -102,13 -102,11 +102,13 @@@ struct ID *BLO_library_link_named_part(
  struct ID *BLO_library_link_named_part_ex(
          struct Main *mainl, BlendHandle **bh,
          const short idcode, const char *name, const short flag,
 -        struct Scene *scene, struct View3D *v3d);
 +        struct Scene *scene, struct View3D *v3d,
 +        const bool use_placeholders, const bool force_indirect);
  struct ID *BLO_library_link_named_part_asset(
-         struct Main *mainl, BlendHandle **bh, const struct AssetEngineType *aet,
+         struct Main *mainl, BlendHandle **bh, const struct AssetEngineType *aet, const char *root,
          const short idcode, const char *name, const struct AssetUUID *uuid, const short flag,
 -        struct Scene *scene, struct View3D *v3d);
 +        struct Scene *scene, struct View3D *v3d,
 +        const bool use_placeholders, const bool force_indirect);
  void BLO_library_link_end(struct Main *mainl, BlendHandle **bh, short flag, struct Scene *scene, struct View3D *v3d);
  
  void BLO_library_link_copypaste(struct Main *mainl, BlendHandle *bh);
diff --cc source/blender/blenloader/intern/readfile.c
index 7dced0f,772067a..e36f111
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -9770,12 -9771,11 +9777,12 @@@ void BLO_library_link_copypaste(Main *m
  }
  
  static ID *link_named_part_ex(
-         Main *mainl, FileData *fd, const AssetEngineType *aet,
+         Main *mainl, FileData *fd, const AssetEngineType *aet, const char *root,
          const short idcode, const char *name, const AssetUUID *uuid, const int flag,
 -		Scene *scene, View3D *v3d)
 +		Scene *scene, View3D *v3d,
 +        const bool use_placeholders, const bool force_indirect)
  {
 -	ID *id = link_named_part(mainl, fd, idcode, name);
 +	ID *id = link_named_part(mainl, fd, idcode, name, use_placeholders, force_indirect);
  
  	if (id && (GS(id->name) == ID_OB)) {	/* loose object: give a base */
  		link_object_postprocess(id, scene, v3d, flag);
@@@ -9825,12 -9831,12 +9840,12 @@@ ID *BLO_library_link_named_part(Main *m
   * \return the linked ID when found.
   */
  ID *BLO_library_link_named_part_ex(
 -        Main *mainl, BlendHandle **bh,
 -        const short idcode, const char *name, const short flag,
 -        Scene *scene, View3D *v3d)
 +        Main *mainl, BlendHandle **bh, const short idcode, const char *name, const short flag,
 +        Scene *scene, View3D *v3d,
 +        const bool use_placeholders, const bool force_indirect)
  {
  	FileData *fd = (FileData*)(*bh);
- 	return link_named_part_ex(mainl, fd, NULL, idcode, name, NULL, flag, scene, v3d, use_placeholders, force_indirect);
 -	return link_named_part_ex(mainl, fd, NULL, NULL, idcode, name, NULL, flag, scene, v3d);
++	return link_named_part_ex(mainl, fd, NULL, NULL, idcode, name, NULL, flag, scene, v3d, use_placeholders, force_indirect);
  }
  
  /**
@@@ -9849,13 -9856,12 +9865,13 @@@
   * \return the linked ID when found.
   */
  struct ID *BLO_library_link_named_part_asset(
-         Main *mainl, BlendHandle **bh, const AssetEngineType *aet,
+         Main *mainl, BlendHandle **bh, const AssetEngineType *aet, const char *root,
          const short idcode, const char *name, const AssetUUID *uuid, const short flag,
 -        Scene *scene, View3D *v3d)
 +        Scene *scene, View3D *v3d,
 +        const bool use_placeholders, const bool force_indirect)
  {
  	FileData *fd = (FileData*)(*bh);
- 	return link_named_part_ex(mainl, fd, aet, idcode, name, uuid, flag, scene, v3d, use_placeholders, force_indirect);
 -	return link_named_part_ex(mainl, fd, aet, root, idcode, name, uuid, flag, scene, v3d);
++	return link_named_part_ex(mainl, fd, aet, root, idcode, name, uuid, flag, scene, v3d, use_placeholders, force_indirect);
  }
  
  static void link_id_part(ReportList *reports, FileData *fd, Main *mainvar, ID *id, ID **r_id)
diff --cc source/blender/windowmanager/intern/wm_operators.c
index dfccc72,427eee5..21a6076
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@@ -2558,8 -2558,7 +2559,8 @@@ static void wm_link_do
  			}
  
  			new_id = BLO_library_link_named_part_asset(
- 			             mainl, &bh, aet, item->idcode, item->name, item->uuid, flag, scene, v3d,
 -			             mainl, &bh, aet, lapp_data->root, item->idcode, item->name, item->uuid, flag, scene, v3d);
++			             mainl, &bh, aet, lapp_data->root, item->idcode, item->name, item->uuid, flag, scene, v3d,
 +			             use_placeholders, force_indirect);
  
  			if (new_id) {
  				/* If the link is sucessful, clear item's libs 'todo' flags.




More information about the Bf-blender-cvs mailing list