Commit Graph

34 Commits

Author SHA1 Message Date
e51a464731 - fixed this nasty selection problem, i hope for good!
- problem was in limiting the abuse of frontbuffer drawing as happended
  a lot in 2.28 and older. the less the better...
- bug was not registering a curarea->win_swap=FRONT_OK, to indicate there
  was only drawn in frontbuffer
- cleaned up calls further, and made sure it doesnt draw 1 vertex too many!
  also means it works better with selecting in solid drawmode now, check!
2003-10-26 23:47:58 +00:00
cc35c992b3 Added K Menu for Loop Select, Loop Cut, and Knife tools. 2003-10-26 21:22:32 +00:00
f0f851d963 - restored default one 'solid' light
- subsurd level '0' is possible again.
  however; it was changed to '1' because convert-to-mesh crashes. the
  subsurf code doesnt give a result when level is '0', causing the convert
  routines to either crash, or deliver empty mesh...
  I added a warning in the convert routine now, and dont do anything then.
- changed all glFlush() in glFinish() in editobject.c, which seems to be
  the right magical call to show frontbuffer drawing.
2003-10-26 20:45:52 +00:00
c2cb25a4ed fixed a few warnings in my code 2003-10-25 20:56:05 +00:00
786fad9285 corrected a bug with Align view and rotated objects 2003-10-25 20:30:37 +00:00
3545113051 fixed three bugs:
- subsurf also smoothed loose vertices, in a strange way that never showed
  up until 'draw subsurf handles' was implemented.
  fixed subsurf code not to include loose vertices anymore
- saving a file in editmode caused a new displaylist to made... fixed an
  old bad hack from NaN period.
  (displists are still lousy code...)
- fixed drawing vertices in frontbuffer on select.
  the delay you see is because blender waits for 'rightmouse transform'.
2003-10-25 11:38:04 +00:00
00f11bf5f3 Fixed bug in Loop Subdivide preview line (cause a crash) 2003-10-25 09:41:22 +00:00
f90a2c3839 Final (hopefully) commit for faceloop select and loop subdivide
Loop Select:

Selects a row (or loop) of faces in a mesh, keeps searching till it
finds a loop (End face == Start Face) or till it finds a dead end.

Loop Subdivide:

Searches for the same row/loop as loop select but inmediately
splits it in half.

Usage:
- Loop select:
  Shift-R (or select->faceloop)
  move mouse over mesh to see preview of selection
  LMB to confirm selection, RMB or ESC to cancel

- Loop Subdivide:
  Ctrl-R (or Mesh->Edges-> Loop Subdivide)
  move mouse over mesh to see preview of the newly cut loop
  LMB to confirm selection, RMB or ESC to cancel


Please test! (besides, it's fun to play with :)

Roel
2003-10-25 00:37:14 +00:00
dbdc116909 - fixed bug: 'header select' themecolor had no alpha, causing antialiased
lines not drawn (triangles in buttons for example)
- correct colors for channels in texture buttons
- fixed bug: using proportional editing, the extra wire draw had incorrect
  matrix
- fixed bug: drawing in imagewindow didnt work anymore... was a very old
  one! the wrong pointer was read, and it accidentally went OK, until now
- selecting vertices with multiple 3d wins open works again
2003-10-22 17:34:51 +00:00
ed290ebf19 - Added PADENTER to knife confirm, to make it more consistant
with okee() et. al.
2003-10-22 01:21:37 +00:00
5e64eb72a2 - Preserved selections in undo.
- Fixed spurious "recalc norm" enties in Undo.
2003-10-22 00:52:26 +00:00
a0824f8fb9 Mesh drawing stuff!
- in zbuffer mode, vertices will be blended 50% in... and when you increase
  vertex size larger than 2 pixels, it will draw them smaller
- removed all 'wire extra' calls (there were dozens!) and replaced it with
  simple call where it belongs.
  This drawing mode is becoming nice & stable... maybe something to make
  default on for new objects? Makes selecting quite easier...

- Subsurf: in editmode, with new 'Optimal' option set, the mesh itself
  will not draw, but instead it draws 'handles' to the vertices. Looks
  extremely clean!

- matched drawing of default grid-floor (persp) to ortho grid

- killed drawing vertices outside of main drawing loop, apart from the
  routine that uses mouse-selecting. (tekenvertices_ext()). It was an old
  optimize routine which became quite useless.
2003-10-21 16:41:28 +00:00
382d802427 - made a template function for editmesh enthusiasts.
- goes in a loop,
  - draws current window
  - sets view transform to correct matrix
  - you can draw stuff
  - swapbuffers
  - event queue test to escape

Test: CTRL+R in editmode.
Right now it hilites the closest edge to to mouse cursor, just for fun!
Goofster will use it for the loop-cutter tool later. But the template
will remain there, commented out, for others to play with.
2003-10-20 17:46:33 +00:00
052b909ee6 Knifetool bugfix:
The call to headerprint left GL environment in wrong state to draw knife
	line in all but top view. Moved persp() call to after headerprint().
2003-10-20 00:46:03 +00:00
d5322a6352 Editmesh Undo:
User Info:
	Pressing UKey in mesh edit mode now undoes only last step.  Undo can save
	upto 64 steps of undo info.  This is configurable under User Prefs->
	Edit Methods.  The default is 32.  High numbers of undo steps use a
	lot of memory, since each step stores a copy of the mesh.

	Shift-U redoes the last undone step (Undoes the undo.)

	Alt-U brings up a menu of possible steps that can be undone.  Selecting
	an item on the list undoes that item plus all items before it on the list.
	The top selection "Undo All" is identical to the old Ukey.  It undoes
	all editing since entering Editmode, even if all regular undo steps are
	used up.

	Undo info is only saved for one object at a time.  You can leave and re-
	enter editmode for the same object, and all undo steps for that object are
	preserved.  Undo info for an object is lost once a different object is
	edited.

Coder Info:
	In order for undo to work, a checkpoint save has to be made.  This is
	done with a call to undo_push_mesh("name of step").  This should be done
	after the last quick abort for a function (typ. the
	"if (G.obedit==0) return;", or similar).  the undo_push_mesh() does alter some
	flags, so don't try to be too tricky and call undo_push_mesh() too late.
	The step name is what shows up in the undo_menu.  The name "U" is reserved.
2003-10-19 20:52:34 +00:00
de64d218a0 Adding Knife tool as to be released in 2.3
User Info:
	To use this tool, select a group of verts, it can be larger than the
	desired cut as explained below.  Then hit Shift-K.
	The tool will  prompt for cut type (Exact line or Edge centers),
	Select, then use LMB to draw a "cut-line".  Holding down LMB causes
	a freehand draw, clicking LMB causes a polyline draw.  MMB locks the axis.
	When done press enter to divide mesh on cut line. Subdivide routines have
	been modified to produce fewer triangles as part of this tool.
	Edge Centers preserves UV info, Exact Line does not (it will be there, just
	slightly distorted).

	Since the cut line exists in 2D space, and does not make a persistant
	selection that can be modified in another 3D view, the knife selection
	is the AND of the vertex selection and the knife line, ie; the edge will
	be subdivided only if both verts are selected, and the knife line crosses
	the edge.  Select your verts first, but you don't have to be overly
	precise. If you want to cut a few faces on the front of a sphere, you
	can select the whole front of the sphere, then knife the faces you want.

Coder Info:
	KnifeSubdivide is called with 1 of 3 modes. KNIFE_PROMPT, KNIFE_EXACT,
	KNIFE_MIDPOINTS.  The hotkey calls KNIFE_PROMPT.  When adding to a menu
	or button, explicitly call out the mode.

	Part of the tool provides get_mouse_trail() that returns a CutCurve struct
	that defines a knife line.  There are modes defined, but currently they are not
	implimented.

	Another part of this tool defines new behaviour for subdivideflag().
	Setting beauty param to B_KNIFE	tells subdivideflag() that the edges
	are preselected ans to skip the vert check.  Also setting B_PERCENTSUB tells
	subdivideflag() to divide the edge at a percentage of the distance from
	eed->v1 to eed->v2.  This percentage is passed in the eed->f1 flag as a
	short (ie, setting eed->f1 to 16384 cuts the edge half-way).
2003-10-19 19:50:17 +00:00
d622706883 Preliminary work on faceloop selection and faceloop cutting. Commiting in steps to prevent Ton from sneaking in between me! :D
some small things to fix:

- cutting on 1 face doesn't work
- options now under shift/ctrl R, they will be under a K menu that will contain DetectiveThorn's Knife tool too.

Roel
2003-10-17 19:59:32 +00:00
a7cd8b5951 - fixed correct drawing of frontbuffer vertices... it still gives some
nice increased interactivity when selecting in slow drawing situations.
  nevertheless, can be worked on later once, to make it less hackish. :)
2003-10-16 09:56:23 +00:00
5d1438ad96 - fixed editing vertices again!
I had to clean up very old calls to switch matrices for 3d windows.
To make it more clear, I've introduced defines for the infamous persp()
function:

persp(PERSP_WIN);  sets matrices at pixel level window
persp(PERSP_VIEW); restores matrices back to 3d drawing
persp(PERSP_STORE); only called once, to store correct matrices

I will now check on frontbuffer drawing of vertices... it's very doubtful
if it's used still correctly, was only meant for visual speed in the
early nineties you know. :)
2003-10-16 09:39:19 +00:00
10333bd1d3 - removed all #include "interface.h" from files. this is a local/internal
include only (use BIF_interface.h instead)
- split up interface.c in two files: NEW: interface_panel.c
- removed the temporal text files

WARN: FIX AUTOMAKE AND MSVC!
2003-10-15 19:23:54 +00:00
Alexander Ewering
5c2005cf06 Robert (DetectiveThorn) Wenzlaff's Knife subdivide tool. See previous
message on Bf-committers for description.
2003-10-12 23:43:26 +00:00
f234b44d47 - another huge commit! read this!
- removed src/buttons.c and include/BIF_buttons.h
- added src/buttons.txt, which is the old buttons.c for review and adding
  code to new panels structure

- changed internal events to match new buttonspace structure
- added tabs for new shading group of buttons
- removed loads of little warnings, -Wall now compiles src/ almost without
  error (hint: setenv NAN_QUIET to see it all better)

Now I'm ready to do actual buttons -> panels conversion. I will do the raw
versions first, others then can cleanup
2003-10-07 18:24:02 +00:00
b5450f0815 added 2 new features:
- "Seperate loose parts" is an option in the new pkey popup (in mesh editmode) that seperates a mesh based on objects in it that are not connected.

- "Select same uv" is an option in the wkey popup (in facemode) that selects all faces in the mesh that have the same uv texture assigned as the current active face.

ps. first commit! I hope I can live up to expectations...but don't expect too much! :D
2003-09-20 20:58:14 +00:00
Alexander Ewering
8780ef0975 The "extrude" operation now automatically sets newly created faces "smooth",
based on the assumption that if any of the faces attached to any of the
edges that have been extruded were "smooth", the result should also be.
(There is no other way to detect this, as edges don't have a "smooth" flag :-))
2003-09-10 16:26:21 +00:00
25268cbf3b - Bisschofftep's improvements of tooltips text.
in editmesh three error menus were made more clear.
2003-08-21 12:49:28 +00:00
cf322b1a9a * Fix problem that edge select hotkey doesn't work on Linux.
Edge select is now _only_ working with ctrl-alt-RMB. Patch provided by
  Roel Spruit (Goofster).
2003-08-06 12:25:24 +00:00
6b070b3d0d - added ALT_RIGHTMOUSE select edges in Mesh editmode
- added 'draw edges' mode in F9 menu
- changed ugly 'draw faces' in a nice transparant :)
- hotkey for screenshots: ALT+CTRL+F3 now works too
2003-07-20 20:25:30 +00:00
d5c829e413 - added the 'no diffuse' and 'no specularity' options for Lamps, as were
in Tuhopuu
- added the Tuhopuu feature which displays material-buttons and lamp-
  buttons integrated. saves button presses that way!
2003-07-20 15:55:02 +00:00
83b5ef6523 fixed some more screenupdate issues and eliminated a crash
when trying tio shear/warp not visible objects. (thanks Matt)
2003-05-13 14:22:28 +00:00
94ff0ea3be fixed a lot of interface update issues.
big thanks to broken !
2003-05-05 12:18:22 +00:00
ceb3e8cc2a phew... a whole bunch of old and nasty files translated, including the
central mesh editing one.
2003-04-29 15:30:59 +00:00
fd05cdbaad Ok this should have probably been three seperate things but I figured
some people are getting sick of the email and the comments are small.

editmesh.c I added casts in a couple of places to remove a few warnings.

Then I cleaned up configure.ac a bit specifically the checks for
--with-ssl etc... so they work a little nicer.

I also modified source/Makefile.am to add targets for the player
Still needs some work I'm sure but its a start.

Kent
--
mein@cs.umn.edu
2002-12-03 18:31:50 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00