Commit Graph

485 Commits

Author SHA1 Message Date
0311189fb8 - fixed printing in headers (during modes) for when there is no header...
(uhh.. i mean, then it doesnt print!)
- put back axis icon of 3d win to left/bottom corner.
  it was only moved for tests with an extended header to the left...
2003-10-26 21:09:33 +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
1f7bfbf50a Mirror now works with all types of data
Fixes the different type of center for Mirror
Rename mirrormesh to mirrormenu

I'm looking for a hotkey for that. Will talk about it tomorrow during the meeting
2003-10-26 04:18:03 +00:00
36668278ac Fixed grab on local axis in object mode 2003-10-25 22:24:00 +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
513ae61f2b First commit of a new toolbox system.
Aim was to find a simple & easy system, script alike, to add and configure
a toolbox system, so that others can experiment, but also of course Python.

Summary:
- spacebar calls it up. SHIFT+A still does old toolbox
- hold left or rightmouse for 0.4 second, and it pops up as well
  this is experimental! Can be tweaked with Userdef var "ThresA"
- it is a little bit complete for Object mode only. Needs still work
  at information desing/structure level
- the code works like an engine, interpreting structs like this:

static TBitem addmenu_curve[]= {
{	0, "Bezier Curve", 	0, NULL},
{	0, "Bezier Circle", 1, NULL},
{	0, "NURBS Curve", 	2, NULL},
{	0, "NURBS Circle", 	3, NULL},
{	0, "Path", 			4, NULL},
{  -1, "", 			0, do_info_add_curvemenu}};

- first value is ICON code,
- then name
- return value
- pointer to optional child

last row has -1 to indicate its the last...
plus a callback to event function.

I also built an old toolbox style callback for this:

static TBitem tb_object_select[]= {
{	0, "Border Select|B", 	'b', NULL},
{	0, "(De)select All|A", 	'a', NULL},
{	0, "Linked...|Shift L", 	'L', NULL},
{	0, "Grouped...|Shift G", 	'G', NULL},
{  -1, "", 			0, tb_do_hotkey}};

here the return values are put back as hotkeys in mainqueue.

A mainloop can do all context switching, and build menus on the fly.
Meaning, it also allows other designs such as radials...
2003-10-25 00:08:12 +00:00
9a625925da Cleaned up new constraint line drawing while grab/rot/scale
- uses callback mechanism to tell main drawing routine what to do
- for that reason it doesn't use frontbuffer drawing anymore
  and it shows up in all 3d windows as well
- it uses the same colors as for the grid axes (I tweaked it a bit,
  this is based at themecolors, and also should work in different
  background and grid color)
- I disabled drawing lines through every object or every vertex.
  The current display method is clear and not distracting
- when in 'local' transform (double press X/Y/Z), it displays a nice
  axis in the center of transform for vertices.
  In object-mode, local transform differs per object, so constraint lines
  and axes are drawn for each individually...

Also:

- fixed an old bug in rotate transform(). Using a constraint for
  rotation (X, Y, Z) didn't work for multiple objects at all!
2003-10-23 16:15:05 +00:00
46f0ef2c57 fixed a warning that slipped by :| 2003-10-22 22:13:23 +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
26698cfa3f Added mirror function to the code and to the Wkey menu (at the end) 2003-10-22 02:05:51 +00:00
c7bf552213 Added PADENTER confirmation to transform. 2003-10-22 01:25:11 +00:00
da095d6092 Numerical input in transformation modes (Grab, Rotate, Scale,
Warp, Shear, Shrink/Fatten). It works with the transformations mode,
it doesn't replace them, so just enter grab, scale or rotate mode
as usual and start typing. Both numpad and non-numpad works for the
numbers.

Tab switches between axis (the axis that is being modified has
parenthesis)
Backspace clears the current axis. Twice clears all axis.
Minus (-) switches between positive and negative value.

The mouse is now disabled when you type (as soon as you use one of
the numerical keys). You can use Nkey to switch between numerical
and mouse driven mode.

The minus key on the numpad still affects the PET in mouse-driven
mode, but affects the sign of the number in numerical input.
2003-10-21 23:39:47 +00:00
193dce6d98 Axis constraint in transform for grab mode
Axis constraint in size mode

note: the original behavior when constraining with middle mouse in object mode is weird. I've leave it that way, but I think it would be a good time to fix it. Another thing: in object mode, you can only constrain size to local axis. Global axis would involve either screwing the matrix (which stinks) or modifying the vert coords directly (which is a no no)

Please also note that this breaks the mirroring combo.
I'll be commiting my edit mode mirror function soon to fix that.

Coder note:

You can now call the transform function with an additional parameter to constraint to an axis.
example:

transform('g'*'X')
transform('s'*'y')
transform('r'*'z')

Capital axis letter for global axis, lower case for local axis
2003-10-21 17:01:10 +00:00
41f4940bff Helpline drawing in transform (semi broken in this commit)
This is only usefull for rotate now, but the axis constraining code has a part that depended on this, so I commit this part first.

For coders:

void constline(float *center, float *dir, int col)
	Draw an infinite line on the screen. col is the color argument. It must be cpack compatible

void project_short_infiniteline(float *vec, float *dir, short *adr1, short *adr2);
	clips infinite line to screen border
2003-10-21 16:25:00 +00:00
8280cab690 For coders:
Axis CONST and variable rename in transform in preparation of further commits
Parsing code to supply axis constraint with the mode (Broken knows what I'm talking about)
2003-10-21 15:57:16 +00:00
4efdabfbbc Constraint stuff from tuhopuu including (but probably not limited too):
Axis options for TrackTo
LockTrack
FollowPath

Auto creation of TrackTo constraint from Ctrl-T (old track still an option)

Auto creation of FollowPath when parenting to path (Normal parent still an option)

Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present.

Function to convert old track to constraint (commented out)

Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier.

--------------------
For coders:

unique_constraint_name and *new_constraint_data  moved to the kernel (constraint.c)

new Projf function in arithb gives the projection of a vector on another vector

add_new_constraint now takes a constraint type (int) parameter

add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object

add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone)

add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
2003-10-21 13:22:07 +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
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
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
842bb449c5 huge commit, sorry!
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...

still a lot of work needed, will all be in next week i hope!

(warn: 2 new c files! butspace.c and buttons_scene.c)
2003-10-04 20:35:50 +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
abede3ca04 A little more cleanup, removed a bunch of unused vars in the code.
Trying to get rid of some of the extra warnings we can ignore ;)

Kent
2003-08-14 15:18:45 +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
a204816f3f - Removed requests to mail reevan@blender.nl 2003-05-11 14:29:16 +00:00
3c77276bd7 added Goofster's mergemenu to the alt-w menu.
revised by Matt Ebb
2003-05-10 12:22:26 +00:00
f28516e7b0 hotkey for changing a mesh to a subsurface and back again: shift+o
hotkey for changing display resolution for subdiv: ctrl+1 or 2 or 3 or 4
written by Green
2003-05-07 19:27:29 +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
Chris Want
c95692df7c Support for auto-skinning when parenting a mesh to an armature.
Applies to bones that do not have a boneclass of unskinnable
(set per bone in editmode in the button window).
2003-04-24 00:48:43 +00:00
8ff3cfe8b0 fixed mousewheel behaviour in editmode 2003-02-17 12:30:11 +00:00
1896f151cb added mousewheel for zooming circleselect 2003-02-08 12:59:25 +00:00
e785342319 added mousewheel support part 2 2003-01-28 11:14:38 +00:00
cd4a60f536 sgefants patch to remove the License Key stuff.
(I noticed its not completely gone yet from the blender/source dir)
But its a big step in the right direction if it doesn't enable
all of the functionatlity already...

(Using cscope for LICENSE_KEY_VALID still turns up some stuff)

Kent
--
mein@cs.umn.edu
2002-12-06 19:48:37 +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