Commit Graph

2255 Commits

Author SHA1 Message Date
Ton Roosendaal
67d6cd9fcb Patch/proposal from matt ebb: on changes in material color/shading or lamp
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!
2004-09-29 22:29:43 +00:00
Jiri Hnidek
b5f98248a3 - added support for MetaBall undo in edit mode (Ctrl-Z ... undo) (Ctrl-Y/Ctrl-Shift-Z ... redo) 2004-09-29 22:28:14 +00:00
Jiri Hnidek
18b439a599 - Fixed some small bug due to one of previous commit.
MetaBalls are displayed correctly in wireframe mode again
2004-09-29 22:22:51 +00:00
Ton Roosendaal
2c3e294ed5 - Previous commit broke selection of non-subsurf meshes :)
- fixed crash reported by SimonC on linked dupli meshes, editmode, set
  subsurf on, crash...
2004-09-29 21:44:12 +00:00
Ton Roosendaal
c42f0fc5cf Two small fixes;
- 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
2004-09-29 21:11:13 +00:00
Ton Roosendaal
6106f87776 - Removed printf from previous commit
- fixed small counter error in backbuffer color codes, when edge+faces
are drawn
2004-09-29 20:38:23 +00:00
Ton Roosendaal
e25d151aed Added code to selection-flush to make sure fgons are selected/deselected
when changing vertex/edge selection
2004-09-29 20:04:51 +00:00
Stephen Swaney
f2f97a5092 fix doc errors pointed out by wavk:
get/setMode() should be get/setFlag(), bitfield order was incorrect.

spellchecked Curve.py.
2004-09-29 18:24:08 +00:00
Ton Roosendaal
975f0fec0e Pooh pooh! This backbuffer system for selection codes works much easier on
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.
2004-09-29 18:08:04 +00:00
Ton Roosendaal
c1aea47313 Fix for reported error in circle selection...
It had a clumsy if() check... meaning it went to normal selection mode
when zbuffer-clipped selection failed.
2004-09-29 16:44:16 +00:00
Kent Mein
98a012865b Added Dump 3dView and Dump Screen to the File menu
with their shortcuts.

Kent
2004-09-29 16:27:12 +00:00
Ton Roosendaal
aa318f0bcc Found potential crash in undo for Curve/Surface; the global var "lastnu"
wasn't restored on undo.
2004-09-29 11:32:08 +00:00
Ton Roosendaal
ceb7d3db46 Two fixes;
- 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.
2004-09-29 10:49:19 +00:00
Ton Roosendaal
01e6d69ff5 Borderselect and circleselect now use backbuffer method too.
Maybe its time to make this a default now?
2004-09-28 22:05:16 +00:00
Ton Roosendaal
de1147e99a Removed nantechnologies from identifierstring :) 2004-09-28 20:59:14 +00:00
Ton Roosendaal
5ac0d4fd26 Cleaned the apply deform code in Blender. Now also using the modifier code.
Right now, it works for Meshes (all deformers including Curve) and for
Curve/Surfaces (only hooks).

More follows.
2004-09-28 16:18:22 +00:00
Ton Roosendaal
fc0c3a084d Last of the beautifying for subsurf+optimal editing; selectmode 'face' now
draws on click the optimal outline correctly
2004-09-28 14:53:44 +00:00
Ton Roosendaal
ff5e65bdbb Crash fix;
- wireframe view
- editmode cube
- subsurf + optimal on
- set new selectmode 'face'

thanks sirdude & sgefant!
2004-09-28 13:58:23 +00:00
Ton Roosendaal
e6cc3c1ee1 More maintenance due to new selection code;
- fgons draw correctly again in face selectmode
- on select, fgons dont draw wrong selection dot
2004-09-28 12:04:10 +00:00
Ton Roosendaal
84b021e90f Two small fixes thanks to test:
- backbuf draw vertices did still use pointsize 1.0, making them hard to
  select
- wire frontbuf draw on select used un-initialized color
2004-09-28 11:19:57 +00:00
Ton Roosendaal
9314ee5e66 Changed valence rule for edgeloop, so it treats fgons OK. 2004-09-28 10:50:22 +00:00
Ton Roosendaal
60d53c9e03 Eek! Commit for 'making transform aware for mesh select mode' caused all
other editmodes to crash in transform()!
2004-09-28 10:16:13 +00:00
Ton Roosendaal
f3c7fdd80e Recode of 'zbuffer selection'. I first was too afraid using the backbuffer
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.
2004-09-28 09:43:37 +00:00
Matt Ebb
36695066f7 Picky, picky: Removed the question mark from the end of
'Quit Blender?' as per language guidelines
2004-09-28 05:04:55 +00:00
Ton Roosendaal
766db99e45 - fixed error in copying selection from faceselectmode to editmode
- removed ancient convention that switches to wire then
2004-09-27 20:19:16 +00:00
Ton Roosendaal
ea84d29d90 Faceloop select recoded, also nonmodal (no loop). It works by clicking with
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)
2004-09-27 19:22:15 +00:00
Ton Roosendaal
dbef53aa31 Added edgeloop selection as mode-less loop-less option.
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.
2004-09-27 17:05:30 +00:00
Ton Roosendaal
0f02704bf3 Transform() now is edge/face selection aware too.
Theeth; i've done the changes as local as possible, and lotsa comments :P
2004-09-27 15:08:12 +00:00
Ton Roosendaal
a7f2950ae9 Bug fix: on scene append of curve deformer displist causes crash...
Crash is solved now, but create displist fails.
2004-09-27 10:39:18 +00:00
Ton Roosendaal
061442cbd1 - improvement for edge/face select
- 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.
2004-09-27 10:12:45 +00:00
Ton Roosendaal
995826f3ed New drawmethod for creases editing (draw creases option) in editmode.
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. :)
2004-09-26 19:55:02 +00:00
Ton Roosendaal
f98fda2857 Fix for the beloveled bevel. ;)
Still could use cleanup for flags though.
2004-09-26 18:33:29 +00:00
Ton Roosendaal
18638735c3 Two bugs:
- when adding creases in editmode, and separating that part, displists
  did weird things... separate is hackish anyway
- draw faces (transparant) didnt do triangles correctly
2004-09-26 17:53:21 +00:00
Ton Roosendaal
ab68f715cd New strict 'hide' rules for editmesh & new selectmodes
- 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.
2004-09-26 17:15:52 +00:00
Ton Roosendaal
300939e1ba Quick commit to fix crash in hide option editmode subsurf... the hide flags
still are not doing it OK... later!
2004-09-26 14:22:54 +00:00
Ton Roosendaal
d41317609d Added initialize code for zbuffer-select option, where it reads larger
parts of zbuffer on border/circle select.
Should speed up quite some.
2004-09-26 13:45:25 +00:00
Ton Roosendaal
9a6b8971dc Fix for crashes when mixed faces/edges were hidden. Not all combos were
correctly checked on in subsurf.c
2004-09-26 13:44:15 +00:00
Stephen Swaney
a509b8adc9 Another round in the Great BPy Cleanup:
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.
2004-09-25 20:30:40 +00:00
Ton Roosendaal
bd371ddb9f Two more fixes:
- 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
2004-09-25 17:57:46 +00:00
Ton Roosendaal
8655cc40ad Integer version of glReadBuffer with GL_DEPTH_COMPONENT...
reported were errors with ati-linux on using float here.

Code is still there, and can be easily switched back (  if(0) or if(1) !)
2004-09-25 16:38:51 +00:00
Ton Roosendaal
9118fbd855 Option 'all edges' didnt work anymore... fixed 2004-09-25 16:07:16 +00:00
Ton Roosendaal
dfd583116a Zbuf-selection fix: while drawing vertices, it accepted writing in zbuf
for it too... giving (sometimes) no selection, and possible for linux the
solution too!
2004-09-25 15:15:26 +00:00
Ton Roosendaal
dfef53a632 Two small fixes for previous commit;
- new zbuf-clipped select was always on
- drawing the 'floor' now doesnt write in zbuffer when in editmode
2004-09-25 14:21:09 +00:00
Ton Roosendaal
6f074f6f46 Two nice workflow improvements;
- 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
2004-09-25 13:42:31 +00:00
Ton Roosendaal
cfe9a95755 All kinds of fixes for new selection modes
- 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
2004-09-24 18:17:23 +00:00
Ton Roosendaal
572b7c078d New: Fake Polygons, or Face-polygons, or FGons nicked for 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.
2004-09-24 16:06:20 +00:00
Ton Roosendaal
f59503682d - basic code for fake-polygon support (called FGon in code). Disabled now
- 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...
2004-09-24 12:40:37 +00:00
Matt Ebb
ce12a0173c Fixed bug #1581, toolbox wasn't correctly opening the edit mode
transform properties panel.
2004-09-24 11:45:42 +00:00
Ton Roosendaal
f3135d0009 Very bad typo, causing wrong blocks to be freed when the undostack is
full. Gives crashes on exit...
2004-09-24 09:51:16 +00:00
Ton Roosendaal
1ae3e3efc1 Fix for loopcut, didn't work after reconstruct... 2004-09-23 22:54:18 +00:00