[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58545] trunk/blender/source/blender: code cleanup: remove deprecated bevel code (unused since 2.64)

Campbell Barton ideasman42 at gmail.com
Tue Jul 23 16:28:19 CEST 2013


Revision: 58545
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58545
Author:   campbellbarton
Date:     2013-07-23 14:28:19 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
code cleanup: remove deprecated bevel code (unused since 2.64)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_global.h
    trunk/blender/source/blender/blenkernel/CMakeLists.txt
    trunk/blender/source/blender/blenkernel/intern/modifiers_bmesh.c
    trunk/blender/source/blender/bmesh/CMakeLists.txt
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/editors/transform/transform_conversions.c
    trunk/blender/source/blender/makesdna/DNA_modifier_types.h
    trunk/blender/source/blender/makesrna/intern/rna_modifier.c
    trunk/blender/source/blender/modifiers/intern/MOD_bevel.c

Removed Paths:
-------------
    trunk/blender/source/blender/blenkernel/BKE_bmesh.h
    trunk/blender/source/blender/bmesh/tools/BME_bevel.c

Deleted: trunk/blender/source/blender/blenkernel/BKE_bmesh.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_bmesh.h	2013-07-23 14:22:47 UTC (rev 58544)
+++ trunk/blender/source/blender/blenkernel/BKE_bmesh.h	2013-07-23 14:28:19 UTC (rev 58545)
@@ -1,98 +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) 2004 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Geoffrey Bantle.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __BKE_BMESH_H__
-#define __BKE_BMESH_H__
-
-/** \file BKE_bmesh.h
- *  \ingroup bke
- *  \since January 2007
- *  \brief BMesh modeler structure and functions.
- *
- */
-
-/*NOTE: this is the bmesh 1.0 code.  it's completely outdated.*/
-
-/* uncomment to use the new bevel operator as a modifier */
-#define USE_BM_BEVEL_OP_AS_MOD
-
-/* bevel tool defines */
-/* element flags */
-#define BME_BEVEL_ORIG          1
-#define BME_BEVEL_BEVEL         (1 << 1)
-#define BME_BEVEL_NONMAN        (1 << 2)
-#define BME_BEVEL_WIRE          (1 << 3)
-
-/* tool options */
-#define BME_BEVEL_SELECT        1
-#define BME_BEVEL_VERT          (1 << 1)
-#define BME_BEVEL_RADIUS        (1 << 2)
-#define BME_BEVEL_ANGLE         (1 << 3)
-#define BME_BEVEL_WEIGHT        (1 << 4)
-#define BME_BEVEL_VGROUP        (1 << 5)
-//~ #define BME_BEVEL_EWEIGHT		(1<<4)
-//~ #define BME_BEVEL_VWEIGHT		(1<<5)
-#define BME_BEVEL_PERCENT       (1 << 6)
-#define BME_BEVEL_EMIN          (1 << 7)
-#define BME_BEVEL_EMAX          (1 << 8)
-#define BME_BEVEL_RUNNING       (1 << 9)
-#define BME_BEVEL_RES           (1 << 10)
-
-#define BME_BEVEL_EVEN          (1 << 11) /* this is a new setting not related to old (trunk bmesh bevel code) but adding
-	                                       * here because they are mixed - campbell */
-#define BME_BEVEL_DIST          (1 << 12) /* same as above */
-
-#define BME_BEVEL_OVERLAP_OK    (1 << 13)
-
-typedef struct BME_TransData {
-	struct BMesh *bm; /* the bmesh the vert belongs to */
-	struct BMVert *v;  /* pointer to the vert this tdata applies to */
-	float co[3];  /* the original coordinate */
-	float org[3]; /* the origin */
-	float vec[3]; /* a directional vector; always, always normalize! */
-	void *loc;    /* a pointer to the data to transform (likely the vert's cos) */
-	float factor; /* primary scaling factor; also accumulates number of weighted edges for beveling tool */
-	float weight; /* another scaling factor; used primarily for propogating vertex weights to transforms; */
-	              /* weight is also used across recursive bevels to help with the math */
-	float maxfactor; /* the unscaled, original factor (used only by "edge verts" in recursive beveling) */
-	float *max;   /* the maximum distance this vert can be transformed; negative is infinite
-	               * it points to the "parent" maxfactor (where maxfactor makes little sense)
-	               * where the max limit is stored (limits are stored per-corner) */
-} BME_TransData;
-
-typedef struct BME_TransData_Head {
-	struct GHash *gh;       /* the hash structure for element lookup */
-	struct MemArena *ma;    /* the memory "pool" we will be drawing individual elements from */
-	int len;
-} BME_TransData_Head;
-
-struct BME_TransData *BME_get_transdata(struct BME_TransData_Head *td, struct BMVert *v);
-void BME_free_transdata(struct BME_TransData_Head *td);
-struct BMesh *BME_bevel(struct BMesh *bm, float value, int res, int options, int defgrp_index, float angle,
-                        BME_TransData_Head **rtd);
-
-#endif

Modified: trunk/blender/source/blender/blenkernel/BKE_global.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_global.h	2013-07-23 14:22:47 UTC (rev 58544)
+++ trunk/blender/source/blender/blenkernel/BKE_global.h	2013-07-23 14:28:19 UTC (rev 58545)
@@ -46,7 +46,6 @@
 /* forwards */
 struct Main;
 struct Object;
-struct BME_Glob;
 
 typedef struct Global {
 

Modified: trunk/blender/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/blenkernel/CMakeLists.txt	2013-07-23 14:22:47 UTC (rev 58544)
+++ trunk/blender/source/blender/blenkernel/CMakeLists.txt	2013-07-23 14:28:19 UTC (rev 58545)
@@ -165,7 +165,6 @@
 	BKE_armature.h
 	BKE_autoexec.h
 	BKE_blender.h
-	BKE_bmesh.h
 	BKE_bmfont.h
 	BKE_bmfont_types.h
 	BKE_boids.h

Modified: trunk/blender/source/blender/blenkernel/intern/modifiers_bmesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/modifiers_bmesh.c	2013-07-23 14:22:47 UTC (rev 58544)
+++ trunk/blender/source/blender/blenkernel/intern/modifiers_bmesh.c	2013-07-23 14:28:19 UTC (rev 58545)
@@ -37,7 +37,6 @@
 #include "BLI_array.h"
 
 #include "BKE_DerivedMesh.h"
-#include "BKE_bmesh.h"
 #include "BKE_editmesh.h"
 
 /* Static function for alloc */

Modified: trunk/blender/source/blender/bmesh/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/bmesh/CMakeLists.txt	2013-07-23 14:22:47 UTC (rev 58544)
+++ trunk/blender/source/blender/bmesh/CMakeLists.txt	2013-07-23 14:28:19 UTC (rev 58545)
@@ -23,7 +23,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-set(INC 
+set(INC
 	.
 	../blenfont
 	../blenkernel
@@ -50,7 +50,7 @@
 	operators/bmo_edgenet.c
 	operators/bmo_extrude.c
 	operators/bmo_fill_edgeloop.c
-	operators/bmo_fill_grid.c 
+	operators/bmo_fill_grid.c
 	operators/bmo_hull.c
 	operators/bmo_inset.c
 	operators/bmo_join_triangles.c
@@ -115,7 +115,6 @@
 	intern/bmesh_operator_api.h
 	intern/bmesh_error.h
 
-	tools/BME_bevel.c
 	tools/bmesh_bevel.c
 	tools/bmesh_bevel.h
 	tools/bmesh_decimate_collapse.c

Deleted: trunk/blender/source/blender/bmesh/tools/BME_bevel.c
===================================================================
--- trunk/blender/source/blender/bmesh/tools/BME_bevel.c	2013-07-23 14:22:47 UTC (rev 58544)
+++ trunk/blender/source/blender/bmesh/tools/BME_bevel.c	2013-07-23 14:28:19 UTC (rev 58545)
@@ -1,1160 +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) 2004 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Geoffrey Bantle and Levi Schooley.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <math.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_listBase.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_mesh_types.h"
-
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_ghash.h"
-#include "BLI_memarena.h"
-
-#include "BKE_editmesh.h"
-#include "BKE_bmesh.h"
-
-#include "bmesh.h"
-#include "intern/bmesh_private.h"
-
-/* BMESH_TODO
- *
- * Date: 2011-11-24 06:25
- * Sender: Andrew Wiggin
- * Status update: I have code changes to actually make basic bevel modifier work. The things that still need to be done:
- * - clean up the changes
- * - get bevel by weight and bevel by angles working for vertex only bevel.
- * - the code uses adaptations of a couple of bmesh APIs,
- * that work a little differently. for example, a join faces that doesn't just create a new face and then delete the
- * original two faces and all associated loops, it extends one of the original faces to cover all the original loops
- * (except for the loop on the join edge which is of course deleted). the bevel code currently requires this because it
- * expects to be able to continue walking loop lists and doesn't like for loops to be deleted out from under it
- * while working...
- * but bmesh APIs don't do it this way because it makes it trickier to manage the interp during these operations,
- * so I need to decide what to do in these cases.
- */
-
-/* BMESH_TODO - resolve this */
-#define BMESH_263_VERT_BEVEL_WORKAROUND
-
-/* ------- Bevel code starts here -------- */
-
-static BME_TransData_Head *BME_init_transdata(int bufsize)
-{
-	BME_TransData_Head *td;
-
-	td = MEM_callocN(sizeof(BME_TransData_Head), "BM transdata header");
-	td->gh = BLI_ghash_ptr_new("BME_init_transdata gh");
-	td->ma = BLI_memarena_new(bufsize, "BME_TransData arena");
-	BLI_memarena_use_calloc(td->ma);
-
-	return td;
-}
-
-void BME_free_transdata(BME_TransData_Head *td)
-{
-	BLI_ghash_free(td->gh, NULL, NULL);
-	BLI_memarena_free(td->ma);
-	MEM_freeN(td);
-}
-
-static BME_TransData *BME_assign_transdata(BME_TransData_Head *td, BMesh *bm, BMVert *v,
-                                           float *co, float *org, float *vec, float *loc,
-                                           float factor, float weight, float maxfactor, float *max)
-{
-	BME_TransData *vtd;
-	int is_new = false;
-
-	if (v == NULL) {
-		return NULL;
-	}
-
-	if ((vtd = BLI_ghash_lookup(td->gh, v)) == NULL && bm != NULL) {
-		vtd = BLI_memarena_alloc(td->ma, sizeof(*vtd));
-		BLI_ghash_insert(td->gh, v, vtd);
-		td->len++;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list