Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
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)
|
|
- 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
|
|
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.
|
|
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.
|
|
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.
|
|
- 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.
|
|
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.
|
|
Fixing Loopcut smooth to actually cut smooth
I think this will go to HEAD now...
|
|
|
|
CutEdgeLoop now ignores hidden edges
|
|
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.
|
|
header is redrawn at the end of loopcut to fix part 2 of the bug , my previous commit fixed the first half of it :)
|
|
letting qread() finish its work instead of breaking. I think this may have been causing trouble.
|
|
prevent it from bottlenecking
|
|
|
|
- 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.
|
|
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
|
|
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).
|
|
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.
|
|
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
|
|
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
|
|
|
|
crosses itself' message. Still need to work on selection out of this condition
|
|
|
|
|
|
BIF_undo() instead
|
|
Also Added some code for UV's in subdivide. This is close, but still is not perfect :(
|
|
Further cleaned up editmesh code to be warning free and to have a little
nicer style :)
|
|
- 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.
|
|
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
|
|
last preview line.
Thanks to Desoto for reporting.
|
|
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
|
|
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! :)
|
|
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.
|
|
Made face-looping code idling correctly (hotkey K in editmode)
|
|
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)
|
|
lot of casts, added prototypes, missing includes and some true errors
|
|
loop select (Alt B)
Reported by Gimble
|
|
- 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!
|
|
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
|
|
- 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)
|
|
Order of drawing had to be flipped
|
|
so loopselect mode needs refresh of backbuffer during loops
|
|
- ALT+B loop edge select loop
- SHIFT+R loop face select loop
(both work with ALT+select too)
- CTRL+R loop cut
- Kkey menu, loop select/cut and knife
- and ALT+select on edge always selects a loop now
|
|
Just select a bunch of faces (selection should be valid flat poly) and
press FKEY. Works in fact as selection-group optimizing. Nice in solid
drawmode!
Further some small additional fixes in the whole debugging process.
Found old error in loopselect for triangles, subdivision code, and
selection still.
NOTE: subdivide still works on vertex level only.
|
|
|
|
The changelog is very long... it's on the web too:
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
EditMesh refactor notes (user)
**** New selection modes
When entering Edit Mode for a Mesh, you now have the choice for three selection modes. These are shown as icons in the 3D header (hotkey is being searched for!).
- Vertex Select
Select vertices as usual, fully compatible with how previous version work
- Edge Select
Vertices are not drawn anymore, and selections happen by default on the edges. It is a true edge select, meaning that you can select three out of four edges in a face, without automatic having the 4th edge selected.
- Face Select
Instead of vertices, now selection 'points' are drawn in the face centers. Selected faces also get a colored outline, like for edges. This also is true face select, for each face individual regardless selection status of its vertices or edges.
While holding SHIFT, and press a selection mode, you can also combine the above choices. Now selection becomes mixed, and will behave as expected.
For example; in Edge+Face select mode, selecting the 4 edges of a face will select the face too.
The selection modes and optional drawing modes (like transparant faces, normals, or solid drawing) all work together. All of Blender's mesh editing tools now react to the correct selection mode as well.
Most noticeable it's in:
**** Extrude
Extruding in Edge or Face Select mode allows much more precise control over what's extruded and what should be excluded. Try for example a checker pattern selection, and extrude it.
New is the fixed translation when faces are extruded. This always follows the (averaged) face normal(s) of the old face(s), enabling much easier working in 3D views . A single 'G' (Grab) or 'R' (Rotate) or 'S' (Scale) will change transform modus as usual.
**** Other things to note
- Hiding edges/faces will also behave different based on Select Mode.
- while editing, normals of faces are updated always now
- Border select (BKEY) has 2 different rules for edges; when one edge is fully inside of the border, it will only select edges that are fully inside. Otherwise it selects each edge intersecting with the border.
- in face mode, adding vertices, edges or a circle is invisible...
- "Add monkey" now works as a normal primitive (rotated and on 3d cursor)
- Mesh undo was fully recoded, hopefully solving issues now with Vertex Keys and Groups
- Going in and out of editmode was fully recoded. Especially on larger models you'll notice substantial speed gain.
**** Todo
Add 'FaceSelect mode' functionality in EditMode, including zbuffered selection, display and editing of UV texture.
EditMesh refactor notes (coder)
**** Usage of flags in general
The "->f" flags are reserved for the editmesh.c and editmesh_lib.c core functions. Actually only selection status is there now.
The "->f1" and "->f2" flags are free to use. They're available in vertex/edge/face structs. Since they're free, check carefully when calling other functions that use these flags... for example extrude() or subdivide() use them.
**** Selection flags
EditVert: eve->f & SELECT
EditEdge: eed->f & SELECT
EditFace: efa->f & SELECT
- Selection is only possible when not-hidden!
- Selection flags are always up-to-date, BUT:
if selection mode >= SELECT_EDGE vertex selection flags can be incorrect
if selection mode == SELECT_FACE vertex/edge selection flags can be incorrect
This because of shared vertices or edges.
- use for selecting vertices:
eve->f &= SELECT
- use for selecting edges always:
void EM_select_edge(eed, 1) // 1 = select, 0 = deselect
- use for selecting faces always:
void EM_select_face(efa, 1) // 1 = select, 0 = deselect
- To set the 'f' flags in all of the data:
void EM_set_flag_all(int flag);
void EM_clear_flag_all(int flag);
- the old faceselectedOR() and faceselectedAND() are still there, but only
to be used for evaluating its vertices
**** Code hints for handling selection
If the selectmode is 'face'; vertex or edge selections need to be flushed upward. Same is true for 'edge' selection mode. This means that you'll have to keep track of all selections while coding... selecting the four vertices in a face doesn't automatically select the face anymore.
However, by using the above calls, at least selections flush downward (to vertex level). You then can call:
void EM_selectmode_flush(void);
Which flushes selections back upward, based on the selectmode setting. This function does the following:
- if selectmode 'vertex': select edges/faces based on its selected vertices
- if selectmode 'edge': select faces based its selected edges
This works fine in nice controlled situations.
However, only changing the vertex selections then still doesn't select a face in face mode! If you really can't avoid only working with vertex selections, you can use this call:
void EM_select_flush(void);
Now selection is flushed upward regardless current selectmode. That can be destructive for special cases however, like checkerboard selected faces. So use this only when you know everything else was deselected (or deselect it). Example: adding primitives.
**** Hide flags
EditVert: eve->h
EditEdge: eed->h
EditFace: efa->h
- all hide flags are always up-to-date
- hidden vertices/edges/faces are always deselected. so when you operate on selection only, there's no need to check for hide flag.
**** Unified undo for editmode
New file: editmode_undo.h
A pretty nice function pointer handler style undo. Just code three functions, and your undo will fly! The c file has a good reference.
Also note that the old undo system has been replaced. It currently uses minimal dependencies on Meshes themselves (no abuse of going in/out editmode), and is restricted nicely to editmode functions.
**** Going in/out editmode
As speedup now all vertices/faces/edges are allocated in three big chunks. In vertices/faces/edges now tags are set to denote such data cannot be freed.
ALso the hashtable (lookup) for edges uses no mallocs at all anymore, but is part of the EditEdge itself.
|