it redraws 3d window appropriate. That it didnt do that was again some
convention from 1995 :)
Result is actually very nice, with cool visual feedback.
I've coded it very friendly, with checks for minimal redraws to do. If thats
still giving interactive flow issues, let me know!
- draw extra wire on solid displayed curve objects (cyclic filled curves)
now doesnt draw wires of filled faces
- set glPolygonOffset much more narrow now, since we dont need it for zbuf
value selecting
osx with AUX buffers, than on other systems with GL_BACK buffer...
Now i've added a check in force_draw to also redraw the backbuffer, if
needed. ANother weak point in the sublooping system in blender.
- borderselect draws cleaner info in bottom/left corner window
- OGL render (in view3d header) option didn't work on successive renders.
was due to removing hack that reopened the window each time. But now it
needed to be assigned correctly to blender's 'mywindow' system.
selection method, since there's too much trash in drawobject.c and displists...
But, I couldn't stand the zbuf selection to miss edges too often. Right now
both methods are still in the code, and can be reviewed.
Please note for test:
- borderselect and circle-select still use old method
- new selection works directly on faces & edges
- subsurf optimal draw and selection works fine now
To detect the closest vertex or edge, i use the old 'spiral selection' code,
which is extremely accurate. If your mouse is close to an edge, it should
find it.
Most evidently I need to test speed... also, the disadvantage of backbuf
selection is the limited depth, which can be 16 bits (65 k faces) on systems.
ALT on an edge, in face-select mode. Holding shift again extends selection.
Current UI access can need rethink though. But I also think the loop tools
deserve to be accessible without menu, for speed/workflow. So what's good
shortcuts!
BTW: both tools don't do triangle meshes (yet)
Hotkey: ALT+select (ALT+CTRL for single button mouse)
Hold shift to extend selection, or to deselect
It correctly does edges on boundaries and loose edges too.
- edges now sample on three locationsm gives more hits
- own version of glPolygonOffset remains cumbersome... but for select
now the selection routine gets more offset than draw.
- first attempt to clean drawobject.c and displists
- generic call for draw object in backbuf for select purposes, cleans up
a lot in the other calls.
- also to verify if we can (in future) use this for vertex/edge/face
select, but the whole drawobject code works against me... this is
for another refactory (incl. displist) and out of the focus for now
- subsurf.c: now creates new faces in order of original. Not used yet, but is
handy to recover the original order for selection/paint purposes.
http://www.blender.org/bf/rt3.jpg
It draws a 2 pixel line, growing from center of edge, to denote sharpness.
This works nicely with the new selection modes.
Please note that subsurf-optimal still draws original edge then... but
this didnt work before neither. :)
- when adding creases in editmode, and separating that part, displists
did weird things... separate is hackish anyway
- draw faces (transparant) didnt do triangles correctly
- vertex hidden, always means edge is hidden too
- edge hidden, always means face is hidden too
- face hidden, only means face hides
This means, that in face mode you can hide a face, whilst in edge mode
the edges will still display.
Please note, that when you have no edges saved in a Mesh, it also doesnt
store the hide flags for it, causing in/out editmode too reset hidden
edges.
Run everything thru indent to cleanup spaces vs tabs.
Clean up some of the comments by hand.
BGL.c was not touched due to all that macro wackyness.
There are no functional changes to the code.
Pre-indent versions of source are tagged with
tag bpy-cleanup-20040925 , just in case.
- face centers didnt recalculate at vertex-smooth, vertex-sphere and so
- on edge extrude (meaning the new faces), it now copies face data (material
index, smooth, tface) from the face that shared an edge
- Zbuffer clipped selection
Based on same algos as for drawing (blender polygon offset) vertices, edges
and faces now are clipped for draw and selection when Zbuffer is used.
Note that it works for endpoint vertices of edges, and for facecenters.
Also works for border and circle-select
- Optimal draw subsurfs
This now draws optimal with faces and edges selected/unselected, hiding the
original 'cage' (mesh) completely.
TODO: edge select, which still uses original (invisible) edge.
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
- circle-select now works
- delete options for edge/face select work as to be expected.
should check on a better set of choices in menu though
- assign material / select material options work for new modes
- shift+f fill didnt leave proper select flags...
- border select on face-gones (fgons) works
- 'draw normals' and fgons works 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.
- hide flags now save correctly in mesh, to restore after going in/out
editmode
- after an extrude, faces/edges could have wrong select flags
(only in vertex select mode)
- new rule for addfacelist(); this now copies edges too, if an example
is provided. That prevents a lot of awkward code, still testing if it
goes as desired though...