[Bf-blender-cvs] [f7eec7e19fb] asset-engine: Merge branch 'master' into asset-engine
Bastien Montagne
noreply at git.blender.org
Thu Sep 5 09:45:15 CEST 2019
Commit: f7eec7e19fbeed90abfbd078e1e3fa678783f329
Author: Bastien Montagne
Date: Wed Sep 4 22:57:38 2019 +0200
Branches: asset-engine
https://developer.blender.org/rBf7eec7e19fbeed90abfbd078e1e3fa678783f329
Merge branch 'master' into asset-engine
Partial merge only, UI in filebrowser has been heavily changed and need
more work...
Conflicts:
release/scripts/startup/bl_ui/space_filebrowser.py
source/blender/blenloader/intern/versioning_280.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filelist.h
source/blender/makesdna/DNA_space_types.h
source/blender/windowmanager/intern/wm_operator_props.c
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_filebrowser.py
index 3e511996474,92eae7a4de9..80830b6983f
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@@ -41,66 -34,133 +41,190 @@@ class FILEBROWSER_HT_header(Header)
layout.menu("FILEBROWSER_MT_view")
- row = layout.row(align=True)
- row.operator("file.previous", text="", icon='BACK')
- row.operator("file.next", text="", icon='FORWARD')
- row.operator("file.parent", text="", icon='FILE_PARENT')
- row.operator("file.refresh", text="", icon='FILE_REFRESH')
+ # 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="")
+
- 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)
++ row.separator()
++ row.prop(params, "filter_search", text="", icon='VIEWZOOM')
++ =======
++ """
+ layout.separator_spacer()
+
+ layout.template_running_jobs()
+
+
+ class FILEBROWSER_PT_display(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'HEADER'
+ bl_label = "Display"
+
+ @classmethod
+ def poll(cls, context):
+ # can be None when save/reload with a file selector open
+ return context.space_data.params is not None
+
+ def draw(self, context):
+ layout = self.layout
+
+ space = context.space_data
+ params = space.params
+ is_lib_browser = params.use_library_browsing
+
+ layout.label(text="Display as")
+ layout.column().prop(params, "display_type", expand=True)
+
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ if params.display_type == 'THUMBNAIL':
+ layout.prop(params, "display_size", text="Size")
else:
- layout.operator_context = 'EXEC_DEFAULT'
- layout.operator("file.directory_new", icon='NEWFOLDER', text="")
- layout.separator()
+ layout.prop(params, "show_details_size", text="Size")
+ layout.prop(params, "show_details_datetime", text="Date")
- layout.operator_context = 'INVOKE_DEFAULT'
+ layout.prop(params, "recursion_level", text="Recursions")
- # 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.use_property_split = False
+ layout.separator()
- layout.separator_spacer()
+ layout.label(text="Sort by")
+ layout.column().prop(params, "sort_method", expand=True)
+ layout.prop(params, "use_sort_invert")
- layout.template_running_jobs()
- if params:
- layout.prop(params, "use_filter", text="", icon='FILTER')
+ class FILEBROWSER_PT_filter(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'HEADER'
+ bl_label = "Filter"
- row = layout.row(align=True)
- row.active = params.use_filter
+ @classmethod
+ def poll(cls, context):
+ # can be None when save/reload with a file selector open
+ return context.space_data.params is not None
- row.prop(params, "use_filter_folder", text="")
+ def draw(self, context):
+ layout = self.layout
- 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="")
+ space = context.space_data
+ params = space.params
+ is_lib_browser = params.use_library_browsing
+
+ row = layout.row(align=True)
+ row.prop(params, "use_filter", text="", toggle=0)
+ row.label(text="Filter")
+
+ col = layout.column()
+ col.active = params.use_filter
+
+ row = col.row()
+ row.label(icon='FILE_FOLDER')
+ row.prop(params, "use_filter_folder", text="Folders", toggle=0)
+
+ if params.filter_glob:
+ col.label(text=params.filter_glob)
+ else:
+ row = col.row()
+ row.label(icon='FILE_BLEND')
+ row.prop(params, "use_filter_blender",
+ text=".blend Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_BACKUP')
+ row.prop(params, "use_filter_backup",
+ text="Backup .blend Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_IMAGE')
+ row.prop(params, "use_filter_image", text="Image Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_MOVIE')
+ row.prop(params, "use_filter_movie", text="Movie Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_SCRIPT')
+ row.prop(params, "use_filter_script",
+ text="Script Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_FONT')
+ row.prop(params, "use_filter_font", text="Font Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_SOUND')
+ row.prop(params, "use_filter_sound", text="Sound Files", toggle=0)
+ row = col.row()
+ row.label(icon='FILE_TEXT')
+ row.prop(params, "use_filter_text", text="Text Files", toggle=0)
+
+ col.separator()
+
+ if is_lib_browser:
+ row = col.row()
+ row.label(icon='BLANK1') # Indentation
+ row.prop(params, "use_filter_blendid",
+ text="Blender IDs", toggle=0)
+ if params.use_filter_blendid:
+ row = col.row()
+ row.label(icon='BLANK1') # Indentation
+ row.prop(params, "filter_id_category", text="")
+
+ col.separator()
- row.separator()
- row.prop(params, "filter_search", text="", icon='VIEWZOOM')
+ layout.prop(params, "show_hidden")
+ def panel_poll_is_upper_region(region):
+ # The upper region is left-aligned, the lower is split into it then.
+ return region.alignment == 'LEFT'
-
++"""
++>>>>>>> master
++"""
+
c
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list