Commit: 26428a3e00642299582fc73285b6b4313b981d0c
Author: Julian Eisel
Date:   Thu Jun 11 15:49:47 2020 +0200
Branches: asset-engine
https://developer.blender.org/rB26428a3e00642299582fc73285b6b4313b981d0c

Merge branch 'asset-uuid' into asset-engine

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



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

diff --cc release/scripts/startup/bl_ui/space_filebrowser.py
index eafe1450c4d,9a39d840149..d4758eb5b84
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@@ -32,73 -31,11 +33,72 @@@ class FILEBROWSER_HT_header(Header)
  
          if st.active_operator is None:
              layout.template_header()
 +            layout.separator()
 +
 +        if is_lib_browser:
 +            row = layout.row()
 +            row.prop(st, "asset_engine_type", text="")
 +            layout.separator()
  
-         layout.menu("FILEBROWSER_MT_view")
-         layout.menu("FILEBROWSER_MT_select")
+         FILEBROWSER_MT_editor_menus.draw_collapsible(context, layout)
  
          # can be None when save/reload with a file selector open
 -
 +        """
 +        <<<<< HEAD
 +                layout.separator()
 +                if st.asset_engine and is_lib_browser:
 +                    draw_header = getattr(st.asset_engine, "draw_header", 
None)
 +                    if draw_header:
 +                        draw_header(layout, context)
 +                else:
 +                    layout.operator_context = 'EXEC_DEFAULT'
 +                    layout.operator("file.directory_new", icon='NEWFOLDER', 
text="")
 +                    layout.separator()
 +
 +                    layout.operator_context = 'INVOKE_DEFAULT'
 +
 +                    # can be None when save/reload with a file selector open
 +                    if params:
 +                        layout.prop(params, "display_type", expand=True, 
text="")
 +                        layout.prop(params, "sort_method", expand=True, 
text="")
 +                        layout.prop(params, "show_hidden", text="", 
icon='FILE_HIDDEN')
 +
 +                    layout.separator_spacer()
 +
 +                    layout.template_running_jobs()
 +
 +                    if params:
 +                        layout.prop(params, "use_filter", text="", 
icon='FILTER')
 +
 +                        row = layout.row(align=True)
 +                        row.active = params.use_filter
 +
 +                        row.prop(params, "use_filter_folder", text="")
 +
 +                        if params.filter_glob:
 +                            # if st.active_operator and 
hasattr(st.active_operator, "filter_glob"):
 +                            #     row.prop(params, "filter_glob", text="")
 +                            row.label(params.filter_glob)
 +                        else:
 +                            row.prop(params, "use_filter_blender", text="")
 +                            row.prop(params, "use_filter_backup", text="")
 +                            row.prop(params, "use_filter_image", text="")
 +                            row.prop(params, "use_filter_movie", text="")
 +                            row.prop(params, "use_filter_script", text="")
 +                            row.prop(params, "use_filter_font", text="")
 +                            row.prop(params, "use_filter_sound", text="")
 +                            row.prop(params, "use_filter_text", text="")
 +
 +                        if is_lib_browser:
 +                            row.prop(params, "use_filter_blendid", text="")
 +                            if params.use_filter_blendid:
 +                                row.separator()
 +                                row.prop(params, "filter_id_category", 
text="")
 +
 +                        row.separator()
 +                        row.prop(params, "filter_search", text="", 
icon='VIEWZOOM')
 +        =====
 +        """
          layout.separator_spacer()
  
          layout.template_running_jobs()
@@@ -223,23 -169,11 +232,14 @@@ def panel_poll_is_upper_region(region)
      # Note that after "Flip Regions" it's right-aligned.
      return region.alignment in {'LEFT', 'RIGHT'}
  
 +"""
 +>>>>> master
 +"""
  
  class FILEBROWSER_UL_dir(UIList):
-     def draw_item(self, _context, layout, _data, item, icon, _active_data, 
active_propname, _index):
+     def draw_item(self, _context, layout, _data, item, icon, _active_data, 
_active_propname, _index):
          direntry = item
          # space = context.space_data
-         icon = 'NONE'
-         if active_propname == "system_folders_active":
-             icon = 'DISK_DRIVE'
-         if active_propname == "system_bookmarks_active":
-             icon = 'BOOKMARKS'
-         if active_propname == "bookmarks_active":
-             icon = 'BOOKMARKS'
-         if active_propname == "recent_folders_active":
-             icon = 'FILE_FOLDER'
  
          if self.layout_type in {'DEFAULT', 'COMPACT'}:
              row = layout.row(align=True)
diff --cc source/blender/blenkernel/BKE_library.h
index cb16ac5a16e,7883d740b0a..f19fa0becfe
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@@ -25,256 -27,15 +27,41 @@@
  
  #include "BLI_compiler_attrs.h"
  
- /**
-  * Naming: BKE_id_ vs BKE_libblock_
-  *
-  * WARNING: description below is ideal goal, current status of naming does 
not yet
-  * fully follow it (this is WIP).
-  *
-  * - BKE_id_ should be used for rather high-level operations, that involve 
Main database and
-  *   relations with other IDs, and can be considered as 'safe'
-  *   (as in, in themselves, they leave affected IDs/Main in a consistent 
status).
-  *
-  * - BKE_libblock_ should be used for lower level operations,
-  *   that perform some parts of BKE_id_ ones, but will generally not ensure 
caller that affected
-  *   data is in a consistent state by their own execution alone.
-  *
-  * Consequently, external code should not typically use BKE_libblock_ 
functions,
-  * except in some specific cases requiring advanced (and potentially 
dangerous) handling.
-  */
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
  
 +struct AssetEngineType;
 +struct AssetUUID;
 +struct BlendThumbnail;
 +struct GHash;
 +struct ID;
  struct Library;
- struct ListBase;
  struct Main;
- struct PointerRNA;
- struct PropertyRNA;
- struct bContext;
  
- size_t BKE_libblock_get_alloc_info(short type, const char **name);
- void *BKE_libblock_alloc_notest(short type) ATTR_WARN_UNUSED_RESULT;
- void *BKE_libblock_alloc(struct Main *bmain, short type, const char *name, 
const int flag)
-     ATTR_WARN_UNUSED_RESULT;
- void BKE_libblock_init_empty(struct ID *id) ATTR_NONNULL(1);
- 
- void *BKE_id_new(struct Main *bmain, const short type, const char *name);
- void *BKE_id_new_nomain(const short type, const char *name);
- 
- /**
-  * New ID creation/copying options.
-  */
- enum {
-   /* *** Generic options (should be handled by all ID types copying, ID 
creation, etc.). *** */
-   /** Create datablock outside of any main database -
-    * similar to 'localize' functions of materials etc. */
-   LIB_ID_CREATE_NO_MAIN = 1 << 0,
-   /** Do not affect user refcount of datablocks used by new one
-    * (which also gets zero usercount then).
-    * Implies LIB_ID_CREATE_NO_MAIN. */
-   LIB_ID_CREATE_NO_USER_REFCOUNT = 1 << 1,
-   /** Assume given 'newid' already points to allocated memory for whole 
datablock
-    * (ID + data) - USE WITH CAUTION!
-    * Implies LIB_ID_CREATE_NO_MAIN. */
-   LIB_ID_CREATE_NO_ALLOCATE = 1 << 2,
- 
-   /** Do not tag new ID for update in depsgraph. */
-   LIB_ID_CREATE_NO_DEG_TAG = 1 << 8,
- 
-   /* *** Specific options to some ID types or usages. *** */
-   /* *** May be ignored by unrelated ID copying functions. *** */
-   /** Object only, needed by make_local code. */
-   LIB_ID_COPY_NO_PROXY_CLEAR = 1 << 16,
-   /** Do not copy preview data, when supported. */
-   LIB_ID_COPY_NO_PREVIEW = 1 << 17,
-   /** Copy runtime data caches. */
-   LIB_ID_COPY_CACHES = 1 << 18,
-   /** Don't copy id->adt, used by ID datablock localization routines. */
-   LIB_ID_COPY_NO_ANIMDATA = 1 << 19,
-   /** Mesh: Reference CD data layers instead of doing real copy - USE WITH 
CAUTION! */
-   LIB_ID_COPY_CD_REFERENCE = 1 << 20,
- 
-   /* *** XXX Hackish/not-so-nice specific behaviors needed for some corner 
cases. *** */
-   /* *** Ideally we should not have those, but we need them for now... *** */
-   /** EXCEPTION! Deep-copy actions used by animdata of copied ID. */
-   LIB_ID_COPY_ACTIONS = 1 << 24,
-   /** Keep the library pointer when copying datablock outside of bmain. */
-   LIB_ID_COPY_KEEP_LIB = 1 << 25,
-   /** EXCEPTION! Deep-copy shapekeys used by copied obdata ID. */
-   LIB_ID_COPY_SHAPEKEY = 1 << 26,
- 
-   /* *** Helper 'defines' gathering most common flag sets. *** */
-   /** Shapekeys are not real ID's, more like local data to geometry IDs... */
-   LIB_ID_COPY_DEFAULT = LIB_ID_COPY_SHAPEKEY,
-   /** Generate a local copy, outside of bmain, to work on (used by COW e.g.). 
*/
-   LIB_ID_COPY_LOCALIZE = LIB_ID_CREATE_NO_MAIN | 
LIB_ID_CREATE_NO_USER_REFCOUNT |
-                          LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW | 
LIB_ID_COPY_CACHES,
- };
- 
- void BKE_libblock_copy_ex(struct Main *bmain,
-                           const struct ID *id,
-                           struct ID **r_newid,
-                           const int orig_flag);
- void *BKE_libblock_copy(struct Main *bmain, const struct ID *id) 
ATTR_WARN_UNUSED_RESULT
-     ATTR_NONNULL();
- /* Special version. sued by datablock localization. */
- void *BKE_libblock_copy_for_localize(const struct ID *id);
- 
- void BKE_libblock_rename(struct Main *bmain, struct ID *id, const char *name) 
ATTR_NONNULL();
- void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) 
ATTR_NONNULL();
- 
- struct ID *BKE_libblock_find_name(struct Main *bmain,
-                                   const short type,
-                                   const char *name) ATTR_WARN_UNUSED_RESULT 
ATTR_NONNULL();
- 
- /* library_remap.c (keep here since they're general functions) */
- /**
-  * New freeing logic options.
-  */
- enum {
-   /* *** Generic options (should be handled by all ID types freeing). *** */
-   /** Do not try to remove freed ID from given Main (passed Main may be 
NULL). */
-   LIB_ID_FREE_NO_MAIN = 1 << 0,
-   /**
-    * Do not affect user refcount of datablocks used by freed one.
-    * Implies LIB_ID_FREE_NO_MAIN.
-    */
-   LIB_ID_FREE_NO_USER_REFCOUNT = 1 << 1,
-   /**
-    * As

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to