Commit Graph

49420 Commits

Author SHA1 Message Date
Ton Roosendaal
b7ac42a4c6 Test for people which copybuffer method is best.
G.rt==2: uses a glReadPixel and glDrawPixel together

Otherwise it uses glCopyPixel (supposed to be faster :)
2004-10-03 16:54:05 +00:00
Ton Roosendaal
3a840670a5 Lots of small changes, all for UI in Blender;
----- Killed UI frontbuffer draw
The interface toolkit was drawing all live updates (while using menus/buttons)
in the frontbuffer. This isn't well supported cross-platform, so time to be
killed once. Now it uses *only* glReadPixels and glCopyPixels for frontbuffer
access.

Live updates or menus now are drawn in backbuffer always, and copied to
front when needed.

NOTE: it was tested, but needs thorough review! On PC systems I suspects
backbuffer selection to screw up (check!). On SGI/SUN workstations it
should work smooth; but I need evidence

----- Smaller fixes;

- AA fonts were garbled on ATI systems. Now the AA fonts are drawn exact
  on pixel positions. Needs the new FTGL libb too, patch is on maillist
- Rounded theme uses antialiased outlines
- Pulldown and popup menus have nice softshadow now
- New button type 'PULLDOWN', thats the one that callsup a pulldown menu.
  Should be added to themes, as is the full menu/pulldown drawing
- Screendump for 1 window does the full window now, including header
- Empty pulldowns (for example running blender without scripts) give no
  drawing error anymore

For review & fun;
- added curved lines as connectors, for Oops window
2004-10-03 13:49:54 +00:00
Ton Roosendaal
5798123bc7 Accidentally previous commit went out, while i tried to abort it. :)
This is a fix for propert circular clipping for circleselect, when it
uses backbuffer selecting
2004-10-01 14:49:38 +00:00
Ton Roosendaal
5ef1c75dbe *** empty log message *** 2004-10-01 14:48:12 +00:00
Ton Roosendaal
f2b785296e Added 2 files for softbody plus sconscript! 2004-10-01 14:10:30 +00:00
Ton Roosendaal
04f5baee3a OK. Here's the long awaited first step (V0.01!) of SoftBody. It is called
from within mesh_modifiers (kernel deform.c). It copies vertices to a
temporal particle system (struct SoftBody with BodyPoint structs) to do
physics tricks with it.

For each frame change the delta movements (based on standard ipo anim or
even other deforms (later) are applied to the physics system. How to apply
and calculate satisfying results is not my thing... so here I'll commu-
nicate with others for.

Since it's in the modifier stack, the SoftBody code can run entirely on
original data (no displists!).

Right now I've implemented 2 things;

- "Goal" which is a per vertex value for how much the current position
  should take into account (goal=1 is without physics). This is a powerful
  method for artists to get control over what moves and not. Right now i
  read the vertex color for it.
- And some spring stuff, which now only works based on force moving it to
  the originial location. This doesnt work with 'goal'... erhm.

- You can re-use physics vars from engine, used right now is (in Object)
  - damping
  - springf (spring factor)
  - softflag (to set types, or activate softbody for it

- The SoftBody pointer in struct Object is only runtime, nothing saved in
  file

To prevent all users going to complain it doesn't work, I've hidden the
functionality. :)
The buttons to set softbody 'on' only show now (psst psst) when the object has
name "soft" as first 4 characters. You can find the buttons in the F7 Particle
Interaction Panel (which should be renamed 'physics properties' later or so.

Demo file:
http://www.blender.org/bf/softbody.blend
2004-10-01 14:04:17 +00:00
Ton Roosendaal
d818141744 Header redraw added for 'select mode menu'. Also checked more files for it.
Reminder, the allqueue() function needs as last arg a '1' if you want header
to be refreshed too!
2004-10-01 10:10:09 +00:00
Ton Roosendaal
2f91c66d85 - fixed error in lasso select (evaluated lasso coords one too many!)
- made ctrl+tab menu for selectmode only pop up in editmode mesh
- changed lasso code in zbuffer-select mode, that it also accepts lines
  as lasso
2004-10-01 09:54:47 +00:00
Ton Roosendaal
19c2d34967 - Improved memory system for pupmenu(), which now stores 255 entries max.
Meaning menus come back to previous selection almost always. Also fixed
  annoying bug that caused Mirror menu (M in editmode) to start at 2nd item

- New hotkey (test :) CTRL+TAB in editmode gives (and shows!) current
  selectmode. I prefer this over cycling, since the menu is informing you
  what happens.

- To enforce pupmenus to start at specific item, use pupmenu_set_active()

- pupmenu_col() to be done
2004-10-01 07:51:12 +00:00
Stephen Swaney
820a83dda8 Tweak the bpy 'import site failed' msg.
A half-hearted attempt to make the World's Scariest Warning Msg
just a tad less scary.
2004-10-01 05:28:14 +00:00
Ton Roosendaal
30ef2326b9 - Made the 'zbuf clip select' in editmode default when reading on old file
- Added transparent wires in solid draw for editmmode, to denote selecting
  clicks "through". Switching this and the zbuf-clip mode is actually nice!

- little annoyance; removed object centerpoint drawing in editmode.
2004-09-30 22:29:19 +00:00
Ton Roosendaal
8ae56af0cf Recoded how 'handles' were implemented; these were extra wireframe edges
actually, adding vertices and edges to displist.

Now the subsurfer gives editvertices a pointer to the subsurfed vertex
location; allowing not only vertices in 'optimal' draw to show correct, but
also gives proper handling of borderselect and lasso for edges. :)
2004-09-30 20:38:35 +00:00
Jiri Hnidek
742e00db3f - Added undo menu for MetaBalls in edit mode 2004-09-30 18:04:25 +00:00
Ton Roosendaal
fb6aee54e6 Solved crash with;
- linked duplicate mesh
- subsurf on
- subdiv levels at 0
- new selectmode face + select clipping

Also found error in backbface draw when faces were hidden
2004-09-30 16:35:40 +00:00
Ton Roosendaal
9e0456d36e Special request; Lasso Select (thanks andy for nagging! :)
Is committed now for further test;

What works:
- Hold CTRL while leftmouse-draw (gesture) for lasso-select
- Hold also SHIFT for lasso-deselect
- In Object mode it only selects on object centers now
- In Mesh edit mode it works on same level as borderselect

Not:
- other editmodes or objects in general

Also fixed crash with circle-selecting outside of window edge.
Also put back wire-extra draw for curves (previous trial broke mball wire)
Turned borderselect, circle, lasso into dashed lines for visual language.
2004-09-30 14:27:20 +00:00
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