[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47163] trunk/blender: Massive Code cleanup:

Thomas Dinges blender at dingto.org
Tue May 29 12:21:08 CEST 2012


Revision: 47163
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47163
Author:   dingto
Date:     2012-05-29 10:21:07 +0000 (Tue, 29 May 2012)
Log Message:
-----------
Massive Code cleanup:
* Remove all code for Texture and Sequencer plugin system, this never worked in 2.5x / 2.6x and is therefore not needed anymore.

* DNA structures are kept, all read/writefile code is gone.

Modified Paths:
--------------
    trunk/blender/source/blender/CMakeLists.txt
    trunk/blender/source/blender/SConscript
    trunk/blender/source/blender/blenkernel/BKE_sequencer.h
    trunk/blender/source/blender/blenkernel/BKE_texture.h
    trunk/blender/source/blender/blenkernel/CMakeLists.txt
    trunk/blender/source/blender/blenkernel/intern/material.c
    trunk/blender/source/blender/blenkernel/intern/seqeffects.c
    trunk/blender/source/blender/blenkernel/intern/sequencer.c
    trunk/blender/source/blender/blenkernel/intern/texture.c
    trunk/blender/source/blender/blenlib/intern/bpath.c
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/blenloader/intern/versioning_250.c
    trunk/blender/source/blender/blenloader/intern/writefile.c
    trunk/blender/source/blender/editors/include/UI_resources.h
    trunk/blender/source/blender/editors/interface/resources.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
    trunk/blender/source/blender/imbuf/IMB_imbuf_types.h
    trunk/blender/source/blender/makesdna/DNA_sequence_types.h
    trunk/blender/source/blender/makesdna/DNA_texture_types.h
    trunk/blender/source/blender/makesrna/RNA_access.h
    trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
    trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c
    trunk/blender/source/blender/makesrna/intern/rna_texture.c
    trunk/blender/source/blender/nodes/shader/node_shader_util.c
    trunk/blender/source/blender/render/intern/source/render_texture.c
    trunk/blender/source/creator/creator.c

Removed Paths:
-------------
    trunk/blender/release/plugins/
    trunk/blender/source/blender/blenkernel/BKE_plugin_types.h
    trunk/blender/source/blender/blenpluginapi/

Modified: trunk/blender/source/blender/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/CMakeLists.txt	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/CMakeLists.txt	2012-05-29 10:21:07 UTC (rev 47163)
@@ -97,7 +97,6 @@
 add_subdirectory(compositor)
 add_subdirectory(blenfont)
 add_subdirectory(blenloader)
-add_subdirectory(blenpluginapi)
 add_subdirectory(ikplugin)
 add_subdirectory(gpu)
 add_subdirectory(opencl)

Modified: trunk/blender/source/blender/SConscript
===================================================================
--- trunk/blender/source/blender/SConscript	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/SConscript	2012-05-29 10:21:07 UTC (rev 47163)
@@ -7,7 +7,6 @@
             'blenkernel/SConscript',
             'blenlib/SConscript',
             'blenloader/SConscript',
-            'blenpluginapi/SConscript',
             'gpu/SConscript',
             'opencl/SConscript',
             'editors/SConscript',

Deleted: trunk/blender/source/blender/blenkernel/BKE_plugin_types.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_plugin_types.h	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/blenkernel/BKE_plugin_types.h	2012-05-29 10:21:07 UTC (rev 47163)
@@ -1,68 +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) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BKE_PLUGIN_TYPES_H__
-#define __BKE_PLUGIN_TYPES_H__
-
-/** \file BKE_plugin_types.h
- *  \ingroup bke
- *  \author nzc
- */
-
-struct ImBuf;
-
-typedef int (*TexDoitold)(int stype, void *cast, float *texvec, float *dxt, float *dyt);
-typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result);
-typedef void (*SeqDoit)(void *, float, float, int, int,
-                        struct ImBuf *, struct ImBuf *,
-                        struct ImBuf *, struct ImBuf *);
-
-typedef struct VarStruct {
-	int type;
-	char name[16];
-	float def, min, max;
-	char tip[80];
-} VarStruct;
-
-typedef struct _PluginInfo {
-	char *name;
-	char *snames;
-
-	int stypes;
-	int nvars;
-	VarStruct *varstr;
-	float *result;
-	float *cfra;
-
-	void (*init)(void);
-	void (*callback)(int);
-	void (*tex_doit)(void *);
-	SeqDoit seq_doit;
-	void (*instance_init)(void *);
-} PluginInfo;
-
-#endif
-

Modified: trunk/blender/source/blender/blenkernel/BKE_sequencer.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_sequencer.h	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/blenkernel/BKE_sequencer.h	2012-05-29 10:21:07 UTC (rev 47163)
@@ -113,9 +113,8 @@
 
 struct SeqEffectHandle {
 	/* constructors & destructor */
-	/* init & init_plugin are _only_ called on first creation */
+	/* init is _only_ called on first creation */
 	void (*init)(struct Sequence *seq);
-	void (*init_plugin)(struct Sequence *seq, const char *fname);
 	
 	/* number of input strips needed 
 	 * (called directly after construction) */

Modified: trunk/blender/source/blender/blenkernel/BKE_texture.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_texture.h	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/blenkernel/BKE_texture.h	2012-05-29 10:21:07 UTC (rev 47163)
@@ -48,7 +48,6 @@
 struct MTex;
 struct OceanTex;
 struct ParticleSettings;
-struct PluginTex;
 struct PointDensity;
 struct Tex;
 struct TexMapping;
@@ -60,10 +59,6 @@
 
 
 void BKE_texture_free(struct Tex *t); 
-int test_dlerr(const char *name,  const char *symbol);
-void open_plugin_tex(struct PluginTex *pit);
-struct PluginTex *add_plugin_tex(char *str);
-void free_plugin_tex(struct PluginTex *pit);
 
 void init_colorband(struct ColorBand *coba, int rangetype);
 struct ColorBand *add_colorband(int rangetype);

Modified: trunk/blender/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/blenkernel/CMakeLists.txt	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/blenkernel/CMakeLists.txt	2012-05-29 10:21:07 UTC (rev 47163)
@@ -201,7 +201,6 @@
 	BKE_packedFile.h
 	BKE_paint.h
 	BKE_particle.h
-	BKE_plugin_types.h
 	BKE_pointcache.h
 	BKE_property.h
 	BKE_report.h

Modified: trunk/blender/source/blender/blenkernel/intern/material.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/material.c	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/blenkernel/intern/material.c	2012-05-29 10:21:07 UTC (rev 47163)
@@ -903,7 +903,7 @@
 			ma->mapto |= mtex->mapto;
 
 			/* always get derivatives for these textures */
-			if (ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) ma->texco |= TEXCO_OSA;
+			if (ELEM(mtex->tex->type, TEX_IMAGE, TEX_ENVMAP)) ma->texco |= TEXCO_OSA;
 			else if (mtex->texflag & (MTEX_COMPAT_BUMP | MTEX_3TAP_BUMP | MTEX_5TAP_BUMP | MTEX_BICUBIC_BUMP)) ma->texco |= TEXCO_OSA;
 			
 			if (ma->texco & (TEXCO_ORCO | TEXCO_REFL | TEXCO_NORM | TEXCO_STRAND | TEXCO_STRESS)) needuv = 1;

Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c	2012-05-29 09:51:16 UTC (rev 47162)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c	2012-05-29 10:21:07 UTC (rev 47163)
@@ -47,7 +47,6 @@
 
 #include "BKE_fcurve.h"
 #include "BKE_main.h"
-#include "BKE_plugin_types.h"
 #include "BKE_sequencer.h"
 #include "BKE_texture.h"
 #include "BKE_utildefines.h"
@@ -60,11 +59,6 @@
 /* **** XXX **** */
 static void error(const char *UNUSED(error), ...) {}
 
-#define INT 96
-#define FLO 128
-
-/* **** XXX **** */
-
 /* Glow effect */
 enum {
 	GlowR = 0,
@@ -122,281 +116,6 @@
 }
 
 /* **********************************************************************
- * PLUGINS
- * ********************************************************************** */
-
-static void open_plugin_seq(PluginSeq *pis, const char *seqname)
-{
-	int (*version)(void);
-	void * (*alloc_private)(void);
-	char *cp;
-
-	/* to be sure: (is tested for) */
-	pis->doit = NULL;
-	pis->pname = NULL;
-	pis->varstr = NULL;
-	pis->cfra = NULL;
-	pis->version = 0;
-	pis->instance_private_data = NULL;
-
-	/* clear the error list */
-	BLI_dynlib_get_error_as_string(NULL);
-
-	/* if (pis->handle) BLI_dynlib_close(pis->handle); */
-	/* pis->handle = 0; */
-
-	/* open the needed object */
-	pis->handle = BLI_dynlib_open(pis->name);
-	if (test_dlerr(pis->name, pis->name)) return;
-
-	if (pis->handle != NULL) {
-		/* find the address of the version function */
-		version = (int (*)(void))BLI_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
-		if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
-
-		if (version != NULL) {
-			pis->version = version();
-			if (pis->version >= 2 && pis->version <= 6) {
-				int (*info_func)(PluginInfo *);
-				PluginInfo *info = (PluginInfo *) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
-
-				info_func = (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pis->handle, "plugin_getinfo");
-
-				if (info_func == NULL) error("No info func");
-				else {
-					info_func(info);
-
-					pis->pname = info->name;
-					pis->vars = info->nvars;
-					pis->cfra = info->cfra;
-
-					pis->varstr = info->varstr;
-
-					pis->doit = (void (*)(void))info->seq_doit;
-					if (info->init)
-						info->init();
-				}
-				MEM_freeN(info);
-
-				cp = BLI_dynlib_find_symbol(pis->handle, "seqname");
-				if (cp) BLI_strncpy(cp, seqname, SEQ_NAME_MAXSTR);
-			}
-			else {
-				printf("Plugin returned unrecognized version number\n");
-				return;
-			}
-		}
-		alloc_private = (void * (*)(void))BLI_dynlib_find_symbol(
-		    pis->handle, "plugin_seq_alloc_private_data");
-		if (alloc_private) {
-			pis->instance_private_data = alloc_private();
-		}
-		
-		pis->current_private_data = (void **)
-		        BLI_dynlib_find_symbol(pis->handle, "plugin_private_data");
-	}
-}
-
-static PluginSeq *add_plugin_seq(const char *str, const char *seqname)
-{
-	PluginSeq *pis;
-	VarStruct *varstr;
-	int a;
-
-	pis = MEM_callocN(sizeof(PluginSeq), "PluginSeq");
-
-	BLI_strncpy(pis->name, str, FILE_MAX);
-	open_plugin_seq(pis, seqname);
-
-	if (pis->doit == NULL) {
-		if (pis->handle == NULL) error("no plugin: %s", str);
-		else error("in plugin: %s", str);
-		MEM_freeN(pis);
-		return NULL;
-	}
-
-	/* default values */
-	varstr = pis->varstr;
-	for (a = 0; a < pis->vars; a++, varstr++) {
-		if ( (varstr->type & FLO) == FLO)
-			pis->data[a] = varstr->def;
-		else if ( (varstr->type & INT) == INT)
-			*((int *)(pis->data + a)) = (int) varstr->def;
-	}
-
-	return pis;
-}
-
-static void free_plugin_seq(PluginSeq *pis)
-{
-	if (pis == NULL) return;
-
-	/* no BLI_dynlib_close: same plugin can be opened multiple times with 1 handle */
-
-	if (pis->instance_private_data) {
-		void (*free_private)(void *);
-
-		free_private = (void (*)(void *))BLI_dynlib_find_symbol(
-		    pis->handle, "plugin_seq_free_private_data");
-		if (free_private) {
-			free_private(pis->instance_private_data);
-		}
-	}
-
-	MEM_freeN(pis);
-}
-
-static void init_plugin(Sequence *seq, const char *fname)
-{
-	seq->plugin = (PluginSeq *)add_plugin_seq(fname, seq->name + 2);
-}
-
-/* 
- * FIXME: should query plugin! Could be generator, that needs zero inputs...
- */
-static int num_inputs_plugin(void)
-{
-	return 1;
-}
-

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list