[Bf-blender-cvs] [bc8ad4c] asset-experiments: Cleanup/reduce needless diff with master.

Bastien Montagne noreply at git.blender.org
Mon May 4 15:55:31 CEST 2015


Commit: bc8ad4c739d1b4088bdb1eb9ad74bcfc23bb4045
Author: Bastien Montagne
Date:   Mon May 4 15:03:57 2015 +0200
Branches: asset-experiments
https://developer.blender.org/rBbc8ad4c739d1b4088bdb1eb9ad74bcfc23bb4045

Cleanup/reduce needless diff with master.

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

M	release/scripts/startup/bl_ui/space_filebrowser.py
M	source/blender/blenlib/BLI_listbase.h
M	source/blender/blenlib/intern/listbase.c
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/editors/include/UI_interface_icons.h
M	source/blender/editors/render/render_preview.c
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index fad290a..9033ff9 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -26,6 +26,7 @@ class FILEBROWSER_HT_header(Header):
 
     def draw(self, context):
         layout = self.layout
+
         st = context.space_data
 
         layout.template_header()
@@ -95,126 +96,6 @@ class FILEBROWSER_HT_header(Header):
         layout.template_running_jobs()
 
 
-
-class FILEBROWSER_UL_dir(bpy.types.UIList):
-    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)
-            row.prop(direntry, "name", text="", emboss=False, icon=icon)
-
-        elif self.layout_type in {'GRID'}:
-            layout.alignment = 'CENTER'
-            layout.prop(direntry, "path", text="")
-
-
-class FILEBROWSER_PT_system_folders(Panel):
-    bl_space_type = 'FILE_BROWSER'
-    bl_region_type = 'TOOLS'
-    bl_category = "Bookmarks"
-    bl_label = "System"
-
-    def draw(self, context):
-        layout = self.layout
-        space = context.space_data
-
-        if space.system_folders:
-            row = layout.row()
-            row.template_list("FILEBROWSER_UL_dir", "system_folders", space, "system_folders",
-                              space, "system_folders_active", rows=1, maxrows=6)
-
-
-class FILEBROWSER_PT_system_bookmarks(Panel):
-    bl_space_type = 'FILE_BROWSER'
-    bl_region_type = 'TOOLS'
-    bl_category = "Bookmarks"
-    bl_label = "System Bookmarks"
-
-    @classmethod
-    def poll(cls, context):
-        return not context.user_preferences.filepaths.hide_system_bookmarks
-
-    def draw(self, context):
-        layout = self.layout
-        space = context.space_data
-
-        if space.system_bookmarks:
-            row = layout.row()
-            row.template_list("FILEBROWSER_UL_dir", "system_bookmarks", space, "system_bookmarks",
-                              space, "system_bookmarks_active", rows=1, maxrows=6)
-
-
-class FILEBROWSER_MT_bookmarks_specials(Menu):
-    bl_label = "Bookmarks Specials"
-
-    def draw(self, context):
-        layout = self.layout
-
-        layout.operator("file.bookmark_move", icon='TRIA_UP_BAR', text="Move To Top").direction = 'TOP'
-        layout.operator("file.bookmark_move", icon='TRIA_DOWN_BAR', text="Move To Bottom").direction = 'BOTTOM'
-
-
-class FILEBROWSER_PT_bookmarks(Panel):
-    bl_space_type = 'FILE_BROWSER'
-    bl_region_type = 'TOOLS'
-    bl_category = "Bookmarks"
-    bl_label = "Bookmarks"
-
-    def draw(self, context):
-        layout = self.layout
-        space = context.space_data
-
-        if space.bookmarks:
-            row = layout.row()
-            num_rows = len(space.bookmarks)
-            row.template_list("FILEBROWSER_UL_dir", "bookmarks", space, "bookmarks",
-                              space, "bookmarks_active", rows=(2 if num_rows < 2 else 4), maxrows=6)
-
-            col = row.column(align=True)
-            col.operator("file.bookmark_add", icon='ZOOMIN', text="")
-            col.operator("file.bookmark_delete", icon='ZOOMOUT', text="")
-            col.menu("FILEBROWSER_MT_bookmarks_specials", icon='DOWNARROW_HLT', text="")
-
-            if num_rows > 1:
-                col.separator()
-                col.operator("file.bookmark_move", icon='TRIA_UP', text="").direction = 'UP'
-                col.operator("file.bookmark_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
-
-
-class FILEBROWSER_PT_recent_folders(Panel):
-    bl_space_type = 'FILE_BROWSER'
-    bl_region_type = 'TOOLS'
-    bl_category = "Bookmarks"
-    bl_label = "Recent"
-
-    @classmethod
-    def poll(cls, context):
-        return not context.user_preferences.filepaths.hide_recent_locations
-
-    def draw(self, context):
-        layout = self.layout
-        space = context.space_data
-
-        if space.recent_folders:
-            row = layout.row()
-            row.template_list("FILEBROWSER_UL_dir", "recent_folders", space, "recent_folders",
-                                 space, "recent_folders_active", rows=1, maxrows=6)
-
-            col = row.column(align=True)
-            col.operator("file.reset_recent", icon='X', text="")
-
-
 class FILEBROWSER_UL_dir(bpy.types.UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         direntry = item
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index 7710ffc..2e01f74 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -60,7 +60,6 @@ void *BLI_rfindptr(const struct ListBase *listbase, const void *ptr, const int o
 void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1);
 void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
 void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
-void BLI_listbase_remlink_range(struct ListBase *listbase, void *vlink_start, void *vlink_end) ATTR_NONNULL(1);
 bool BLI_remlink_safe(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
 void *BLI_pophead(ListBase *listbase) ATTR_NONNULL(1);
 void *BLI_poptail(ListBase *listbase) ATTR_NONNULL(1);
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index 53beed8..d52c097 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -116,22 +116,6 @@ void BLI_remlink(ListBase *listbase, void *vlink)
 }
 
 /**
- * Removes all links between \a vlink_start and \a vlink_end (included) from \a listbase.
- * Assumes it is linked into there, and vlink_start is before vlink_end!
- */
-void BLI_listbase_remlink_range(struct ListBase *listbase, void *vlink_start, void *vlink_end)
-{
-	Link *link_start = vlink_start;
-	Link *link_end = vlink_end;
-
-	if (link_end->next) link_end->next->prev = link_start->prev;
-	if (link_start->prev) link_start->prev->next = link_end->next;
-
-	if (listbase->last == link_end) listbase->last = link_start->prev;
-	if (listbase->first == link_start) listbase->first = link_end->next;
-}
-
-/**
  * Checks that \a vlink is linked into listbase, removing it from there if so.
  */
 bool BLI_remlink_safe(ListBase *listbase, void *vlink)
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 6b9045b..df98544 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -66,8 +66,6 @@
 #include "BLI_listbase.h"
 #include "BLI_string.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "BLO_readfile.h"
 
 #include "readfile.h"
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index 6303325..e74246c 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -52,7 +52,7 @@ typedef struct IconFile {
 #define ICON_DEFAULT_WIDTH_SCALE  ((int)(UI_UNIT_X * 0.8f))
 
 #define ICON_RENDER_DEFAULT_HEIGHT 32
-#define PREVIEW_RENDER_DEFAULT_HEIGHT 128
+#define PREVIEW_RENDER_DEFAULT_HEIGHT 128  /* Warning, also linked to thumbnail code, shal not be changed. */
 
 /*
  * Resizable Icons for Blender
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 29753ef..65d4c23 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -46,7 +46,6 @@
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
-#include "PIL_time.h"
 
 #include "BLO_readfile.h"
 
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index b156371..cf2c8ee 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -67,8 +67,6 @@ struct MovieClipScopes;
 struct Mask;
 struct BLI_mempool;
 
-struct direntry;
-
 /* SpaceLink (Base) ==================================== */
 
 /**
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 84ad886..4fcae18 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3711,11 +3711,11 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
 	};
 
 	static EnumPropertyItem thumbnail_size_items[] = {
-		{32,    "TINY",     0,      "Tiny", ""},
-		{64,    "SMALL",    0,      "Small", ""},
-		{128,   "NORMAL",   0,      "Normal", ""},
-		{256,   "LARGE",    0,      "Large", ""},
-		{0, NULL, 0, NULL, NULL}
+	    {32,    "TINY",     0,      "Tiny", ""},
+	    {64,    "SMALL",    0,      "Small", ""},
+	    {128,   "NORMAL",   0,      "Normal", ""},
+	    {256,   "LARGE",    0,      "Large", ""},
+	    {0, NULL, 0, NULL, NULL}
 	};
 
 	static EnumPropertyItem file_filter_idtypes_items[] = {




More information about the Bf-blender-cvs mailing list