Commit Graph

136 Commits

Author SHA1 Message Date
610cec55c7 Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
  Currently only works with alternating scanlines, but gives excellent
  performance. For both normal render as unified implemented.
  Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
  getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
  OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
  with chars or shorts.
- Made normal render and unified render use same code for sky and halo
  render, giving equal (and better) results for halo render. Old render
  now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
  after render. Using PostProcess menu you will note an immediate re-
  display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options

- Render module is still not having a "nice" API, but amount of dependencies
  went down a lot. Next todo: remove abusive "previewrender" code.
  The last main global in Render (struct Render) now can be re-used for fully
  controlling a render, to allow multiple "instances" of render to open.

- Renderwindow now displays a smal bar on top with the stats, and keeps the
  stats after render too. Including "spare" page support.
  Not only easier visible that way, but also to remove the awkward code that
  was drawing stats in the Info header (extreme slow on some ATIs too)

- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
  defines.

- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
d109dc7685 Two small fixes;
- on exit editmode, displist for subsurf was not made, causing static
  particles to calculate wrong
- static particles were not selectable
2004-12-03 23:22:21 +00:00
8896a50807 Selection on faces now includes the facedots in solid/visible-only mode. 2004-12-02 16:01:15 +00:00
a7e250e85c Bug fix #1937
In unified render, halos can give black/colored overflows. Found it this
happens with halos that are behind the camera clipping range. Halo clip
just had some weird code for panorama corrections...

In the provided .blend of report found 3 more glitches;

- after render particle system with Material Ipo, values for material were
  not restored correctly
- Meshes with particles didn't draw axis (draw extra) on correct location
- Same as above, axis didn't draw in selected color.
2004-12-02 14:52:40 +00:00
8fc85d9c8f Three little fixes as reported by Campbell;
- Mesh editmode; SHIFT+F fill didnt set default vertex color
- Parented spotlight had wrong (black) dashed line to parent when selected
- Constraint line draw while transform wasn't reset, causing sometimes to
  draw when using the (ugly) G.moving flag...
2004-12-01 22:35:42 +00:00
4ef448cc51 Small tweaks to make 3d drawing a tad more interactive, and; something
for our interactive 3d artists!

- AL+Z (potato) texture view now draws objects without Texture Faces
  compliant with (new) default in engine. Meaning lit faces, using
  Material RGB for diffuse and specular. It used to draw these as 'shaded'
  which is quite useless.
  Per definition, Potato mode is supposed to show what engine draws.
  (Note; this only for Mesh objects)

- Added a couple of more calls to ensure Shaded drawmode updates on
  changing RGB sliders, moving lamps to layers, or switch layers

This based on feedback from Mal, who'll also give it all good tests.
2004-11-25 21:52:07 +00:00
5989da1442 Bugfix 1781
Small draw error in camera objects from camera view (one from 1995 or so!)
Camera size depended on clipsta...
2004-11-11 23:55:16 +00:00
1197c4842a Forgot that me->mface is void pointer (bad!)... fix found by Nathan. thnx! 2004-11-09 12:16:00 +00:00
b00b82ca73 Fix for #1749
In solid drawmode, objects with wires didn't show nor were selectable
2004-11-08 22:25:34 +00:00
0eb05b9d25 Three cosmetic fixes;
- Mesh editmode, draw 'bleeding edges' works again for subsurf (not optimal)
- New draw method (again!) for armature-add-bone loop. Should work now! Is
  also nice for cpu this version
- Draw screen edges (black lines inbetween windows) should not draw leftmost
2004-11-08 18:39:09 +00:00
02e838c99b - Pending Hook work; falloff value for soft hook deformation.
Falloff= distance where influence becomes zero.
2004-11-06 21:59:35 +00:00
b169abb4cf Bug fix #1678
Deformed meshes (by armature for example) didn't get drawn correctly
for vertex paint, weightpaint, UV faceselect. Was OK in 2.34 :)

Additional to that I found out vertex paint doesn't correctly use the
'Area' option, when a mesh was deformed. That was an oldie.

Plus; made tooltips for 'Area' and 'Normals' in Paint Panel clear.
2004-11-05 12:58:12 +00:00
0ad6944283 - MBall displays smooth again in 3d win (coding nice smooth for curves
borkened this... )

- Improved rule for adding face (FKEY); it now checks first for existance
  of 4 connected edges, if that exists a face is created anyway, otherwise
  it does the convex test. Alexander correctly noted that for subsurfs
  non-convex quads should be allowed anyway. Hope this rule satisfies it.
2004-11-04 15:35:24 +00:00
a89a4f531c - Bug #1714; editmode undo error when ESC after extrude (missing undopush)
- Curve Join now moves all curves to 2D (if its 2D)
- FGon extrude keeps FGon flags correctly
- After Append undo-push added
- In almost all Ipo editing commands; undo-push added
- Icons in outliner now all consistant grey
- Zoffs button had to 20 high (hmetal :)
2004-10-31 21:11:03 +00:00
6c04fe887e Just some nice updates in drawing (extruded) Curve objects;
- display of 'smooth' or 'solid' is correct now
- standard bevel and extrude displays in 'smooth' correctly now (with sharp
  edges where you expect it)
2004-10-31 13:51:36 +00:00
d292541cac For solid display of curves in editmode; found fix (thnx intrr :) that
hopefully prevents weird results in grabber... error was that the
editNurb was not used for triangulating.

Also; added drawing the wire as extra in solid display editing curves...
that for unfilled curves as well.
2004-10-30 20:46:10 +00:00
d149a79ad1 Wybren report #1709:
Deleting only-faces from fgon still draws wires hidden in editmode.

Added extra: when mesh has no faces, it draws wire in solid view, also
doesn't draw the 'fat' outline for selection.
2004-10-30 13:42:49 +00:00
408702009e Finally something new!
- in Solid draw mode, curves without faces draw as wireframe now
- in Solid draw mode, curves without faces don't get fat outline on select
- in Solid draw mode, editing curves shows filled now!
2004-10-29 15:39:01 +00:00
f33f2abe39 Two more wavk bugs (help he's pestering me!)
- 1702; edge selection should be evaluated properly before adding face
- 1704; crash in separate, two causes here:
        - separate didnt make selection flags consistant (needed badly
          there because of evil code)
        - after adding quad (Fkey) the face was not selected, but its
          vertices were... that can give bad bad crashes
2004-10-29 14:30:20 +00:00
55478b2616 New 'visible only' select didnt work correct when parts of faces were
hidden. The drawing function needs to return the actual face total, not
the amount that was drawn
2004-10-28 14:13:46 +00:00
0512a1032c Bug #1686
Subsurf, optimal; the outline-selected-draw now uses a normal wireframe
(not optimal) giving a nicer outline.
2004-10-27 09:25:55 +00:00
070d01dd68 Two fixes!
- undo system didn't work in editmode AT ALL!!! (stupid me)
- Lattice deform on non-subsurfed objects did not update
2004-10-22 14:03:20 +00:00
4c827e73e2 Four new extrude possibilities;
- Individual faces
  Keeps Mesh manifold, so removes old faces always. Also uses a
  transform based on different vectors per vertex.

- Only edges
  Just extrudes the edges (not really 'individual', the edges still
  share the vertices. Uses same transform as normal extrude for that
  reason

- Only Vertices
  Uses normal transform after extrude

Also changed code a bit, to detect whether to call a normal-based
transform after extrude, or whether to call normal grabber. For example
when you just extrude 1 edge, it uses normal grabber.

Note; extruding an entire sphere goes OK with 'individual faces'. for
other extrudes you should press 's key' when in transform. Just cannot
predict (yet) when one method has preference over another.
2004-10-18 22:47:26 +00:00
0f95db92c6 Draw Seams in subsurf optimal mode. They were already subdivided correctly,
just needed to be drawn.
2004-10-12 15:23:00 +00:00
42ecc3c56d Face selection in uv face select mode, with hidden faces, was broken:
there was no check for hidden tfaces in backbuffer draw.
2004-10-12 15:15:10 +00:00
acf754e9e2 Fixes in editmesh:
- ALT+B loop edge select loop
- SHIFT+R loop face select loop
(both work with ALT+select too)

- CTRL+R loop cut
- Kkey menu, loop select/cut and knife

- and ALT+select on edge always selects a loop now
2004-10-10 19:41:43 +00:00
7b99fb79c3 Fix for reported Mesh+Subsurf+Optimal+particles, make linked duplicate, and
editmode crashed.

Cause: the stricter rules for when displaylists should be made failed on
the check for Effects (like particles).
2004-10-10 16:54:25 +00:00
d5e0c065bc Version 1.0 of the new Outliner
The outliner is a hierarchical diagram displaying a list of data in Blender
and its dependencies. The 'databrowse' doesn't really show it, and Oops is
too chaotic still. And most of all, the former two don't offer much tools.

After discussions on irc, Matt came with this design proposal;
http://mke3.net/blender/interface/layout/outliner/
Which is closely followed for the implementation.

The current version only shows all 'library data' in Blender (objects,
meshes, ipos, etc) and not the 'direct data' such as vertex groups or NLA.

I decided to make it inside the Oopw window, as an option. You can find the
option in the "View" pulldown, or directly invoke it with ALT+SHIFT+F9
Here's a quick overview of the Outliner GUI:

- Header pulldown has options what it can show (Visible = in current layers)
- click on triangle arrow to open/close
- press AKEY to open/close all
- Leftmouse click on an item activates; and does based on type a couple of
  extra things:
  - activates a scene
  - selects/activates the Object
  - enters editmode (if clicked on Mesh, Curve, etc)
  - shows the appropriate Shading buttons (Lamp, Material, Texture)
  - sets the IpoWindow to the current IPO
  - activates the Ipo-channel in an Action
- Selected and Active objects are drawn in its Theme selection color
- SHIFT+click on Object does extend-select
- Press DOTkey to get the current active data in center of view


TODO;
- rightmouse selection; for indicating operations like delete or duplicate
- showing more data types
- icon (re)design...
- lotsof options as described in Matts paper still...
2004-10-06 18:55:00 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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