[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49331] branches/asset-browser/source/ blender/editors/space_asset: == assetbrowser ==

Andrea Weikert elubie at gmx.net
Sat Jul 28 19:22:35 CEST 2012


Revision: 49331
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49331
Author:   elubie
Date:     2012-07-28 17:22:35 +0000 (Sat, 28 Jul 2012)
Log Message:
-----------
== assetbrowser ==
remove not yet used files again

Removed Paths:
-------------
    branches/asset-browser/source/blender/editors/space_asset/assetlist.c
    branches/asset-browser/source/blender/editors/space_asset/assetlist.h

Deleted: branches/asset-browser/source/blender/editors/space_asset/assetlist.c
===================================================================
--- branches/asset-browser/source/blender/editors/space_asset/assetlist.c	2012-07-28 16:55:26 UTC (rev 49330)
+++ branches/asset-browser/source/blender/editors/space_asset/assetlist.c	2012-07-28 17:22:35 UTC (rev 49331)
@@ -1,111 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. 
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2012 Blender Foundation.
- * All rights reserved.
- *
- * 
- * Contributor(s): Blender Foundation, Andrea Weikert
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_listbase.h"
-#include "BLI_linklist.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
-#include "BLO_readfile.h"
-#include "BKE_idcode.h"
-
-static int islibrary(char *asset_dir, char *asset_file, char* group)
-{
-	return BLO_is_a_library(asset_dir, asset_file, group);
-}
-
-static int groupname_to_code(const char *group)
-{
-	char buf[32];
-	char *lslash;
-	
-	BLI_strncpy(buf, group, sizeof(buf));
-	lslash= BLI_last_slash(buf);
-	if (lslash)
-		lslash[0]= '\0';
-
-	return BKE_idcode_from_name(buf);
-}
-
-/* Append the linkable groups from the .blend file given by filename to the asset list */
-void assets_append_from_library(ListBase *assets, Main *bmain, char *filename)
-{
-	LinkNode *l, *names, *previews;
-	bAsset* asset;
-	struct BlendHandle *libfiledata= NULL;
-	int ok, i, nprevs, nnames, idcode;
-	char filename[FILE_MAX];
-	char dir[FILE_MAX], group[GROUP_MAX];	
-	
-	/* name test */
-	ok= islibrary(filename, dir, group);
-	if (!ok) {
-		return;
-	}
-	
-	if (!assets ) {
-		return;
-	}
-	
-	BLI_strncpy(filename, bmain->name, sizeof(filename));
-
-	/* there we go */
-	/* for the time being only read filedata when libfiledata==0 */
-	libfiledata= BLO_blendhandle_from_file(dir, NULL);
-	if (filelist->libfiledata == NULL) return;
-
-	
-	idcode= groupname_to_code(group);
-
-	/* memory for strings is passed into filelist[i].relname
-	 * and freed in freefilelist */
-	if (idcode) {
-		names= BLO_blendhandle_get_datablock_names(filelist->libfiledata, idcode, &nnames);
-		/* ugh, no rewind, need to reopen */
-		BLO_blendhandle_close(filelist->libfiledata);
-		filelist->libfiledata= BLO_blendhandle_from_file(dir, NULL);
-		
-	}
-	else {
-		names= BLO_blendhandle_get_linkable_groups(filelist->libfiledata);
-		nnames= BLI_linklist_length(names);
-	}
-
-	for (i=0, l= names; i<nnames; i++, l= l->next) {
-		char *blockname= l->link;
-		asset = MEM_callocN(sizeof(bAsset), "asset item");
-		if (idcode) {
-			asset->name= BLI_strdup(blockname);
-		}
-	}
-	
-	BLI_linklist_free(names, free);
-
-	BLI_strncpy(bmain->name, filename, sizeof(filename));	// prevent bmain->name to change
-
-}

Deleted: branches/asset-browser/source/blender/editors/space_asset/assetlist.h
===================================================================
--- branches/asset-browser/source/blender/editors/space_asset/assetlist.h	2012-07-28 16:55:26 UTC (rev 49330)
+++ branches/asset-browser/source/blender/editors/space_asset/assetlist.h	2012-07-28 17:22:35 UTC (rev 49331)
@@ -1,33 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. 
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2012 Blender Foundation.
- * All rights reserved.
- *
- * 
- * Contributor(s): Blender Foundation, Andrea Weikert
- *
- * ***** END GPL LICENSE BLOCK *****
- */
- #ifndef __ASSETLIST_H__
- #define __ASSETLIST_H__
- 
-#include "DNA_asset_types.h"
-
-void assets_append_from_library(ListBase *assets, char *filename);
- 
- #endif




More information about the Bf-blender-cvs mailing list