Commit Graph

19 Commits

Author SHA1 Message Date
99135b0674 dont use tface hide or select anymore, since maintaining 2 sets of hide/select data for each face is annoying.
using mface->flag for both.

Also found that the cdDM_drawMappedFaces and cdDM_drawFacesTex_common could get normals mixed up when rendering hidden faces. because hidden/invisible faces used continue without advancing to the next normal.
2007-04-29 13:39:46 +00:00
0a0cf54a27 update to center view.
- Dont do anything if no verts or faces are selected (used to zoom into 0,0,0)
 - use the centers of dupli objects (should eventually use their bound boxes), much nicer when dealing with many dupli-objects
2007-04-14 13:18:24 +00:00
47bc3d1208 Added names to UV and vertex color layers, and display them as a list.
Added support for multiple UVs in the render engine. This also involved
changing the way faces are stored, to allow data to be added optionally
per 256 faces, same as the existing system for vertices.

A UV layer can be specified in the Map Input panel and the Geometry node
by name. Leaving this field blank will default to the active UV layer.

Also added sharing of face selection and hiding between UV layers, and at
the same time improved syncing with editmode selection and hiding.

Still to do:
- Multi UV support for fastshade.
- Multires and NMesh preservation of multiple UV sets.
2006-12-21 13:47:27 +00:00
80ee52e444 Multiple UV and vertex color layers: (still work in progress)
These can be created and deleted in the Mesh panel in the same place as
before. There is always one active UV and vertex color layer, that is
edited and displayed.

Important things to do:
- Render engine, material support
- Multires and NMesh now lose non active layers

Also CustomData changes to support muliple layers of the same type, and
changes to layer allocation, updated documentation is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
2006-12-12 21:29:09 +00:00
e435fbc3c5 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
4ee3515bf1 Brush Datablock:
- Added a new Brush datablock, only used by image paint, but intended
  to be used in texture paint, vertex paint, weight paint and sculpt
  mode also.
- Being a datablock, these brushes can be saved, appended and linked.
  They have a fake user by default, to make sure they are saved even if
  not selected.

Image Painting:

- Replaced the img module with C code in imagepaint.c
- Airbrush is no longer a separate tool, but rather an option that can
  be used for soften, smear and clone also.
- Blend modes mix, add, subtract, multiply, darken and lighten have been
  added, code taken directly from vertex paint.

Note to project files maintainers:

- The img module was removed from SCons and Makefiles, and this should
  be done in other build systems also. I'll wait to remove the module
  from cvs, to not break compilation.
2006-07-26 22:29:23 +00:00
7d5be54fec Fix for bug #3802: Display problems with modifiers and uv face select
The bug reported here was already fixed some weeks ago, but there were
more issues. Modifier display in face select and paint modes was never
properly finished.

This fixes some small drawing update glitches, and only allows modifiers
that preserve a mapping to the original mesh to be applied. Otherwise
selection and painting isn't even possible.
2006-03-11 16:13:10 +00:00
3753d817ab Seam Cutting in Faceselect Mode:
- Mark Border Seam: mark edges on the border of face selection as seam.
- Clear Seam: clears seams in selected faces.
Hotkey: Ctrl+E

- Alt+RMB Click: mark/clear edge as seam
- Alt+Shift+RMB Click: mark/clear seams along the shortest/straightest path
  from last marked seam. The cost of the path also includes some measure of
  'straightness' next to the typical distance to make things work more
  predicatble and edgeloop friendly. Note that this cuts a path from edge to
  edge, not vertex to vertex. That gives some nice control over the direction
  of the seam.

Also includes:

- Removed old LSCM code.
- Fix updates glitches with DerivedMesh/Subsurf drawing in FaceSelect mode.
  Now there's a drawMappedFacesTex instead of drawFacesTex.
- Minimize Stretch menu entry called Limit Stitch.
- Removed the lasttface global, was being set before it was used anyway, so
  might as wel return from a function.
- Moved some backbuf sampling code to drawview.c from editmesh, so it can be
  used by Faceselect and VPaint.
- Use BLI_heap in parametrizer.c.
2006-02-08 21:01:00 +00:00
5afdfc6ac1 - remove some silly array copying code for nurb displist generation
- converted dl->flag to use consistent defines for cyclic U/V
2005-08-11 22:27:53 +00:00
2f32c8451c New "Mirror UVs" function in faceselect mode, to complement Rotate UVs.
It mirrors the UVs or Vertex Colors of individual faces (on the red edge
of the UV face).

Patch provided by Martin Poirier, thanks!
2005-08-11 00:00:24 +00:00
c333ba8dfa Merging over some uv editor tweaks from tuhopuu:
- Moved Weld/Align out of transform code, now it's a menu.
- Removed confirmation popups for LSCM unwrapping in the uv editor, didn't
  make sense anymore now we have undo.
- Extended select linked, to work more like it does in edit mode:
	- L: select linked uvs/faces under the mouse
	- Shift+L: select/deselect linked uvs/faces under the mouse
	(like shift+click for selecting single uvs/faces)
	- Ctrl+L: how L worked before
- More accurate uv selection: when selecting one uv from a group of uvs that
  are in the same position, it now selects the uv belonging to the face the
  mouse is over, instead of a random uv.
- 'View Selected' (numpad .-key) for both faceselect mode and the uv editor.
2005-04-23 01:36:08 +00:00
6a00fcd90c Add "View Selected" (numpad .-key) for faceselect mode and the uv editor.
Also includes some 2d vector operations (subtract, dot, normalise).
2005-04-22 20:16:02 +00:00
7ba91ad2da 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
d7f3f66728 New UV editor / Image Window features:
- Draw Faces in the UV editor
- Draw Faces, selected in the UV editor, in the 3D view
- Draw Shadow Mesh in the UV editor (for faces unselected in the 3D view)
- Select Linked UVs (LKEY)
- Unlink Selection (Alt+LKEY)
- Stick (Local) UVs to Mesh Vertex on selection
- Active Face Select
- Reload Image
- Show / Hide Faces in the UV editor (H, Shift+H, Alt+H)
- Proportional Editing (O, Shift+O)
- Stitch, Limit Stitch UVs (snap by mesh vertex)
- Weld / Align UVs (WKEY)
- UVs Snap to Pixels on/off switch
- RMB in Texture Paint or Vertex Paint mode picks color
- Select Inverse in Faceselect mode

I hope these are all the features that were commited. The new UV Mapping
panel (and code) will follow later.
2004-04-01 12:55:12 +00:00
b5450f0815 added 2 new features:
- "Seperate loose parts" is an option in the new pkey popup (in mesh editmode) that seperates a mesh based on objects in it that are not connected.

- "Select same uv" is an option in the wkey popup (in facemode) that selects all faces in the mesh that have the same uv texture assigned as the current active face.

ps. first commit! I hope I can live up to expectations...but don't expect too much! :D
2003-09-20 20:58:14 +00:00
f1c4f705a1 Removed the config.h thing from the .h's in the source dir.
So we should be all set now :)

Kent
--
mein@cs.umn.edu
2002-12-27 13:11:01 +00:00
b9a19f1ea7 Did all of the .h's in source
(adding)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

also the Makefile.in's were from previous patch adding
the system depend stuff to configure.ac

Kent
--
mein@cs.umn.edu
2002-11-25 11:16:17 +00:00
01bff70383 fixed spacing in the headers to get rid of some warnings and some other
little minor spacing issues.
2002-10-30 02:07:20 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00