Commit Graph

133 Commits

Author SHA1 Message Date
04e24d868e Additional Shape Vert Copy Tools in editmode WKEY
Copy Shape Verts Blend (interactive blending copy)
Propagate Verts (copys selected verts from current to all other shapes)

UI for interactive needs work and Propagate verts needs tidying up, propagation does not show yet until TAB :(
2005-12-22 21:59:56 +00:00
15766e1612 Copy Shape Verts
In mesh editmode, while editing a shape, select some verts, W Key, "Copy Shape Verts". You will be presented with a list of shapes and once chosen, the selected verts will be moved to the position of the verts from the chosen shape. Most handy use would be reverting part of a shape back to basis e.g.

Making eyebrow shapes, add a key and model the eyebrow shape symetrically with the x-mirror tool
Go out of editmode, copy that shape
Go into each shape and revert 1 side to basis

If the mesh has had verts added/removed since last entering editmode, you need to TAB-TAB first before copying
2005-12-21 21:37:11 +00:00
fe74c08510 Tri-Triple Subdivide filling was messed up. This should straigten it out when cuts > 2 2005-12-18 20:50:32 +00:00
57aac76f45 Bugfix #3471
- Editmode Mesh: after a split command, normals were not recalculated

ALso: in Particle buttons, made the "Tex" button go to the maximum of 10
channels.
2005-11-26 18:38:54 +00:00
5fa3d74d3c Bugfix #3153
Subdivide didn't correctly calculate new UV or vertexcolor yet.
2005-11-21 17:48:20 +00:00
ef19dfbbb2 Fixed two small glitches in Mesh ripping (Vkey):
- loose edges got accidentally removed
- when a rip results in loose vertices, they now get removed too.
2005-11-03 15:57:31 +00:00
Chris Want
2efaa059b5 Fix for when knife tool (with path setting) is terminated with ctrl-Enter.
Also, updated the little helper line on the status bar to indicate that
terminating with ctrl-Enter leaves only the verts on the cut line
selected.

Johnny: Please review.
2005-10-25 17:43:22 +00:00
6894526265 Subdivide recode assistance!
- Added subdivide sck upport for vertex groups
- Brought back subdivide-smooth, but it doesn't work as good as before yet,
  it used to catch an exception for subdividing the middle vertex of a quad,
  with edge-based subdivide it's not that simple. Will check later.
- made "number of cuts" a static variable, so it doesn't jump back to 2
  all the time

Coder level notes:

- removed the old subdivide code (yay, over 30k code less!)
- did some minor layout cleanups in the new code (just consistant syntax)
- removed redundant code parts, to enable smooth & vgroup subdiv
- subdivide smooth can do multiple cuts too, but i like to see that only
  as option when our smooth formula is good!

Compliment:

I think Johnny really made comprehensible design and nice code here. Was a
joy to work with. :)
2005-10-25 13:57:37 +00:00
a021181b5b Fix for Bug #3217
Just needed to mark a few more edges.
2005-10-24 18:17:35 +00:00
a5c32e1353 1. Moved Edgeloop Delete to Delete Menu out of Edge Specials
2. Edgeloop Delete will pop the undo stack if it fails
3. Small Tweak on CTRL-Subdivide selection
2005-10-21 14:51:17 +00:00
931a3bf8bf Uninitialized variable, caused OSX to work, but not the other OS's!
(for Mesh rip)
2005-10-20 08:15:02 +00:00
dc611a7575 New Mesh tool: "Rip".
http://www.blender3d.org/cms/Mesh_Ripping.712.0.html

This tool allows to insert gaps/seams in a Mesh, based on the selection
(1 vertex or a row of edges) and the position of the mouse (to indicate
the part that gets grabbed). Shortcut: Vkey.

Special Orange request!
2005-10-20 07:47:10 +00:00
fe6badc186 Another little fix for non-prop edgeslide 2005-10-04 18:50:58 +00:00
Alexander Ewering
2f22ea5900 Fix SHIFT finetuning for edgeslide (aftermath from a warning cleanup ;-) 2005-09-30 10:58:39 +00:00
c1e8340638 * Added 'Set Smooth' and 'Set Solid' to the mesh edit mode specials menu/toolbox/3d view menu so you don't always have to keep switching back to edit buttons. 2005-09-28 11:55:43 +00:00
577456f86a Darn editmesh code! Trying to prevent user error (add overlapping faces)
caused a myriad of other errors in tools... now you couldn't create a
triangle if one 1 edge was in a face already.

I should have known it should be coded differently. :)
So, here's another version, which actually restores the old code, and
only has the exception on pressing Fkey.
2005-09-25 10:41:35 +00:00
749253afa9 A fix for edgeslide non-prop mode sticking at 0%. 2005-09-24 18:44:24 +00:00
e5b9f62c6e bugfix #3100
Hrms... previous commit here to make sure faces are not added 'double',
caused a part in removedoubles not to work well, removing too many
faces. Solved it more proper now.
2005-09-24 15:36:25 +00:00
e63f211721 Adding missing prototypes, removing unused variables, initializing vars,
all to make compiling warning less again in gcc. :)
2005-09-15 17:32:24 +00:00
dd0cc4d1d2 Fix for bug #3024
In non-prop mode for edgeslide, loop would not return to proper position after cancel.
2005-09-12 14:01:44 +00:00
Alexander Ewering
2da83cecc4 New feature for edgeslide: Holding SHIFT now slows down movement by factor
10 (like transform()) and allows for fine-tuning the loop with hairy
reference edges.
2005-09-09 16:27:20 +00:00
34ae14778c Removing Auto-Fgon feature till it can be a little better implemented and integrated 2005-09-08 12:59:47 +00:00
35734007de Percent and Flip now invalidate the edgeslide redraw, so that it updated on key press 2005-09-06 15:55:54 +00:00
e0c7d270d9 - assorted minor warning fixes 2005-09-03 16:20:33 +00:00
b787bc2829 Auto-Fgon Feature for subdivide
If Fgon is selected in mesh tools panel, In the following cases

Quad - 2 edge Adjacent - Path
Quad - 2 edge Adjacent - Innervert
Quad - 3 edge

'extra' faces are combined to fgons. to make cleaner subdivides. Please give feedback
2005-09-02 16:31:03 +00:00
1472a7aacd Adding back in the "Big Purple Dot" to indicate which edge the non-proportional Edgeslide is using for distance 2005-09-01 18:40:16 +00:00
c9eb15714c Nonproportional mode for loopcut
while sliding the edge, press P this will swap modes. while in Non prop mode, press F to change the control "side". You can still change the control edge too.
2005-08-30 20:33:35 +00:00
3b96d6584f Force redraw on Edgeslide Cancel (RMB and ESC)
Fixes bug reported by Fab31 on IRC
2005-08-30 18:09:07 +00:00
a51896b591 Move the settings in the Mesh Tools panel to the new toolsettings struct in Scene. These settings are now saved per scene. 2005-08-24 20:37:25 +00:00
a978c122ee Making compiler happy;
- removed unused variables
- #if 0 around unused calls
- init of uninitialized vars
2005-08-24 20:26:28 +00:00
2540ca88e8 Quad Adjacent edge subdivide type moved to Mesh Tools panel rather than pupmenu on all subdiv calls. This is a session value like beauty and will revert to path each time you load blender. 2005-08-23 14:13:00 +00:00
3b8e94ac6b This commit introduces 2 new filling methods for subdividing quads which have only 2 adjacent edges selected. Path, Fan and Innerverts. ATM whenever a call is made to any subdivide calling tool, you will be asked for the type by a pupmenu. This will be replaced (perhaps) by a panel setting... 2005-08-22 18:05:40 +00:00
7804860cf6 - added mesh_strip_loose_faces, works in conjunction with make_edges
to get rid of faces with MFace.v3==0
 - change all Mesh's to have ->medge now. This is forced by make_edges
   on readfile, and in the various exotic important routines, and on
   conversion back in python.
 - make python NMesh structure always have medges now (needs testing)
 - with above two changes it is guarenteed that mf->v3 is never ==0
   in main blender code (i.e., all MFace's are actually triangles
   or quads) and so I went through and removed all the historic tests
   to deal with MFace.v3==0. Equals lots of deleting, I am in heaven!
 - removed MEdge edcode flag, no longer needed
 - added experimental replacement for edge flag system

Still are some inconsistencies in FACESELECT mode edge drawing to
be ironed out.

NOTE: This commit adds an experimental edge flag calc system, based
on 10-seconds-of-thought algorithm by yours truly. Would appreciate
feedback on how this system works, esp compared to old one and esp
on complex or interesting models.

To Use: New system is enabled by setting G.rt to a value between
1 and 1000 (Value of 0 uses old system). Value 1000 is reserved for
"auto" edge, which is more or less identical to old system but also
makes sure that at least 10% of edges are drawn (solves errors for
super subdivided meshes). Values between 1 and 999 act as percent
(out of 1000) of edges that should be drawn, starting with "most
interesting" edges first. Please try it and comment!
2005-08-21 07:19:20 +00:00
185054bf5b Temp edge selection for edgeslide draw length now deselected properly at the end of edgeslide 2005-08-20 21:37:52 +00:00
dd5410162a New feature; User definable Clipping Planes.
Press ALT+B in 3d window, draw a rect, and it becomes a clipping
volume of 4 planes. You then can rotate the view anyway you like.
Works for each 3d window individually.

Disable it with another ALT+B press.

Commit is huge because it had to change all selection code as well.
The user-clipping planes are in 'eye space', the other clipping
happens in projected 'viewport space'.

Nice to notice is that the 'x=3200' convention (to denote a coordinate
is clipped) now is a define. Define value is still a number though... but
we now can get up to screens of 12000 pixels without issues!

Known issue; here it refuses to draw the 'object centers' or Lamp icons
within the clipping region. Can't find any reason for it... however, we
might move to non-pixmaps for it anyway.

Testing might reveil numerous issues, will be standby for it.

Curious? Check this http://www.blender.org/bf/rt4.jpg
2005-08-20 19:18:35 +00:00
f00b5c78d4 In edgeslide if Draw Edge Length is on, the rail edges will be temporarily selected so that actual new edge length can be seen. 2005-08-20 16:38:05 +00:00
a30740c196 - convert all DerivedMesh map functions to use index based
mapping (instead of Edit{Vert,Edge,Face} pointers)
 - dropped convertToDispListMeshMapped (whew, glad of it too)
 - added DerivedMesh drawMappedFaces function
 - dropped EM suffix for DerivedMesh functions, it was neither
   particularly correct nor descriptive
 - converted test_index_mface to test_index_face that also corrects
   MCol and TFace. Good thing we had three versions of this routine,
   you never know when one might burn down.
 - removed flipnorm_mesh, not used anymore (and was incorrect to
   boot)

 - Getting face select to work with modifiers turned out to be much
   more complicated than expected. Reworked mapping architecture for
   modifiers - basically elements in a DispListMesh are now required
   to be stored in an order that corresponds exactly to original
   ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
   that is set on each element that is set on the first derived element
   of each original element. I can't say the code to follow these
   requirements for subsurf is particularly transparent, but on the
   upside it is a reasonably consistent and simple system that is memory
   efficient and allows keeping the DispListMesh structure.

 - rewrote mirror modifier to be simpler/conform to new requirements
   for mapped DispListMesh structure. This also means that mirror interacts
   much better with incremental subsurf calculation (it used to recalc
   one entire side on any topology change, now it generally avoids that).

 - added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
   functions to handle mapping indices back into appropriate EditMesh
   structures.
 - bug fix, make edges didn't recalc object data
 - bug fix, initial image assignment to TFace's didn't recalc object data

 - new feature, added circle select support for FACESELECT
 - bug fix, creating new faces in editmode duplicated the TFACE active
   flag - but there should only be one active tface
 - bug fix, possible crash when deleting all faces in faceselect mode
   on mesh with tfaces...

Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
2005-08-20 03:08:23 +00:00
2872263377 - New feature: shift+ctrl+t in Mesh editmode splits quads in exact opposite
way. Requested for low-poly modeling.

- fix: on exit editmode, the code always created a mesh->dvert block...
  silly, this made other code confused which decided whether to use
  dverts (vertex groups) or not.

- removed obsolete call from armature.c. Also fixed name of function there,
  preparation work for nicer support in Blender for "deform envelopes"
2005-08-17 13:26:42 +00:00
0c7f65d152 - added view3d_get_object_project_mat function, returns mat to project
object cos into screenspace without mucking with gl matrices.
 - added view3d_project_ functions, take arguments instead of using
   globals
 - removed View3D.{mx,my,mxo,myo}
 - switch drawobject foreachScreenVert functions to use new projection
   functions
 - switch edge slide to use new projection functions, fixes erratic
   behavior (project was using wrong mat I believe)
 - bug fix in edgeslide, nearest edge to start was one-off
2005-08-15 04:10:02 +00:00
f47f8d9418 Patch provided by Campbell Barton; this makes the editmode Mesh CTRL+T
"convert to triangles" check for shortest diagonal to decide how the
triangles will be made.

Fun todo for another occasion; check on facenormals too...
2005-08-14 10:58:17 +00:00
93aeb6b318 - added make_orco_curf, even does keys!
- removed {lattice,curve}_modifier functions
 - changed render code to use displist for curve rendering
   instead of making its own. required adding a bevelSplitFlag
   field to DispList. I also fixed the bevel face splitting
   which did not work correctly in many situations.
 - changed so all curve data creation happens in makeDispListCurveTypes,
   includes making bevel list and filling polys
 - changed render code to use displist for surface rendering
 - removed Curve.orco variable, built as needed now
 - removed stupid BLI_setScanFill* functions... why use a function
   argument when you can use a global and two functions! Why indeed.
   (this fixed crash when reloading a file with filled curves and
   toggling editmode)
 - bug fix, setting curve width!=1 disabled simple bevel for no
   apparent reason
 - cleaned up lots and lots of curve/displist code (fun example:
   "if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
 - switched almost all lattice calls to go through lattice_deform_verts,
   only exception left is particles
 - added DBG_show_shared_render_faces function in render, just
   helps to visualize which verts are shared while testing (no
   user interface).
 - renamed some curve bevel buttons and rewrote tooltips to be
   more obvious
 - made CU_FAST work without dupfontbase hack

Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:

http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
2005-08-14 06:08:41 +00:00
75bcb4cd98 - added modifiers_getVirtualModifierList, returns pointer to first modifier
but including "virtual" modifiers (for example, an object skel-parented
   to a lattice has a virtual first lattice modifier)
 - removed mesh_modifier(), all functionality has been incorporated into
   modifier stack (well, keys still don't exist as a modifier, but I am
   not sure if they should).
 - added interface option to convert a virtual modifier into a real modifier
 - added option to parent to lattice object or lattice with deform
 - bug fix, patch of hook indices patched all hooks (oops) not just ones
   for edited mesh

NOTE: Files saved with 2.38 that include an object parented to a lattice
will not load correctly, because it will look like the object is parented
only to the object (i.e. without deform). Can be simply fixed by reparenting
or adding a lattice modifier. Older files are handled automatically.
2005-08-11 03:31:33 +00:00
9030e5f686 - added eModifierTypeFlag_RequiresOriginalData for modifiers that
can only follow deform (for example, they store mesh vertex
   indices)
 - added ModifierType.foreachObjectLink for iterating over Object
   links inside modifier data (used for file load, relinking, etc)
 - switched various modifiers_ functions to take object argument
   instead of ListBase
 - added user editable name field to modifiers
 - bug fix, duplicate and make single user didn't relink object
   pointers in modifier data
 - added modifiers to outliner, needs icon
 - added armature, hook, and softbody modifiers (softbody doesn't
   do anything atm). added conversion of old hooks to modifiers.

NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files
so if you have saved stuff with a cvs blender you will see blank names.

NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh
objects, hooks for lattices and curves are broken. Don't updated if
you actually, say, *use* Blender.

NOTE-THE-THIRD: Old hooks used a quirky weighting system during
deformation which can't be extended to modifiers. On the upside,
I doubt anyone relied on the old quirky system and the new system
makes much more sense. (Although the way falloff works is still
quite stupid I think).
2005-08-10 22:05:52 +00:00
02f3c930f5 - bug fix, face center drawing was wrong for editmesh
- added several useful utility functions to editmesh,
   these can simplify/clarify a lot of mesh code, check them
   out
 - cleaned up EdgeSlide a bit to be clearer/shorter
     o bug fix, EdgeSlide did not always cancel correctly
     o bug fix, EdgeSlide did not choose initial "control" edge
       correctly after calc_meshverts_ext change
2005-08-10 03:51:34 +00:00
9823e7d548 Removed need for vert-xs and ys in edgeslide 2005-08-09 20:02:53 +00:00
98741ec436 fix for bug #2906
Was allocating array for all hidden edges, not needed, just hidden with a selected vert needed
2005-08-09 14:44:46 +00:00
6aead5176b Possible fix for bug #2906
Added some parens to change eval order
2005-08-09 13:49:05 +00:00
c192b80b17 Big commit, had to rework lots of selection stuff so that things
worked properly with modifiers. Needs more testing I am sure.
No, honestly, I wasn't just cleaning for the hell of it, it
was *necessary* (I would never do such a thing). Selection should
work completely with cage options of modifiers now.

 - added DerivedMesh foreach functions to iterate over mapped
   verts/edges/face centers. These replaced some of the drawing
   functions and are more general anyway. Special edge drawing
   functions remain for performance reasons.
 - removed EditFace xs, ys fields
 - added general functions to iterate over screen coordinates of
   mesh/curve/lattice objects
 - removed all calc_*verts* functions that were used for storing
   screen coordinates in objects. they were recalc'd on the fly
   for most situations anyway, so now we just always do that.
   calc_*verts_ext was one of those calls that did dirty things
   deep down in the callstack (changing curarea and poking at
   matrices)
 - rewrote all vertex level selection routines (circle, lasso, bbox)
   and closest vertex routines (rightmouse select) to use the new
   system. This cleaned up the selection code a lot and the structure
   of selection is much easier to see now. This is good for future
   work on allowing modifiers to completely override the selection
   system. It also points out some discrepancies in the way selection
   is handled that might be nice to resolve (mesh vertex selection has
   fancy stuff to try to help with selecting overlapping, but it only
   works w/o bbuf select, and curves/lattices don't have at all).
 - had to remove ton's code to move Manipulator to cage location, this
   is not reliable (can come up with a different method if requested)
 - as it happens BezTriple.s and BPoint.s are basically available to
   be removed, just need to rewrite editipo code that still does
   background calc of screen coordinates
 - MVert.{xs,ys} are still around because they are abused in some places
   for other info (not sure if this is safe actually, since they are
   short's and the mvert limit went up).

And did I mention this commit is comes out to -305 lines? Well it does.
2005-08-09 08:12:36 +00:00
7f98c960b5 Added extra Select Type option for esubdivide and put them in defines to get rid of magic numbers
SUBDIV_SELECT_ORIG      - Retain selection to look like original selection
SUBDIV_SELECT_INNER     - New selection is all the new inner edges
SUBDIV_SELECT_INNER_SEL - New selection is all the new inner edges except where only 1 edges was selected on a face

Loopcut now uses SUBDIV_SELECT_INNER_SEL for better interaction with edgeslide
2005-08-08 15:59:05 +00:00
fec419a05e Little fix for Edgeslide so it doesn't crash on usage!
Also fixed trying to edgeslide an edge with a missing rail.

And Changed the okee calls to error (thanks intrr)
2005-08-07 23:59:34 +00:00