2002-10-12 11:37:38 +00:00
|
|
|
/**
|
|
|
|
|
* $Id$
|
|
|
|
|
*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
|
* 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
|
2008-04-16 22:40:48 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
|
|
|
|
*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef BDR_EDITFACE_H
|
|
|
|
|
#define BDR_EDITFACE_H
|
|
|
|
|
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00
|
|
|
struct MTFace;
|
2007-09-10 12:26:36 +00:00
|
|
|
struct EditFace;
|
2008-05-08 16:33:55 +00:00
|
|
|
struct EditEdge;
|
2002-10-12 11:37:38 +00:00
|
|
|
struct Mesh;
|
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00
|
|
|
struct MCol;
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2008-04-01 13:35:52 +00:00
|
|
|
struct MTFace *get_active_mtface(struct EditFace **efa, struct MCol **mcol, int sloppy);
|
New UV Calculation panel and code. The uv mapping function was split up into
multiple functions and partially recoded. Because now all the uv mapping
settings are accessible throught the panel, no popus will be shown when
pressing 'U' to unwrap faces in face select mode. Also From Window to Cylinder
and From Window to Shpere became obsolete, as you can set this in the new
panel.
The panel contains buttons for all the existing uv mapping modes, and the
following settings:
- Cube size: For Cubical unwrapping.
- Radius: Radius for Cylindrical unwrapping.
- View Aligns Face, View Aligns Top, Align to Object: For Cylinder and Shpere.
Respectively means you are in front of the Cylinder/Sphere, look through the
Cylinder, or use the object rotation to determine how the cylinder is
positioned (old Cylindrical unwrapping).
- Polar XZ, Polar XY: With 'View Aligns Top' enabled, defines at which polar
you are looking.
- No Edges, Draw Edges, All Edges: Draw no edges, draw edges z-buffered on top,
draw all edges, without depth test.
All credits for this part (and also at least half of the other UV editor
improvements) go to Jens Ole Wund aka "bjornmose".
2004-04-05 17:08:00 +00:00
|
|
|
void calculate_uv_map(unsigned short mapmode);
|
2002-10-12 11:37:38 +00:00
|
|
|
void default_uv(float uv[][2], float size);
|
|
|
|
|
void make_tfaces(struct Mesh *me);
|
|
|
|
|
void reveal_tface(void);
|
|
|
|
|
void hide_tface(void);
|
2005-04-23 01:36:08 +00:00
|
|
|
void select_linked_tfaces(int mode);
|
2002-10-12 11:37:38 +00:00
|
|
|
void deselectall_tface(void);
|
2004-04-01 12:55:12 +00:00
|
|
|
void selectswap_tface(void);
|
2002-10-12 11:37:38 +00:00
|
|
|
void rotate_uv_tface(void);
|
2005-08-11 00:00:24 +00:00
|
|
|
void mirror_uv_tface(void);
|
2007-04-14 13:18:24 +00:00
|
|
|
int minmax_tface(float *min, float *max);
|
2002-10-12 11:37:38 +00:00
|
|
|
void face_select(void);
|
|
|
|
|
void face_borderselect(void);
|
|
|
|
|
void uv_autocalc_tface(void);
|
2006-03-11 16:13:10 +00:00
|
|
|
void set_texturepaint(void);
|
2003-09-20 20:58:14 +00:00
|
|
|
void get_same_uv(void);
|
2006-02-08 21:01:00 +00:00
|
|
|
void seam_mark_clear_tface(short mode);
|
2008-05-08 16:33:55 +00:00
|
|
|
int edgetag_shortest_path(struct EditEdge *source, struct EditEdge *target);
|
|
|
|
|
void edgetag_context_set(struct EditEdge *eed, int val);
|
|
|
|
|
int edgetag_context_check(struct EditEdge *eed);
|
2002-10-12 11:37:38 +00:00
|
|
|
#endif /* BDR_EDITFACE_H */
|
2002-10-30 02:07:20 +00:00
|
|
|
|