Commit Graph

56 Commits

Author SHA1 Message Date
aa10e1b11e Bugfix for [#17363] Edge selection mode + knife twice = latter cut doesn't do anything 2008-09-09 21:46:19 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
3de98a7cc1 Fix for bug #8093: editmesh knife with axis constraint + snapping rounded
down some values unnecessarily, which made it not entirely exact.
2008-03-17 18:49:30 +00:00
Ken Hughes
ab662ae85c More fixes for gcc warnings. 2008-02-03 18:50:03 +00:00
bdad8d0de6 * Tweaked the knife tool header info text, making mention of the previously hidden ability to use MMB to constrain to screen axes. 2007-09-08 02:08:51 +00:00
3c13561ab5 === Transform Snap ===
Fixed the bug where it would snap to a selected (moving) vertex.

Fixed a bug with Snap Closest with only one vertex selected.

=== Internals: EditMesh Mods ===

Modify and documented findnearestvert.

Added a new parameter to restrict the search to selected or unselected vert instead of just adding a bias to them (as previously). Currently, the "strict" method bypasses the openGL optimisation, people with more knowledge about that should feel invited to fix it.

=== Internals: EditMesh Tools ===

Adding missing newline at the end.
2006-12-28 22:42:58 +00:00
95c7c41bd0 Bugfix #5224
Prob: selection sometimes gave wrong edges/faces

Selection code for editmesh was still using a short for calculating the
distance of a projected vertex/edge/face from the mouse position. In
zoomed in cases that'll give overflows and unpredictable results.

It was fixed only half before... now all shorts are removed for distance
calculus.
2006-11-15 10:02:57 +00:00
e136fe0acb -> Adjustable Tolerance for Knife Vertex Cutting
Previously had Vertex snapping in knife tool adjustable by the 'threshold'
value in the 'Mesh Tools' panel. This was actually a misunderstanding on
my part of a user request (oops). What was really needed was to make the
sensitivity of intersection code for vertex cutting adjustable. Vertex Snap
is now set at same tolerance as vertex selection.
2006-09-24 05:14:29 +00:00
e7874b3ff0 ->Knife Midpoint and Vertex Cutting
Cutting through vertices and vertex snap was only supported in
'knife exact' mode. Now works for 'Knife Midpoint' as well.
(Multicut and vertex cutting would require N-Gons)
2006-09-19 00:08:09 +00:00
2ee42ac01e Huge commit: VERSE
- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
2006-08-20 15:22:56 +00:00
4b681e3910 -> Adjustable Tolerance for Knife Exact Snapping
Vertex Snapping for 'Knife Exact' tool was originally set at 75 pixels. Now its adjustable via the 'threshold' value in the editing context of the buttons window. I also changed the tooltip to reflect this.
2006-08-18 06:08:21 +00:00
3be0a5ad70 -> Bugfix (again)
Didn't realize that LMB+ALT was used for middle mouse emulation. Changed
the vertex snap modifier key for knife tool to 'CTRL' and fixed problems
with the drawing of the header instructions.

Also changed color of the knife tool to match that of loopcut tool. This
is easier to see and more consistent from a UI standpoint as well.
2006-08-12 03:32:08 +00:00
e96c813cc3 -> Vertex support for knife tool
Previously the knife tool only allowed you to cut through edges. This
approach is limited however, since many times you want to cut through
vertices in order to create precise cuts or terminate a cut in a specific
way. Blenders knife tool now supports cutting through vertices as
demonstrated in these pictures:

http://briggs.zanqdo.com/newknife1.jpg
http://briggs.zanqdo.com/newknife2.jpg

Since the vertex intersection code is very precise, vertex snapping has
been added to the knife tool to assist the user when they wish to cut
through vertices and can be toggled by pressing and holding the 'alt' key.

Notes:
-Vertex cutting and vertex snapping are only available when using the
'knife exact' option.
-Added various fixes to the precision of the knife tool.
2006-08-11 07:24:33 +00:00
c2edcd4879 Siggraph show commit!
- pending commit for OSX intel systems, with intel graphics. These now call
  an extra swapbuffers after glFlush(). Code is ifdeffed, and doesnt affect
  other systems.

- show-off commit: option to have transparent nodes over the composite
  result. Only draws Image for active Viewer Node now, and image doesnt
  translate nor zoom (which isnt bad though).
  Set in themes the alpha color of "node backdrop" to make nodes
  transparent.
2006-07-31 19:23:42 +00:00
4a1d4653da -> Fix for bug #3867
Face loop cut was failing on meshes with hidden parts. Also modified edge
ring selection code in editmesh_mods.c to ignore hidden parts of mesh.
2006-06-08 05:41:57 +00:00
e4c375ef0b bugfix #3550
Fixing Loopcut smooth to actually cut smooth

I think this will go to HEAD now...
2005-12-09 14:49:41 +00:00
bcd723c0af Make preview line not draw over hidden areas for loopcut 2005-11-08 15:04:14 +00:00
ea1d6d54d0 #3375
CutEdgeLoop now ignores hidden edges
2005-11-08 14:52:35 +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
d9b0475158 bug #2909
header is redrawn at the end of loopcut to fix part 2 of the bug , my previous commit fixed the first half of it :)
2005-10-02 23:10:56 +00:00
453fd9f532 A little more cleanup of the loopcut code. Hoping to gain some speed, and letting qread() finish its work instead of breaking. I think this may have been causing trouble. 2005-10-01 13:04:19 +00:00
80c5ca75dc For loopcut, have the event queue ignore MOUSEX and MOUSEY events to help prevent it from bottlenecking 2005-09-30 20:18:00 +00:00
d29f7c2c84 Some whitespace cleanup... 2005-08-21 03:37:38 +00:00
2abd79b491 - readded DL_VERTS type to store lattice deformed verts
- new feature, twiddled with lattice resizing to try to maintain
   existing vertex changes... much nicer than just resetting the
   lattice if you decide you need more detail in the lattice.
 - modifiers work with lattices now. yes, that does mean you
   can make a chain of lattices effecting each other 8 miles
   long.
 - some cleanup of softbody code, was rather splintered and call
   path was twisted and confusing. reworked main object step
   routine to do things in a more obvious and consistent manner
   and without duplicate code
 - added ob->softflag OB_SB_RESET instead of sbObjectReset
   call
 - modifier changes reset softbody now
 - moved curve_getVertexCos/curve_applyVertexCos into curve.c
 - update curve modifier eval to work with virtual modifiers
 - update modifier apply to work with curves/surfs
 - update make parent to also recalc object data

NOTE: Although you can turn SB on for curve/font objects at the
moment it doesn't really work because they call deform in
multiple steps and this confuses SB. Not sure how to deal with
atm.
2005-08-15 10:30:53 +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
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
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
32656ad7ef Now while choosing an edge in loopcut, S will toggle loopcut smooth. There is a headerprint to show current status of smooth.
Also a little tweak in subd smooth. is still not perfect in full quads/tris cases
2005-08-05 15:52:28 +00:00
45386aeb3c Made the screen redraw on loopcut cancel 2005-08-03 19:23:56 +00:00
bc865d6d20 Make Loopcut in Faceselect mode able to enter Edgeslide and not get 'loop crosses itself' message. Still need to work on selection out of this condition 2005-08-01 19:12:29 +00:00
3624c1278d Just a little cleanup, removed an extra redraw....move along :) 2005-07-31 20:56:20 +00:00
01436513dc Some more loop fixing, this time in loopcut 2005-07-31 20:40:27 +00:00
dec3fa07f3 Some bad use of non-public API. Changed the calls to BIF_undo_push() and BIF_undo() instead 2005-07-25 17:03:09 +00:00
0a05783cba Added code in loopcut to undo cut if edgeslide was cancelled. (For you Chris!)
Also Added some code for UV's in subdivide. This is close, but still is not perfect :(
2005-07-23 14:39:59 +00:00
261bd94e7f Fix: outliner crash on deleting bones in editmode
Further cleaned up editmesh code to be warning free and to have a little
nicer style :)
2005-07-17 15:45:35 +00:00
8d2176bfeb - removed makeDispList, set_displist_onlyzero
- appropriate callers of makeDispList replaced with depgraph calls
 - unappropriate places just killed... small chance this gives some
   errors in corner cases if dep graph isn't notified (example, font
   family displists) but these can be tracked down as they show up.
 - still a large number of callers of makeDispListCurveTypes, but
   makeDispListMesh has just a few.
2005-07-15 20:56:55 +00:00
1bfd0eae14 A few additions/changes suggested by Chris Burt
1. Return and PADENTER confirm loopcut and edgeslide
2. When choosing loop to cut in loopcut, can use numeric entry for number of cuts (less than 130)
3. Number of Cuts in loopcut printed in header
2005-07-14 02:52:51 +00:00
64af8d0ced If loopcut was cancelled, the screen was not refreshed to get rid of the last preview line.
Thanks to Desoto for reporting.
2005-07-13 19:39:01 +00:00
798d39dd4c Well here it is. Subdivision/Loop Tools Recode Commit #1
Ton has been pushing me to get this in and finish it up with help, so here is a run down of the commit

Revised Features
	Subdivide now is Edge based, allows for multicut
	Loopcut was recoded, now has multi option
	Knife tool now has multi option

New Features
	Edgeslide
	Edgering select

Removed Features
	Alt-B Edgeloop selection (use alt-RMB in edgemode)
	Shift-R Faceloop selection (use alt-RMB in facemode)
	Old Subdivide (Except for smooth which is left in until new one works)

Todo
	Subdivide Smooth Math is broken - could use some help here (look for alter_co in editmesh_tools.c)
	Tweak mouse control of Edgeslide is hackish ATM
	Add Non-proportional movement  to edgeslide
	Add smooth option to new loopcut

I probably left something out.

See here for more info
http://wiki.blender.org/bin/view.pl/Blenderdev/EdgeSubdivision
2005-07-13 15:20:40 +00:00
85aca9bba1 Fix for bug #2747
Knife cut in edge selection mode can cause crashes, since it uses subdivide
which isn't edge-select aware yet.
Quickly patched it by making knife checking on vertex selection.

Johnny: undo this change when you add the new subdiv code, good test for if
it works as well! :)
2005-07-11 11:58:29 +00:00
704867c4c9 Bug fix #2578
My fix to make subloops more idling was not needed in the case for
drawing the knife cut 'mouse trail'. This uses a proper qread() which
has a wait builtin for events.
2005-05-18 09:19:16 +00:00
6bb1232b06 Bug fix #2533
Made face-looping code idling correctly (hotkey K in editmode)
2005-05-12 14:37:47 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
52799e4950 Simple one - update the selected vertex count after doing a vertex
loop select (Alt B)

Reported by Gimble
2004-12-28 05:38:56 +00:00
32c95ccae4 Three bugfixes, as reported on release;
- loopselect doesnt work proper with vertices outside window
- outliner crash on script select (potential showstopper...)
- make curve parent menu, press ESC, crashed blender

All minimal changes in code. no new development, promised!
2004-11-16 15:08:42 +00:00
29ca2ad989 Added a header to get rid of this:
editmesh_loop.c:305: warning: implicit declaration of function `backdrawview3d'

I also removed the config.h stuff from this file, since were not using autoconf

Kent
2004-11-11 15:58:24 +00:00
82f8a02926 - Added proper undopush for 'apply object'
- Added proper edgeflag test for knife
- Fixed error in 'make face' for cases I again didn't foresee (ordering
  of vertices can be any, need to try 3 cases before rejecting)
2004-11-04 20:00:57 +00:00
9968d2b5ba Fix for ALT+B loopselect, in Z-culling selection mode...
Order of drawing had to be flipped
2004-10-30 19:12:34 +00:00