Commit Graph

47594 Commits

Author SHA1 Message Date
084cb3aadc added IPO header pull-down menus. 2003-10-25 13:29:38 +00:00
0c00846c65 - commented out the #ifdef APPLE for closing renderwindow.
this only works with compiling GHOST again!
2003-10-25 13:27:12 +00:00
4f9c369057 - removed tooltips from pull-down menus 2003-10-25 13:08:15 +00:00
558711325f - removes warnings 2003-10-25 12:27:16 +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
f4ce3d1b86 - added menus to header of text editor
- added Alt-N shortcut (New text)
- look at blender.webpark.cz/texteditor.html
2003-10-25 10:33:03 +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
3de3929ba6 I did one commit, but two logs!
- another click at pulldown menu doesnt close it anymore (annoying!)
- the order of Menus (from buttons) now is correctly flipped if needed
- had a LOAD of work on getting matrix code in interface.c cleaned up...
  there was still a bug with automatic flipping of menus to prevent them
  going outside the screen. should be solved now
- fixed crash: add new screen didnt work...
2003-10-25 00:11:32 +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
5f26e16c51 Exppython: fixed crash caused by linking to a scene objects with NULL obdata, caused by recent (2.28c) internal changes to avoid unneded creation of obdata. 2003-10-24 17:08:59 +00:00
6c9f9d0716 Annotation of the BGL module - small clarifications about Buffer class 2003-10-23 23:44:18 +00:00
c8b85db96c Annotation of the BGL module 2003-10-23 23:17:48 +00:00
904c039e3c - added ifdef INTERNATIONAL for changes in interface.c
- changed switching to smaller/larger fonts, it now does only 1 pnt size.
  with standard font (11), medium is 10, small 9
2003-10-23 22:28:49 +00:00
734637215b there was a function prototype missing from interface.c that caused an error with MSVC. 2003-10-23 22:20:19 +00:00
9efe4b7f9a - AntiAlias fonts (FTF) now are used in three sizes, like the normal
fonts, and switched based at the window zoom.

  Might be something to tweak when to switch exactly, but it works
  cool!
2003-10-23 18:25:08 +00:00
0c177df766 - added Panel for 'anim playback settings'
- removed draw rect from avi coded settings (should become label but)
- changing texture settings, now also updates lamp/material/world
  preview when thats open
2003-10-23 16:52:54 +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
5b018e669b - fixed drawing of headers... they align now exactly with the 1 pixel
black edge between 'area windows'.
  the new ortho matrix seems to work for me... :)
2003-10-23 11:00:51 +00:00
f2637d90b9 - changed ortho2 calls by default... according the 'opengl correctness'
chapter in 'opengl programming guide' you have to offset the matrix
  with 0.375 for exact & predictable cross platform pixel drawing.
  Blender used 0.5....

Committed for test among platforms... if you see weird drawing results
(like polygons not aligning good with lines) just notify me.
2003-10-23 10:23:38 +00:00
063205cc51 - <blush> forgot to delete an old line:
if(R.mat->septex) break;
  this caused the new per-channel switching only to work with 2 textures!
2003-10-23 09:38:10 +00:00
bead58ca68 Adjusted Layout in texture, texture_plugin, and texture_mapto panels. 2003-10-23 06:34:50 +00:00
b4e9d39580 BugFix: do_global_buttons() was split into do_global_buttons() and do_global_buttons2(),
but do_butspace() still routed events for do_global_buttons2() to
	do_global_buttons().  This kept a lot of "Single User" buttond from working.
2003-10-23 02:42:09 +00:00
164fa06c11 - themed all window types... phew!
BTW: text colors don't work everywhere yet... but this state should
  be save to store themes in your .B.blend (CTRL+X)

and some fixes:

- leftmouse click now works in NLA and Action window to select a
  strip in the left part
- faceselect+vpaint mode didnt show both panels
2003-10-22 23:20:44 +00:00
d213b7d0db Small constraint loop detection and calculation fix that now allows two objects to track each other (normal track or LockTrack).
This is done by disabling the object position refresh call when calculating these constraints. From the tests I did, this doesn't cause any problem at all.

The main point of this is to create pistons and the like.

For coders:

the detect_constraint_loop function now takes an additional parameter that determines the constraint type of the object it's looping from.
2003-10-22 23:17:48 +00:00
46f0ef2c57 fixed a warning that slipped by :| 2003-10-22 22:13:23 +00:00
6963bd3947 - material editor: each texture channel can be individually switched,
instead of the old 'septex' which only showed the active one

- rendering: the 'stencil' option now works to stencil out normals as well

(special requests from our manual master, s68)
2003-10-22 18:58:46 +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
389b06c91e More fixes in object drawing:
- transparent faces in editmode don't write in zbuffer anymore (prevents
  drawing errors) but still read (so behind the subsurf faces for example)
- improved drawing 'handles' for subsurf editing
- going in editmode to Solid view, will draw extra wire always, including
  transparent faces when set
- works in all combos... http://www.blender.org/docs/ton/subsurf.html

- fixed error; padplus/padminus didnt work in buttonswindow anymore
- improved buttonswin: when dragging window edge, the buttons dont
  rescale, but stay same size
2003-10-22 09:06:30 +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
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
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
e0e45e81da - fixed error; the vertices didnt draw anymore in editmode with sold draw.
was caused because i only tested the new cool 'draw wire extra'. :)

- by default, in solid draw mode & editmode, it does a 'draw wire extra'
  now, giving nice clean editmesh drawing.

- there's still a few quirks, i do a test now... this commit is to have
  a good working blender in cvs. the whole drawing system is such chaos...
2003-10-21 21:59:00 +00:00
594f3cddca A few bugfixes to the vgrouping methods 2003-10-21 17:25:27 +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
2486c52f89 fixed warnings and errors in buttons_object.c 2003-10-21 16:56:25 +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
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
2da9cb5db2 fixed bugs:
- faceselect mode works again
- selecting vertices for lattices, surfaces and curves works again
- in previewrender sometimes a square was drawn, which was texture-crop
2003-10-21 12:23:38 +00:00
0d1f7f1c72 - forgot to set 'minimal theme' callback for sliders, causing a crash when
displaying Constraint Panel in F7 menu.
2003-10-21 11:46:12 +00:00
8e2225e027 - another formula for 'draw wire extra'. this time it doen't scale, but
only moves z-values in drawing in zbuffer. still matrix art I don't
  fully grasp... but it seems to work!
2003-10-21 08:43:29 +00:00
e3f3491ac3 Made pupmenu() separators consistent with pulldowns
TODO: same for popup menu buttons
2003-10-21 07:28:44 +00:00
c6ef2afb3f Added a function to shade alpha as well as colour 2003-10-21 07:02:38 +00:00
4405113308 - Lots of tweaks to interface colours, shading, etc.
- Fixed alignment/width of menus

Still needs more work.
2003-10-21 07:02:04 +00:00
ff89daceb0 - fixed drawmode 'wire extra'.
it was using some unsupported linewidth trick... I've been trying to
  get the official glPolygonOffset to working, but my silly Mac doesnt
  support it, it seems.
  So! I thought of another trick, and that's just moving the window
  matrix a little to the front. :)

- for those interested; the code for glPolygonOffset is still there,
  commented out. (drawobject.c)

- btw: the drawobject.c routines are a TOTAL mess!
2003-10-20 23:20:37 +00:00
7893cc25d1 - added new drawing type for subsurf editing. Is called 'Optimal' and
can be found under the 'SubSurf' button.
  Optimal drawing only shows the subdivided original edges. Quite nice!
  And; it's a load faster!

- to evaluate: do we want this in editmode too?
2003-10-20 21:58:15 +00:00