Commit Graph

301 Commits

Author SHA1 Message Date
Nathan Letwory
10fbfdad10 whitespace commit 2006-11-03 06:42:08 +00:00
Nathan Letwory
c33550bd55 fix bug #5133
* when an object had wire draw in Draw Extra enabled and
  it was selected and set as a scene, it would draw
  as selected. Changed so it draws the wires in a grey
  shade, to communicate it is not in the active scene
2006-11-03 06:39:58 +00:00
05ee7d9053 =translate hoek to angle=
renamed the dutch variable hoek to angle globally arithb.c changes done by Matt Plough
2006-10-14 23:27:18 +00:00
e868f223dc New shadow feature: Irregular Shadow Buffers
Full log:
http://www.blender3d.org/cms/Irregular_Shadow_Buffe.785.0.html

In short: this is a shadow buffer approach that always results in crispy
shadows, independent of lamp buffer size or zoom level. This shadow buffer
system also supports transparent shadow.

This is part of work on refreshing Shadow Buffers in Blender. You now can
choose of two types (Classical, Irregular). More types will follow. Also
quality issues for Classical shadow buffers are going to be reviewed,
especially to solve the lousy Biasing.

For the CVS log record; it is based on articles:
Gregory Johnson et al, University of Texas, Austin. (Regular grid method).
Timo Aila and Samuli Laine, Helsinki University of Technology. (BSP method).
2006-10-14 10:21:19 +00:00
1be92c8b19 * Added a new empty draw type - single arrow. This can be useful in situations
where you just need a direction, like a wind or vortex force field for example.
2006-10-12 07:54:32 +00:00
ed2560488b As discussed during meeting, Changed curve length/tilt markers to indicate direction.
That is, a 3D curve now displays as ->->->-> instead of -|-|-|-|.

Comparing the two, I didn't find the arrow display any more confusing then the straight lines when dealing with loops and tilt variations. Sharp turns are more likely to display crossed lines though.

Others should feel free to disagree and make it better.
2006-10-01 18:28:46 +00:00
0cd7ee76a4 made fgon edges not draw lengths with length draw option 2006-09-27 18:08:54 +00:00
26520225ee Special request: Drawmode "bounding box" now supports drawing 'extra' too,
like axis or object name.
2006-09-14 12:40:53 +00:00
4603f452c2 Animation department feature request: support for vertex groups in Lattices
In a quick glance: (temp image)
http://www.blender.org/bf/rt.png

Main reason is that Lattices are useful a lot for Armature deformation.
Lattices just provide much more precise and interesting control. However,
with only bone envelopes it's very hard to use.

Working with Lattice vertex groups is nearly identical to Mesh:
- on CTRL+P 'make parent' you can choose the deform option now
- In editmode, the buttons to control vertex groups are available
- In outliner you can select vertexgroups too
- Deforming Lattices with Armatures has all options as for Mesh now.

Note:
- No WeightPaint has been added yet. To compensate, the editmode
  drawing for a Lattice with vertex group shows weight values for the active
  vertex group.
- Lattice editmode doesn't undo/redo weight editing yet.
- Softbody for Lattice still uses own vertex weights

Implementation notes:
- derivedmesh weight_to_rgb() is now exported to drawobject.c
- been doing cleanups in code (order of includes, var declarations, etc)
- weightpaint button handling now is generic

I've checked on Brecht's proposal for Custom Element data;
http://mediawiki.blender.org/index.php/BlenderDev/CustomElementData
It could have been used, but that would mean the existing code for
vertexgroup handling and armature deform couldn't be re-used. I guess this
is really a later todo.
2006-09-03 12:16:14 +00:00
ab5cc740d6 added the option to draw sharp edges.
had to make some room in the "Mesh Tools 1" panel,
removed "Center" - its alredy in the "Mesh Tools" panel, and grouped the "Normal" draw buttons.
At the moment mixing modes dosnt work, we will need to review this to see if its worth attempting.
2006-08-31 06:03:24 +00:00
433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
0dcfab3e32 - bug fix, bug reported by Campbel, thanks! Keep in mind, that integration
of verse supports only sharing of mesh geometry now, you can't share
   vertex color, vertex weight, etc.
2006-08-21 13:19:18 +00:00
2ee42ac01e Huge commit: VERSE
- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
2006-08-20 15:22:56 +00:00
cf1964cf9c unmixing code and var declarations. 2006-08-13 12:49:31 +00:00
e3d78dd4e1 * Fix: Disabled radius tapering on 2d curves with filled front or back. It would be
really cool to get this working solidly, but there are many potential problems with the
triangle face creation across the flat surfaces, especially when there are holes inside
the curves. Maybe this could be a fun project for someone better at this than I? :)
Taper object curves still cause similar problems...

* Made the curve radius affect the 'Nsize' curve normal drawing too, so you don't need a
bevel to see the value.
2006-08-13 08:31:59 +00:00
342671308c Bugfix 4783
- draw-extra for Lamps did not follow selection color
- Surface objects were drawing curves always in unselected color, also its
  draw-extra options didn't follow selection color then
2006-08-11 09:09:50 +00:00
c2edcd4879 Siggraph show commit!
- pending commit for OSX intel systems, with intel graphics. These now call
  an extra swapbuffers after glFlush(). Code is ifdeffed, and doesnt affect
  other systems.

- show-off commit: option to have transparent nodes over the composite
  result. Only draws Image for active Viewer Node now, and image doesnt
  translate nor zoom (which isnt bad though).
  Set in themes the alpha color of "node backdrop" to make nodes
  transparent.
2006-07-31 19:23:42 +00:00
1673b56dd3 Bugfix #4565
Curves without bevel/extrude don't react to buttons to fill front/back.
That is coded that way, so added this info to the tooltip

Bug report #4566

Creases drawing became very awkward in commit in august last year. Flipped
the drawing order so the fat lines - denoting creases - are drawn first.
That way the value of crease is visible, as well as edge selection state.
2006-07-02 11:21:06 +00:00
4d45723dd1 Bugfix #4497
When using Node Shaders, the OpenGL color (solid drawmode) in 3d window
was still using the base Material only. That's a bit counter-intuitive
yes... i've replaced this with a function that checks for the active
material node color. Not perfect, but at least interactive.
2006-06-27 12:19:32 +00:00
098c73f441 Bugfix #4471
Using Weight/Vertex Paint, the current color was not reset, causing Object
name or axes to draw in random colors.
2006-06-26 08:16:16 +00:00
8988a0de38 Bugfix #4329
New "Dimension" button: when using TAB to cycle over buttons, the dimension
event was sent multiple times, accumulating scaling. The code was also not
prepared to handle multiple changes at one event.

Also: added object_get_boundbox(Object *ob) in BKE_object.h, so the code
now really supports most primitives in Blender.
2006-06-14 08:50:41 +00:00
29bcb903e9 Bug fixes of own collection:
- Selection wasn't possible on center dots in Object mode. I keep adding
it and it keeps disappearing again. Added clear comments in code too.

- Particles: (debug still) print "build particles" happened on each redraw
  when "Display percentage" for particles was set to zero.
2006-06-11 09:43:05 +00:00
908389b787 Bugfix #4293
And more particle issues... the attempts to allow particle systems to be
part of duplicators (groups especially) isn't easy to get working!
This commit solves regular animated particle systems... they rendered on
the wrong location, using wrong object transform.
2006-06-09 11:15:52 +00:00
69546bcf08 Bugfix #4259
Static particles, drawmode Shaded or Texture, colors for strands were wrong
2006-06-02 12:34:09 +00:00
7706d2e40f * Made the editmode text cursor draw inverted, so you can actually see where it is on a black background 2006-05-22 05:52:48 +00:00
1e0037045d Bugfix #3961
When using CTRL+L for materials, you can end up with non-existing material
indices in faces. The drawing code then was still happily drawing the old
situation (or something random, its a static array).

This commit checks the maximum amount of materials on an object, and draws
the last available material for a non-existing index. It uses an ugly
global yes, but this code is bad anyway. :)
2006-04-08 15:58:49 +00:00
16082eb732 Bugfix #4010
Dynamic particles sometimes didn't properly use global coordinates.
Meaning they were transformed by an Object, for example when it has
animation constraints.

Error caused by attempt to get duplicators to work for particles. Will
need re-evaluation this.. for now restored old functionality, with
exception of dupli-groups.
2006-04-08 14:50:04 +00:00
04fc04bcdd Make editmesh edge length and face area drawing's precission proportonate to the gridsize.
Needed when working with small models.
2006-03-27 14:57:53 +00:00
6b6511b54c Fix for messy commits in attempt to fix groups wire colors...
- if you add new theme colors, you need to initialize them correctly and
  add that in the usiblender.c version patching for saved themes
- the code for detecting group membership was highly confusing
- group colors were even used for non-groups

Further; I didnt add group theme colors yet, that's not a bug. It's a todo
item I preferred to tackle with having a decent wirecolor system once.
2006-03-11 18:51:41 +00:00
1c5aa14c5d fix for bug 3970
.
2006-03-10 19:49:25 +00:00
e932576bb7 fix bug 3970
.
2006-03-10 19:47:36 +00:00
0a6c3993bf fix for bug 3970
.
2006-03-10 18:52:49 +00:00
9a36e9b651 Sorry for the big commit, but I've been fixing many of these
issues in parallel... So this commit contains: an update of
the solver (e.g. moving objects), integration of blender IPOs,
improved rendering (motion blur, smoothed normals) and a first particle
test. In more detail:

Solver update:
- Moving objects using a relatively simple model, and not yet fully optimized - ok
  for box falling into water, water in a moving glass might cause trouble. Simulation
  times are influenced by overall no. of triangles of the mesh, scaling meshes up a lot
  might also cause slowdowns.
- Additional obstacle settings: noslip (as before), free slip (move along wall freely)
  and part slip (mix of both).
- Obstacle settings also added for domain boundaries now, the six walls of the domain are
  obstacles after all as well
- Got rid of templates, should make compiling for e.g. macs more convenient,
  for linux there's not much difference. Finally got rid of parser (and some other code
  parts), the simulation now uses the internal API to transfer data.
- Some unnecessary file were removed, the GUI now needs 3 settings buttons...
  This should still be changed (maybe by adding a new panel for domain objects).

IPOs:
- Animated params: viscosity, time and gravity for domains. In contrast
  to normal time IPO for Blender objects, the fluidsim one scales the time
  step size - so a constant 1 has no effect, values towards 0 slow it down,
  larger ones speed the simulation up (-> longer time steps, more compuations).
  The viscosity IPO is also only a factor for the selected viscosity (again, 1=no effect).
- For objects that are enabled for fluidsim, a new IPO type shows up. Inflow
  objects can use the velocity channels to animate the inflow. Obstacles, in/outflow
  objects can be switched on (Active IPO>0) and off (<0) during the simulation.
- Movement, rotation and scaling of those 3 types is exported from the normal
  Blender channels (Loc,dLoc,etc.).

Particles:
- This is still experimental, so it might be deactivated for a
  release... It should at some point be used to model smaller splashes,
  depending on the the realworld size and the particle generation
  settings particles are generated during simulation (stored in _particles_X.gz
  files).
- These are loaded by enabling the particle field for an arbitrary object,
  which should be given a halo material. For each frame, similar to the mesh
  loading, the particle system them loads the simulated particle positions.
- For rendering, I "abused" the part->rt field - I couldnt find any use
  for it in the code and it seems to work fine. The fluidsim particles
  store their size there.

Rendering:
- The fluidims particles use scaled sizes and alpha values to give a more varied
  appearance. In convertblender.c fluidsim particle systems use the p->rt field
  to scale up the size and down the alpha of "smaller particles". Setting the
  influence fields in the fluidims settings to 0 gives equally sized particles
  with same alpha everywhere. Higher values cause larger differences.
- Smoothed normals: for unmodified fluid meshes (e.g. no subdivision) the normals
  computed by the solver are used. This is basically done by switching off the
  normal recalculation in convertblender.c (the function calc_fluidsimnormals
  handles other mesh inits instead of calc_vertexnormals).
  This could also be used to e.g. modify mesh normals in a modifier...
- Another change is that fluidsim meshes load the velocities computed
  during the simulation for image based motion blur. This is inited in
  load_fluidsimspeedvectors for the vector pass (they're loaded during the
  normal load in DerivedMesh readBobjgz). Generation and loading can be switched
  off in the settings. Vector pass currently loads the fluidism meshes 3 times,
  so this should still be optimized.

Examples:
- smoothed normals versus normals from subdividing once:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_1smoothnorms.png
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_2subdivnorms.png
- fluidsim particles, size/alpha influence 0:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_3particlesnorm.png
  size influence 1:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_4particlessize.png
  size & alpha influence 1:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_5particlesalpha.png
- the standard drop with motion blur and particles:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t2new.mpg
  (here's how it looks without
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t1old.mpg)
- another inflow animation (moving, switched on/off) with a moving obstacle
  (and strong mblur :)
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t3ipos.mpg

Things still to fix:
- rotating & scaling domains causes wrong speed vectors
- get rid of SDL code for threading, use pthreads as well?
- update wiki documentation
- cool effects for rendering would be photon maps for caustics,
  and motion blur for particles :)
2006-02-27 11:45:42 +00:00
ecaee2e3c8 Fix for very old annoyance; when an object is deformed far away from its
object center, it doesn't generate displaylist (or derivedmesh). This
error showed especially on loading files, and you had to advance frame,
zoom out or press Numpad-9 to see stuff.
2006-02-21 22:42:33 +00:00
3753d817ab Seam Cutting in Faceselect Mode:
- Mark Border Seam: mark edges on the border of face selection as seam.
- Clear Seam: clears seams in selected faces.
Hotkey: Ctrl+E

- Alt+RMB Click: mark/clear edge as seam
- Alt+Shift+RMB Click: mark/clear seams along the shortest/straightest path
  from last marked seam. The cost of the path also includes some measure of
  'straightness' next to the typical distance to make things work more
  predicatble and edgeloop friendly. Note that this cuts a path from edge to
  edge, not vertex to vertex. That gives some nice control over the direction
  of the seam.

Also includes:

- Removed old LSCM code.
- Fix updates glitches with DerivedMesh/Subsurf drawing in FaceSelect mode.
  Now there's a drawMappedFacesTex instead of drawFacesTex.
- Minimize Stretch menu entry called Limit Stitch.
- Removed the lasttface global, was being set before it was used anyway, so
  might as wel return from a function.
- Moved some backbuf sampling code to drawview.c from editmesh, so it can be
  used by Faceselect and VPaint.
- Use BLI_heap in parametrizer.c.
2006-02-08 21:01:00 +00:00
03ae9e70b8 * If an empty is a forcefield, scale the 3D forcefield shape with the empty drawsize 2006-02-07 13:05:17 +00:00
240e25ab65 Cleanup of blender/ module; Makefiles now compile this warning free.
Mostly was unused variables, unused functions, missing prototypes and
missing include files.
2006-01-28 20:17:48 +00:00
2af2c2c700 Orange: Display types and variable size for Empties.
This is using instructions from Ton, so hopefully the implementation is ok.
This is really needed here where we are using all sorts of wacky scales, and
empties look too big or too small. Of course we don't want to scale the
empties because there are often things parented to them.

New options are in edit buttons for empties to control the display style
and the size. New styles are easy to add, too. Just needs useful ideas and
minor effort from anyone who wants to.

Support for copying these values has also been added to the Copy Attributes
->Drawtype menu command.
2006-01-13 15:50:32 +00:00
dac868985e Orange: Added an option in View Properties panel to disable drawing of 'relationship lines' - i.e. the dashed lines that connect objects in parent/constraint/hook/IK relationships. After talking to the others I rolled the Armature-specific one into the same setting for simplicity's sake. We can see how it goes, always possible to put it back. 2006-01-11 14:44:23 +00:00
f47899fc0f Orange; merger with bf-blender.
(Merging is *not* fun work, especially not with bugfixes in main branch
for code that got cleaned up in the other! Poor Hos... :)
2006-01-03 21:43:31 +00:00
8b458c0b68 Based on bugreport, fixed the confusing tooltip for Subdivide options
"Short" or "Beauty".
2005-12-20 14:04:41 +00:00
72d805f17d Orange: monday merger with bf-blender (loadsa bugfixes).
ALso: a bit tidying up in editaction.c and python Object.c
2005-12-19 18:56:08 +00:00
bcd8e4aad8 #3635
Vpaint/weight/texture/UV modes were disabling zbuffer draw after drawing
the active object, causing objects to be drawn after (only selected ones)
to have no zbuffer on.
2005-12-19 15:55:26 +00:00
d3113b5184 Orange: made duplicators work for dynamic particle systems. Meaning; a
particle generator can be duplicated.

Note that the particles are only generated once, on the original, and just
get duplicated.
For static particles it worked already OK.

Added note for previous grouping commit; group-duplicators should support
fully all animation systems, including modifiers and particles.
2005-12-11 14:28:22 +00:00
d7bee8c117 Big commit with work on Groups & Libraries:
-> Any Group Duplicate now can get local timing and local NLA override. This
   enables to control the entire animation system of the Group.

Two methods for this have been implemented.
1) The quick way: just give the duplicator a "Startframe" offset.
2) Advanced: in the NLA Editor you can add ActionStrips to the duplicator
   to override NLA/action of any Grouped Object.

For "Group NLA" to work, an ActionStrip needs to know which Object in a
group it controls. On adding a strip, the code checks if an Action was
already used by an Object in the Group, and assigns it automatic to that
Object.
You can also set this in the Nkey "Properties" panel for the strip.

Change in NLA: the SHIFT+A "Add strip" command now always adds strips to
the active Object. (It used to check where mouse was). This allows to add
NLA strips to Objects that didn't have actions/nla yet.

Important note: In Blender, duplicates are fully procedural and generated
on the fly for each redraw. This means that redraw speed equals to stepping
through frames, when using animated Duplicated Groups.

-> Recoded entire duplicator system

The old method was antique and clumsy, using globals and full temporal
copies of Object. The new system is nicer in control, faster, and since it
doesn't use temporal object copies anymore, it works better with Derived
Mesh and DisplayList and rendering.

By centralizing the code for duplicating, more options can be easier added.
Features to note:

- Duplicates now draw selected/unselected based on its Duplicator setting.
- Same goes for the drawtype (wire, solid, selection outline, etc)
- Duplicated Groups can be normally selected too

Bonus goodie: SHIFT+A (Toolbox) now has entry "Add group" too, with a
listing of all groups, allowing to add Group instances immediate.

-> Library System

- SHIFT+F4 data browse now shows the entire path for linked data
- Outliner draws Library Icons to denote linked data
- Outliner operation added: "Make Local" for library data.
- Outliner now also draws Groups in regular view, allowing to unlink too.

-> Fixes

- depsgraph missed signal update for bone-parented Objects
- on reading file, the entire database was tagged to "recalc" fully,
  causing unnecessary slowdown on reading.

Might have missed stuff... :)
2005-12-11 13:23:30 +00:00
ae8c2963e5 Orange: fix for duplicator-group using X-Ray or Transparent draw options.
Note that X-ray is skipped, since it can only work for clearing the zbuffer,
but Transparent works now.
2005-12-08 20:07:41 +00:00
fba94ef97a Orange: Custom drawing types for bones in Poses!
In Armature Pose-bone panel, the 'hide' button got replaced with a button
where you can type (TAB complete works) a name for a Mesh Object. It then
draws that Object instead of the indicated bone drawing type.

Fixes for bone layers:
- Akey in Editmode didnt work proper (now deselects all non visible bones
  too. selection for editmode works on the vertices, not bones...
- Snap in Editmode now respects layers
2005-12-07 15:07:31 +00:00
1123be1bcc Orange request; Bones in Armature now have own layer settings.
Works like for Object layers, but local within Armature itself. Each Bone
can be in (16 now) any layer, and the Armature layer defines what is
visible or not. Also note that hiding will still work too.

Since the Blender code is *stuffed* with Bone options now, this commit
requires a good test if all tools we got now comply to layers...
(I counted 130 cases for checking for selected Bones in code!)

In PoseMode; hotkey M will show 'movetolayer' menu. Not in editmode...
then its the mirror menu.

Todo: make action/nla drawing comply to Armature layer settings.
2005-12-07 12:36:26 +00:00
d024452ebf Orange branch: Revived hidden treasure, the Groups!
Previous experiment (in 2000) didn't satisfy, it had even some primitive
NLA option in groups... so, cleaned up the old code (removed most) and
integrated it back in a more useful way.

Usage:
- CTRL+G gives menu to add group, add to existing group, or remove from
  groups.
- In Object buttons, a new (should become first) Panel was added, showing
  not only Object "ID button" and Parent, but also the Groups the Object
  Belongs to. These buttons also allow rename, assigning or removing.
- To indicate Objects are grouped, they're drawn in a (not theme yet, so
  temporal?) green wire color.
- Use ALT+SHIFT mouse-select to (de)select an entire group

But, the real power of groups is in the following features:

-> Particle Force field and Guide control
In the "Particle Motion" Panel, you can indicate a Group name, this then
limits force fields or guides to members of that Group. (Note that layers
still work on top of that... not sure about that).

-> Light Groups
In the Material "Shaders" Panel, you can indicate a Group name to limit
lighting for the Material to lamps in this group. The Lights in a Group do
need to be 'visible' for the Scene to be rendered (as usual).

-> Group Duplicator
In the Object "Anim" Panel, you can set any Object (use Empty!) to
duplicate an entire Group. It will make copies of all Objects in that Group.
Also works for animated Objects, but it will copy the current positions or
deforms. Control over 'local timing' (so we can do Massive anims!) will be
added later.
(Note; this commit won't render Group duplicators yet, a fix in bf-blender
will enable that, next commit will sync)

-> Library Appending
In the SHIFT-F1 or SHIFT+F4 browsers, you can also find the Groups listed.
By appending or linking the Group itself, and use the Group Duplicator, you
now can animate and position linked Objects. The nice thing is that the
local saved file itself will only store the Group name that was linked, so
on a next file read, the Group Objects will be re-read as stored (changed)
in the Library file.
(Note; current implementation also "gives a base" to linked Group Objects,
to show them as Objects in the current Scene. Need that now for testing
purposes, but probably will be removed later).

-> Outliner
Outliner now shows Groups as optio too, nice to organize your data a bit too!

In General, Groups have a very good potential... for example, it could
become default for MetaBall Objects too (jiri, I can help you later on how
this works). All current 'layer relationships' in Blender should be dropped
in time, I guess...
2005-12-06 10:55:30 +00:00
413a86e5d9 As reported on bf-committers maillist: new object centers were drawing in
sets. To fix it, I got rid of a very ancient hack to enable set grey wire
drawing (setting a global to pretend it's picking select draw).
Now this setting is nicely passed on via functions as argument.
2005-11-28 16:59:12 +00:00