Commit Graph

8898 Commits

Author SHA1 Message Date
Ton Roosendaal 1e811c7886 Bugfix: normal mapping for textures wasn't rotated back to view space,
causing weird results on camera moves or object rotations.

Added: support for "normal maps". See for example:
http://members.shaw.ca/jimht03/normal.html

The Image panel in Texture buttons has new option "Normal Map" for it.
When this is used, normals are read straight from RGB values, and blended
with the current normal.
2004-12-05 21:49:13 +00:00
Ton Roosendaal aad31875d7 Special bf-committers request; Lamp/World/Material now each have 10
channels to link texture to.

The amount of code changes seems large, but is mostly getting rind of
hardcoded values (6 and 8) for channels, replacing it with MAX_MTEX.

Further did some fixes;
- Ipo for Lamp showed too many mapping channels
- Texture MapTo buttons for lamp missed the slider to blend texture color
- Lamp texture mapping "View" only worked for Spot, now it uses lamp-
  view vector for all types. (Nice for projections!)
2004-12-04 21:49:02 +00:00
Ton Roosendaal d7c8ff725a Bug #1909
When choosing "render engine" in Scene Buttons, the newly added or removed
Panels didn't invoke a re-alignment event yet.
Also added code that inserts new panels as good as possible on their
previous locations. This works reliable for 1 new panel, not for more, this
because a Panel only stores its old location, not the locations of all
Panels in a given configuration. Consider that minor issue...
2004-12-01 12:39:14 +00:00
Kester Maddock 46fbe6b01e Fix for bugs: 1788 (forces) and 1799 (python delattr on game objects)
Use Polytope collision for faster mesh intersection tests, so SOLID can actually use that qhull lib now.
2004-11-22 10:19:19 +00:00
Ton Roosendaal 9393dd08af Fixed showstopper (thnx intrr!) bug in sequencer + global undo.
This was actually a wrong pointer check in fileread that caused no harm
in past, but with UI-less file save it wreaked havoc!

Decided to add undo in sequencer window after all... it also involved
saving Meta strip settings in files. Very nice :)
2004-11-13 12:55:59 +00:00
Alfredo de Greef 459deaf11f Fixed:
Texture matrix bug in plugin code reported by Mel_Q.
Vertex colors, this was basically the same as the previous uv coord
splitting bug, for xml export, uv coord splitting was actually not quite
complete either (reported by richie).

Added:
Camera Ipo curves for DoF aperture and focal distance.

Aspect ratio set with AspX & AspY are now taken into account as well.
(needs yafray from cvs)

Bokeh parameters for DoF (also needs yafray from cvs).
'Bokeh' controls the shape of out of focus points when rendering
with depth of field enabled.
This is mostly visible on very out of focus highlights in the image.
There are currently seven types to choose from.:
'Disk1' is the default, the same as was used before.
'Disk2' is similar, but allows you to modify the shape further with the 'bias'
parameter, see below.
Triangle/Square/Pentagon/Hexagon, in addition to the bias control, you can
offset the rotation with the 'Rotation' parameter (in degrees).
'Ring', a weird ring shaped lens, no additional controls.
The 'bias' menu controls accentuation of the shape.
Three types available, uniform, center or edge, with uniform the default.

Although based on an actual phenomenon of real camera's, the current
code is bit of a hack and not physically based, and doesn't work all that
well yet (in yafray anyway). Since this is also mostly visible in the very
out of focus parts of the image, it usually also means that you need lots
of samples to get a reasonably smooth result.
2004-11-08 03:55:44 +00:00
Ton Roosendaal 1ba95262f6 More undo goodies;
- Undo for editmode Font object
- Undo for posemode :)
  (btw; it also means posemode remains active on file load)
2004-11-07 20:11:42 +00:00
Ton Roosendaal 02e838c99b - Pending Hook work; falloff value for soft hook deformation.
Falloff= distance where influence becomes zero.
2004-11-06 21:59:35 +00:00
Ton Roosendaal 6d672eee9a Last new feature before release; patch provided by Goran Kocov.
In DisplayButtons, Panel "Output", a new slider "Dither" allows to add
random noise dither to rendered output. It works on sky as well as solid
and transparent. Note however that in OSA render, the Unified Render gives
much better results, since that render nicely delivers full scanlines of
high definition color. The old render mode isn't well suited for this
postprocess.

A dither value of '1.0' will exactly add maximum of 1.0/256.0 to the
pixels.

Potential improvements for next releases;
- regular patterns
- dither per color channel
- not only add, but also subtract dither

Also note that this gives best results for print work or stills. Animating it
gives slight visible noise. Also runlength compression wont really work, and
Jpeg needs to be given higher quality too.
2004-11-01 15:21:50 +00:00
Ton Roosendaal 02b2fc5ec8 Added warning in makesdna to check for total struct sizes.
Found error in wipe struct, which was even constructed terrible weird :)
2004-10-30 12:06:22 +00:00
Alfredo de Greef c245379175 Bugfixes:
Blender hemilight shadow flag now ignored (reported by varuag).
Texture axes were not exported for procedural textures.
Duplicate armatures were not handled correctly (reported by richie).
Triangle uv-coord splitting (reported by anael, richie & Alvaro).

Additions:
Material 'TexFace' mode now works too, as in Blender it functions as an extra
first texture channel, replacing the base color.

The new noise functions for procedural textures are now supported in yafray,
but is  not quite completed yet, still undergoing changes.
(needs yafray from cvs).

The 'power' button has been renamed to 'EmitPwr', since it controls background,
arealight (including lamp with radius) & material emit power.
This button can now be used with the 'SkyDome' method as well to control
background lighting.
To control indirect lighting power, a button called 'GI pwr' has been added,
only use this when really necessary, first try modifying 'EmitPwr' instead.

Removed:
The 'gradient' button. This includes the python code to set
this parameter as well.
2004-10-26 00:52:12 +00:00
Stephen Swaney 4ac4629905 a patch for the Text editor contributed by themeyers.
adds new features for indenting and commenting.

Note: I am not sure if the best menu spot for these features
is under the Select menu, but we can argue about that later.
They do work on a selection, though.

from the mailing list post:

1&2. Added Indent/Unindent under Edit->Select
just select the text you want to indent and go to the menu (
note if nothing is selected Indent will just indent ( tab )
the line the line )

3&4. Added Comment/Uncomment to the same menu
same applies as above

5. Added Tab setting on the menu bar in text editor
Sets the number of spaces a tab ==
changing the setting will change the hole script

6. Added Auto indent
when you hit enter it goes to the next line at the same
tab number and the line above it ( needs more testing and input)
2004-10-14 23:37:04 +00:00
Ton Roosendaal b024faabe5 Outliner features:
- Rename!
CTRL+leftmouse click on name, makes it a text button. Works for all items as
currently being displayed.
Most work was doing the Bones, which is a nightmare :) But it uses same
code as buttons in Armature-Editmode now, without even needing EditMode :)
When renaming a bone, the Outliner makes the Object active though.

- PageUp / PageDown keys
Do what you expect.
2004-10-11 11:54:14 +00:00
Ton Roosendaal 851c5781be - Added Outliner selection
As a means to indicate items in the Outliner to do operations on, you can
select with RMB items. Works like FileSelect here. Since selection in
Outliner is only on outliner level, no further UI updates happen. That is
reserved for LMB actions.

Implemented right now are only few operations... they can be called up with
the WKEY (the famous spare key :)
- if objects selected, a menu appears with choices
- if materials or textures selected, a meny appears to unlink them

If you make mixed or confusing selections you get a warning message.

TODO: add selection color in theme, and of course more operations.
2004-10-10 11:33:19 +00:00
Ton Roosendaal b94b922d23 - Fix: enter/exit posemode used wrong pointer, could crash
- enter/exit posemode now updates outliner view too

- New: outliner option "Show same type". Shows only object types as
  current active one. Nice to browse all lamps, mballs, armatures, etc
2004-10-06 21:48:29 +00:00
Ton Roosendaal 684cafb01a Last fix for previous commit;
New option "passepartout" for drawing a darkened area around viewborder
in Camera view. Provided by Wybren van Keulen.
Added button in F10 buttons, just above "DispView". Would like feedback
if this is a temporal or real feature :)
2004-10-06 19:21:57 +00:00
Ton Roosendaal 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
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 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
Ton Roosendaal f59503682d - basic code for fake-polygon support (called FGon in code). Disabled now
- hide flags now save correctly in mesh, to restore after going in/out
  editmode
- after an extrude, faces/edges could have wrong select flags
  (only in vertex select mode)
- new rule for addfacelist(); this now copies edges too, if an example
  is provided. That prevents a lot of awkward code, still testing if it
  goes as desired though...
2004-09-24 12:40:37 +00:00
Ton Roosendaal a2e918d831 EditMesh refactory + undo recode
The changelog is very long... it's on the web too:
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html

EditMesh refactor notes (user)

**** New selection modes

When entering Edit Mode for a Mesh, you now have the choice for three selection modes. These are shown as icons in the 3D header (hotkey is being searched for!).

- Vertex Select
Select vertices as usual, fully compatible with how previous version work

- Edge Select
Vertices are not drawn anymore, and selections happen by default on the edges. It is a true edge select, meaning that you can select three out of four edges in a face, without automatic having the 4th edge selected.

- Face Select
Instead of vertices, now selection 'points' are drawn in the face centers. Selected faces also get a colored outline, like for edges. This also is true face select, for each face individual regardless selection status of its vertices or edges.

While holding SHIFT, and press a selection mode, you can also combine the above choices. Now selection becomes mixed, and will behave as expected.
For example; in Edge+Face select mode, selecting the 4 edges of a face will select the face too.

The selection modes and optional drawing modes (like transparant faces, normals, or solid drawing) all work together. All of Blender's mesh editing tools now react to the correct selection mode as well.
Most noticeable it's in:

**** Extrude

Extruding in Edge or Face Select mode allows much more precise control over what's extruded and what should be excluded. Try for example a checker pattern selection, and extrude it.

New is the fixed translation when faces are extruded. This always follows the (averaged) face normal(s) of the old face(s), enabling much easier working in 3D views . A single 'G' (Grab) or 'R' (Rotate) or 'S' (Scale) will change transform modus as usual.

**** Other things to note

- Hiding edges/faces will also behave different based on Select Mode.
- while editing, normals of faces are updated always now
- Border select (BKEY) has 2 different rules for edges; when one edge is fully inside of the border, it will only select edges that are fully inside. Otherwise it selects each edge intersecting with the border.
- in face mode, adding vertices, edges or a circle is invisible...
- "Add monkey" now works as a normal primitive (rotated and on 3d cursor)
- Mesh undo was fully recoded, hopefully solving issues now with Vertex Keys and Groups
- Going in and out of editmode was fully recoded. Especially on larger models you'll notice substantial speed gain.

**** Todo

Add 'FaceSelect mode' functionality in EditMode, including zbuffered selection, display and editing of UV texture.


EditMesh refactor notes (coder)

**** Usage of flags in general
The "->f" flags are reserved for the editmesh.c and editmesh_lib.c core functions. Actually only selection status is there now.
The "->f1" and "->f2" flags are free to use. They're available in vertex/edge/face structs. Since they're free, check carefully when calling other functions that use these flags... for example extrude() or subdivide() use them.

**** Selection flags
EditVert: eve->f & SELECT
EditEdge: eed->f & SELECT
EditFace: efa->f & SELECT

- Selection is only possible when not-hidden!
- Selection flags are always up-to-date, BUT:
  if selection mode >= SELECT_EDGE vertex selection flags can be incorrect
  if selection mode == SELECT_FACE vertex/edge selection flags can be incorrect
  This because of shared vertices or edges.

- use for selecting vertices:
  eve->f &= SELECT
- use for selecting edges always:
  void EM_select_edge(eed, 1)  // 1 = select, 0 = deselect
- use for selecting faces always:
  void EM_select_face(efa, 1)  // 1 = select, 0 = deselect

- To set the 'f' flags in all of the data:
  void EM_set_flag_all(int flag);
  void EM_clear_flag_all(int flag);

- the old faceselectedOR() and faceselectedAND() are still there, but only
  to be used for evaluating its vertices

**** Code hints for handling selection

If the selectmode is 'face'; vertex or edge selections need to be flushed upward. Same is true for 'edge' selection mode. This means that you'll have to keep track of all selections while coding... selecting the four vertices in a face doesn't automatically select the face anymore.

However, by using the above calls, at least selections flush downward (to vertex level). You then can call:

void EM_selectmode_flush(void);

Which flushes selections back upward, based on the selectmode setting. This function does the following:

- if selectmode 'vertex': select edges/faces based on its selected vertices
- if selectmode 'edge': select faces based its selected edges

This works fine in nice controlled situations.

However, only changing the vertex selections then still doesn't select a face in face mode! If you really can't avoid only working with vertex selections, you can use this call:

void EM_select_flush(void);

Now selection is flushed upward regardless current selectmode. That can be destructive for special cases however, like checkerboard selected faces. So use this only when you know everything else was deselected (or deselect it). Example: adding primitives.


**** Hide flags
EditVert: eve->h
EditEdge: eed->h
EditFace: efa->h

- all hide flags are always up-to-date
- hidden vertices/edges/faces are always deselected. so when you operate on selection only, there's no need to check for hide flag.

**** Unified undo for editmode

New file: editmode_undo.h
A pretty nice function pointer handler style undo. Just code three functions, and your undo will fly! The c file has a good reference.

Also note that the old undo system has been replaced. It currently uses minimal dependencies on Meshes themselves (no abuse of going in/out editmode), and is restricted nicely to editmode functions.

**** Going in/out editmode

As speedup now all vertices/faces/edges are allocated in three big chunks. In vertices/faces/edges now tags are set to denote such data cannot be freed.

ALso the hashtable (lookup) for edges uses no mallocs at all anymore, but is part of the EditEdge itself.
2004-09-23 20:52:51 +00:00
Ton Roosendaal 37f57288cb Lot of code... 2 new features:
1) Curve deform
http://www.blender3d.org/cms/Curve_Deform.392.0.html
Works simple as expected, but keep track of the rotation axis
in F7 buttons (Track X Y Z)
Only Mesh deform supported now.

Code changes:
- centralized deformation calls in curve_modifiers() mesh_modifiers()
etcetera. Here also other effects can be added like wave. Now the
evaluation order is fixed, but should become optional. It also doesnt
use the Displist anymore as deform-input. That latter part is unfinished
yet.
This code also is used for Hooks and will be needed for softbody

- made convention stricter that displists are being checked on in
drawobject(), this to prevent routines to make new displists recursively
(like armature does). Now a freedisplist() is sufficient to signal that
a new displaylist should be made.

2) Object Hooks
http://www.blender3d.org/cms/Object_Hooks.391.0.html
Support for Hooks is added to Mesh, Lattice, Curve and Surface objects.
For Armatures this would require some more work & research.
Main goal for this feature is to provide quick & simple access to the
underlying geometry in Objects on Object level, supporting hierarchies and
Ipos etc.
2004-09-14 19:03:11 +00:00
Nathan Letwory 538e11a45d Add two new options for appending *objects*:
1) append in current active layer (off by default)
2) append at 3d cursor (off by default). When more than one object is selected this will first calculate the bounding box of the centers of the objects, and then use the distance of the bounding box center to the 3d cursor to transform all objects.
2004-09-13 06:57:24 +00:00
Nathan Letwory 17e20e26ba Add theme colour for "Draw Normals" 2004-09-06 08:10:56 +00:00
Martin Poirier ae9347662b Stretch To constraint
Read today's meeting minutes for a description.

Bjornmose: We'll need some example and screenshots for the dev pages of blender3d.org. If you can do some, neat, if not, I'll do them.

Matt, Emilie and Chris: Please review UI addition. Pixel alignement and all that fun stuff has not be overly looked for (though I did some cleaning by adding alignment blocks).
2004-09-05 20:21:16 +00:00
Ton Roosendaal bf83f6ddd8 Second itteration of global undo system. Now based on:
- file-to-memory save
- incremental difference steps (compression)

everthing has been tightly coded to use minimum of memcpy or allocs. In
fact this system works with a single full buffer (=file) in memory, and undosteps as differences from it.
Speed gain is factor 4-8 faster. I've added it in CTRL+ALT+T timer menu for
a test. Please note the gain is especially in the undo-storing, not in
retrieving undo.

Also new: file read option to skip UI read (file menu). This now also is
default for the undo system.
2004-09-05 13:43:51 +00:00
Ton Roosendaal 2e0380f365 The undo test is now safely hidden behind a user-button (temporal)
Activate it in User menu "edit methods"
2004-08-31 21:01:21 +00:00
Ton Roosendaal 4edfc3a919 Feature for Curve objects in Blender; 'tapering'.
Next to the "BevOb" button you now have a "TaperOb" button to give a name
of a curve object which defines the width of extrusion of the 'BevObj'
along the curve. The TaperOb curve typically is horizontal, where the
height denotes the width.
Important rules;
- Only the firste curve in TaperObj is evaluated
- the first width is left, last width is right
- it scales the width of normal extrusions based on evaluating the taper
  curve; which means sharp corners in taper curve won't be easily visible

(That latter feature could be improved by extrusing based on the points
in the taper curve; this is a *lot* more work)
2004-08-29 09:21:52 +00:00
Jens Ole Wund bd768e00f3 claiming this to be mine .. to remain compatible to tuhopuu development
CONSTRAINT_TYPE_STRETCHTO	15
bjornmose
2004-08-26 22:00:14 +00:00
Willian Padovani Germano 446e1fae7c ** Note: two new files added, projectfiles will need an update.
Scripts:
  Campbell Barton (Ideasman, thanks) updated his Wavefront OBJ importer.
BPython:
- Finally committed pending contributions:
    Chris Keith wrote the Blender.Sound module -- still some testing to do this week;
    Joseph (joeedh) added the OnLoad scene script event;
    Satish Goda added 6 GLU functions to Blender.BGL.  Great additions, thanks all!
- Small changes to Blender.Load (leave editmode as Blender wants) and Window.EditMode (allow definition of "undo string");
- Fixed bug #1539: Window.RedrawAll() crashed Blender if an empty spacescript was available while using it in a gui-less script.
- doc updates.
2004-08-17 04:26:00 +00:00
Nathan Letwory 5a39312392 Objects will be autoselected on Append. There's a button to toggle this behaviour, by default it's enabled.
Feature requested by Bastian Salmela.
2004-08-16 06:46:41 +00:00
Nathan Letwory 2ea5ce017e Fix two problems in my code as reported on Forums and in release article thread on frontpage:
* Quaternion action ipos accidently got swapped in the Ipo module
* Ipos not editable if not linked to a datablock (was possible in 2.33a)

Also fixed a typo in Object.getMatrix(): localespace -> localspace

And I add:

* channels Key 32 through Key 63 for relative vertex keys
2004-08-14 09:20:38 +00:00
Johnny Matthews 248404e7a2 This commit changes the sweep effect to be called 'Wipe' in both UI and in backend variable naming. 2004-08-03 19:36:17 +00:00
Alfredo de Greef e9b0238d0c Major update, all implemented a bit in a hurry, and probably will need bugfixes at some point.
Extended the range of the depth and cdepth parameters as reqested by leope.
Bumpmapping should now be a bit more similar to the Blender render.

Added support for all remaining lightsources in yafray, tried to make use of
as much of the existing Blender parameters as possible.

Blender Lamp: added switch to enable rendering with shadowbuffer ('softlight' in yafray).
All other parameters are similar to the Blender settings, for yafray both the
bias parameter and the shadowbuffer size can be lower than equivalent Blender
settings, since the yafray buffer is floating point. Remember that 6 shadowmaps
are created in this case, so can use quite a bit of memory with large
buffer settings.
When 'ray shadow' is enabled for this lamp type, it is possible to set a light
radius to create a spherical arealight source ('spherelight' in yafray),
when this is 0, it is exported as a pointlight instead.

Blender Spot: as in Blender now supports 'halo' rendering.
Halo spots always use shadowbuffers, so when enabled the buttons for shadowmap
settings will appear. The 'ray shadow' button can still be used to disable
shadows cast onto other objects, independent of halo shadows.
One thing to remember, halo's don't work with empty backgrounds, something must
be behind the spotlight for it to be visible.

And finally, the photonlight:
probably the most confusing (as more things related to yafray), the photonlight
is not a real lightsource, it is only used as a source to shoot photons from.
Since indirect lighting is already supported (and looks better as well)
only caustics mode is supported.
So to be able to use this properly other lightsources must be used with it.
For the photonlighting to be 'correct' similar lightsettings as for the 'source'
light are needed.
Probably the best way to do this, when you are happy with the lighting setup
you have, and want to add caustics, copy the light you want to enable for
caustics (shift-D) and leave everything as is, then change the mode to
'Photon'.
To not waiste any photons, the photonlight behaves similar to the spotlight,
you can set the width of the beam with the 'angle' parameter. Make sure
that any object that needs to cast caustics is within that beam, make
the beam width as small as possible to tightly fit the object.
The following other parameters can be set:
-photons: the number of photons to shoot.
-search: the number of photons to search when rendering, the higher,
the blurrier the caustics.
-depth: the amount of photon bounces allowed, since the primary use is for
caustics, you probably best set this to the same level as the 'ray depth'
parameter.
-Blur: this controls the amount of caustics blur (in addition to the search
parameter), very low values will cause very sharp caustics, which when used
with a low photonnumber, probably lead to only some noisy specks being rendered.
-Use QMC: Use quasi monte carlo sampling, can lead to cleaner results, but also
can sometimes cause patterns.

Since the photonlight has no meaning to Blender, when using photonlights and
switching back to the internal render, the light doesn't do anything, and no
type button will be selected. The lightsource can still be selected, but unless
switching to yafray, no parameters can set.

Apologies to Anexus, I had no time to really do something with your code,
I'll still look at it later, to see if I can improve anything in my implementation.
2004-07-28 22:37:12 +00:00
Ton Roosendaal 268da28875 As requested; the Ramp shaders have same blending operators as were added
for texture blending.

Also made the popups for this blending stuff in more logical order.
2004-07-28 20:20:43 +00:00
Ton Roosendaal 846da79887 Oops, include file belonging to previous commit...
Plus: moved particle interaction and effect buttons back to a single
Object context. The proposed solution (sub context) has workflow issues,
(adds another click (no hotkey) to view settings)
whilst almost all Object buttons nicely fit in single view still.

This was on todo since first particle commit, actually the idea was to
move particle related issues to a special sub-context, but leave the
effects themselves in the Object main menu. Splitting off Particles from
the Effect system isn't in the scope of what is feasible now.

Also note; the current panel 'particle interaction' actually should be
a generic 'forces and collision' panel, since it's also relevant for
soft body feature (WIP)... that can be changed later.
2004-07-28 15:07:35 +00:00
Ton Roosendaal fb40ae6413 Added option to set 'full Osa' on non raytraced scenes. This makes sure
old files still use the old fast OSA, and when you want a specific
material to have specular/shader/texture AA you can set this individual.

When rendering ray_mir or ray_transp or ray_shadow the new OSA will be
effective by default however.

Still todo; make this switch work for transparant faces and unified...
2004-07-27 22:23:45 +00:00
Ton Roosendaal 73f1da749b Nathan's huge ipo patch.
- now more than 31 channels possible for ipos
- added lotsa new channels all over
- Texture block has ipo now too
- recoded getname_ei functions

(Will ask nathan to give release log info when he's back!)
2004-07-26 21:44:55 +00:00
Ton Roosendaal 653abbae6c Fix for #1449 (blocky shadows)
This problem appeared to be a famous one, with some fun read to be found
on the web. The solution as I commit here is described on the site:
http://www.blender3d.org/cms/Misc_improvements.355.0.html

As extra (I needed it quite some!) added requested feature to have the
renderwindow display in titlebar whether the spare page is shown (JKEY)
2004-07-26 17:12:04 +00:00
Stephen Swaney bead28b623 added a comment 2004-07-25 20:35:17 +00:00
Martin Poirier b57167d3e4 Particles effector type #define
Different draw mode for Vortex effector ( http://www.clubinfo.bdeb.qc.ca/~theeth/Temp/vortex.jpg )
Use row buts for effector type (only one effector at a time per object).
Forcefield circle transparency in 3D view is controlled by falloff value (for coolness factor).

Please note that those only draws in the 3D view for Empty objects. I've tested with all other object types through a global call, but lamps (and only those) give problems. Since we go in release status soon, I prefer commiting something that works all the time.
2004-07-18 22:23:50 +00:00
Alexander Ewering 96e0a103d4 1) Change the way "Align mode" is accessed in the UI: It's now a global
toggle for all pivot modes. The 2 new pivot modes have been removed
   from the popup.

   Instead, a new toggle button is added to the 3d view header.

2) Grab cursor mode. Cursor can be grabbed (and constrained to axis, grid,
   etc. while moving) like any other object. If no object is selected,
   GKEY alone grabs the cursor, otherwise pressing CKEY while in GKEY mode
   moves the cursor.
2004-07-18 15:57:33 +00:00
Matt Ebb 688a6de878 * User preference to select with the left mouse button
instead of right.

This basically swaps left and right, in most window spaces
so you can choose between:
LMB: Cursor/time slider/paint  -  RMB: Select
or LMB: Select  -  RMB: Cursor/time slider/paint

Aimed at:
1. Newbies
2. 1 button mouse mac users
3. People like me who are sick of having to constantly keep putting their brains into different modes when
 switching between other apps and Blender :)

Yes, the User Preferences window is a bit of a nightmare
now, a layout cleanup will be forthcoming soon...
2004-07-16 01:34:19 +00:00
Johnny Matthews 700d9c5559 This adds two modes to the 'around' drop down in 3d header
3d Cursor, only Ob Centers
Median Point, only Ob Centers

They prevent rotation/scaling from effecting the scale/rotation of the objects and just effects their position.
This is handy for aligning objects if you constrain to an axis and scale, as well as other neato things :)

Intrr came up with the code and I hacked it into the GUI
2004-07-15 17:42:04 +00:00
Alexander Ewering f25b0df751 Commit for the 4 aforementioned "features":
- "Global Pivot": Maintains a global Pivot and Align mode setting for
   all 3d views when enabled, instead of seperate settings per 3d view

 - "Auto Perspective": Switch to ortho mode automatically on 1/3/7, and
   to Perspective when the view is rotated with the mouse

 - "Align mode": As suggested on the list, when enabled, transformations
   on several objects only transform their locations, not their sizes or
   rotations.

 - Grid dotted when not 1:1

***ATTENTION***! The User Interface parts of these features have not been
committed, as I work on my own modified UI here. The three features need
toggle buttons to turn them on and off.

I used the following 3 buttons (first two features are in userprefs,
third as a 3d view setting):

        uiDefButBitS(block, TOG, USER_AUTOPERSP, B_DRAWINFO, "Auto Persp",
            (xpos+edgespace+(3*medprefbut)+(3*midspace)+smallprefbut+2),y3+10,smallprefbut,buth,
            &(U.uiflag), 0, 0, 0, 0,
            "Automatically switch between orthographic and perspective");

        uiDefButBitS(block, TOG, USER_LOCKAROUND, B_DRAWINFO, "Global Pivot",
            (xpos+edgespace+(4*midspace)+(4*medprefbut)),y3+10,smallprefbut,buth,
            &(U.uiflag), 0, 0, 0, 0,
            "Use global pivot setting for all 3d views");

    uiDefIconButS(block, TOG|BIT|10, B_AROUND, ICON_ALIGN,
                xco+=XIC,0,XIC,YIC,
                &G.vd->flag, 0, 0, 0, 0, "Translate only (align)");

Someone needs to add these to the interface in an appropriate manner!

Thanks.
2004-07-15 13:31:18 +00:00
Alfredo de Greef b64afb526a Removed some testcode from yafray_Render.cpp
Added the missing anti-aliasing pixel filter size and threshold parameters for manual AA control (disable 'Auto AA' button).
Added support for yafray raytraced depth-of-field.
Added extra panel for Camera in edit window to edit dof paramaters.
The actual focus point will be drawn as a cross when camera 'ShowLimits' is enabled, similar to the aqsis code in tuhopuu.

Note to users: raytraced DoF is very slow, for best results, the default AA parameters are not good enough, especially with higher aperture values (more blur).
So for best results, disable 'Auto AA' and set the AA parameters yourself.
It works best with multi-pass AA ('AA passes' > 1) and a reasonable 'AA samples' value, something in the range 8 - 25 or even higher.
Currently the post-process DoF is not available in yafray, alternatives are being worked on.
2004-07-13 19:22:41 +00:00
Brecht Van Lommel e077328122 Added LSCM UV Unwrapping:
http://www.loria.fr/~levy/Galleries/LSCM/index.html
http://www.loria.fr/~levy/Papers/2002/s2002_lscm.pdf

Implementation Least Squares Conformal Maps parameterization, based on
chapter 2 of:
Bruno Levy, Sylvain Petitjean, Nicolas Ray, Jerome Maillot. Least Squares
Conformal Maps for Automatic Texture Atlas Generation. In Siggraph 2002,
July 2002.

Seams: Stored as a flag (ME_SEAM) in the new MEdge struct, these seams define
where a mesh will be cut when executing LSCM unwrapping. Seams can be marked
and cleared in Edit Mode. Ctrl+EKEY will pop up a menu allowing to Clear or Mark
the selected edges as seams.

Select Linked in Face Select Mode now only selects linked faces if no seams
separate them. So if seams are defined, this will now select the 'face group'
defined by the seams. Hotkey is still LKEY.

LSCM Unwrap: unwrap UV's by calculating a conformal mapping (preserving local
angles). Based on seams, the selected faces will be 'cut'. If multiple
'face groups' are selected, they will be unwrapped separately and packed in
the image rectangle in the UV Editor. Packing uses a simple and fast
algorithm, only designed to avoid having overlapping faces.

LSCM can be found in the Unwrap menu (UKEY), and the UV Calculation panel.

Pinning: UV's can be pinned in the UV Editor. When LSCM Unwrap is then
executed, these UV's will stay in place, allowing to tweak the solution.
PKEY and ALT+PKEY will respectively pin and unpin selected UV's.

Face Select Mode Drawing Changes:
- Draw Seams option to enable disable drawing of seams
- Draw Faces option to enable drawing of selected faces in transparent purple
- Draw Hidden Edges option to enable drawing of edges of hidden faces
- Draw Edges option to enable drawing of edges of visible faces

The colors for these seams, faces and edges are themeable.
2004-07-13 11:48:52 +00:00
Ton Roosendaal f77bc7eb7d Quite a large one this time... but now we have:
Edges in Mesh
- adds automatic when you use creases. For other situations; call the
  void make_edges(Mesh *me) in mesh.c. Of course, once in editmode the
  edges are automatically recreated.
- in F9 buttons you can add/remove edges too
- both for Mesh and DisplistMesh, so it speeds up drawing quite some in
  wireframe
- render for edges can't work... edges have no material nor tface nor col..
  so here still the faces are rendered in wire

Creases in Subsurf
- based on the code by Chris McFarlen
- main changes is that now edges are used, saving quite some data in file
- use SHIFT+E in editmode to set edges-sharpness. values go from 0-1
- in F9 buttons you can set draw-crease mode. It draws now blended from
  wire color to edge-select color (as provided in Theme)

Known issue: setting sharpness on 1 cube (subdiv 2) gives weird results
with some values... Chris, can you check?

Further; code cleanups, changing 0 in NULL when needed, no warnings, etc etc
2004-07-08 20:38:27 +00:00
Nathan Letwory 6757a8159b * fixed bug in rainbow color for material and world ipoview
* removed 32 channel limit (can now have 50, or of you know what number to change, 999 ;)
* added new IPOs: mirror fresnel and fac, transparency fresnel and fac, and glow factor transparent materials (add)
2004-07-07 08:49:33 +00:00
Johnny Matthews 9c94728d89 This is the initial commit of a revamp of the sweep effects that goofster committed that was originally a sequence plugin from sirdude.
The changes from the original include the ability to add a blurred edge with a selectable width to the wipe and to rotate the effect.

Has these sweep types included already
-single
-double
-iris

These still need to be coded
-box
-cross
-clock
2004-07-06 19:07:13 +00:00
Nathan Letwory 0576268c22 * Added IPO for displacement, translucency and raymirror
* Cleaned out IPO #defines
2004-07-05 09:15:02 +00:00
Ton Roosendaal b2d7f47b81 Made static particles working with a deformed Mesh, both for Lattice as
for Armature. Note: only works for subsurfed Mesh now!

Change in drawobject.c: Halo option on subsurf Mesh now draws points.
but using the original vertices...
2004-07-03 18:39:19 +00:00
Ton Roosendaal 90d4f7a3c1 Added new operators for "MapTo" panel as suggested & partially coded by
Kent Mein. So next to the mix, mult, add, sub we have now:

- Div: divides by texture color
- Screen: is like Mult, but works opposite (makes lighter)
- Diff: the difference between texture color and material
- Light: if texture is lighter it shows (per component)
- Dark: if texture is darker it shows (per component)

Next step: add this for specular and mirror, and the other channels...
I commit it now because it also fixes error in previous commit.
2004-07-02 22:29:06 +00:00
Ton Roosendaal a8ef804146 NEW: Ramp shades for diffuse and specular
http://www.blender3d.org/cms/Ramp_Shaders.348.0.html

Material color and specular now can be defined by a Colorband. The actual
color then is defined during shading based on:
- shade value (like dotproduct)
- energy value (dot product plus light)
- normal
- result of all shading (useful for adding stuff in the end)

Special request from [A]ndy! :)
2004-06-30 18:54:09 +00:00
Jiri Hnidek 7000bebc4b - added octal tree node optimalization of MetaBall polygonisation
polygonization of 512 MetaBalls:
   - version 2.33a:      76 s
   - current cvs version 8 s

- button "Never" is added in button window: Metaballs are polygonized only during render time (it is useful for particle animation) http://e-learning.vslib.cz/hnidek/misc/bowl_metaballs.blend
2004-06-29 17:10:13 +00:00
Ton Roosendaal e750478ce3 The revised patch from Leon for new particle effects.
New is that objects can have a force field, and Meshes can even deflect
(collide) particles. This is in a new sub-menu in Object buttons F7

The full instructions where on the web, Leon mailed it me and I will put
it in CMS tomorrow. For those who like to play with it now, here are demo
files:

http://download.blender.org/demo/test/

Quite some changes where in the integration though... so previous created
particle deflectors will not work. Changes to mention now are:
- gravity is renamed to 'force field'
- force field and deflector options are in Object now, not in Mesh
- the options also have its own struct, doesnt add to Object by default
- force fields are possible for all object types, but only work on center.
  So empty objects are typical for it.

Work to do:
- add draw method in 3d win to denote forcefield objects
- check on the UI (panel with different size?)
- add 'recalc' button in deflector panel
2004-06-26 18:18:11 +00:00
Roel Spruit 8a0cd0bc97 Added another Sequence effect: the wellknown Glow effect. 2004-06-23 22:11:57 +00:00
Roel Spruit 629e526b25 - Added correct Writing/Reading of the new Sweep sequence effect (Thanks Ton, where would I be without you)
- Sweep effect updates after you change the type of sweep now.
2004-06-23 18:22:51 +00:00
Ton Roosendaal 6fdea0ffe7 Popular request: the floating panels (NKEY) now close on a 2nd NKEY command.
This for all current NKEY menus by default. Can be standard for each hotkey
controlled Panel from now on; use toggle_blockhandler() for it.

Another popular request: hotkey enabled Panels now optionally reopen on
the previous location, instead of under mouse. This option "Pinned" is a
user option now. Optional for later; have it as per-panel option... dunno!

The last request, close on mouse-exit, won't be implemented, this intrudes
with Panel consistancy, and is pretty OK solved with NKEY-NKEY now.
2004-06-19 12:25:28 +00:00
Roel Spruit a31dec3712 added a new Sequence Effect: Sweep.
this consists of 22 different ways to sweep from 1 strip to another. For you windows lovers: it's like "Blinds" in Powerpoint :)
- in the NKEY menu you can choose which type you want perform, vertical, horizontal, in/out etc. it's too much to decribe.

Credits for this go to Kent 'Sirdude" Mein who coded the sequence plugin I stole the code from.

To allow certain sequence effects to have settings, I also added a "varstr" void pointer to the Sequence DNA, that can point to a special struct for each effect. This is similar to how plugins are handles.

more neat effects to come....
2004-06-18 22:53:06 +00:00
Alejandro Conty Estevez ed86852f7e New export through plugin scheme for yafray. It is working on linux and mac os x
Needs latest yafray, you can get it from cvs, but I have also binaries
for os x here:

http://www.coala.uniovi.es/~jandro/noname/downloads/yafray-0.0.6-3.pkg.zip

To use it, go to yafray panels (global settings) and uncheck the "xml" button.
That would tell the export code to avoid xml export and use the yafray plugin
instead. You'll see the render being draw while running and you can even stop it
with ESC key.

Since I'm sure problems will appear, expect updates soon.
Remember: does not work on win32
2004-06-16 18:44:12 +00:00
Ton Roosendaal 54f9086d3c Restored oldstyle zoom in/out, and added a new userpref for denoting zoom
types:

- Continue: is default, old style
- Dolly: is like previous, but not continuous
- Scale: is the new method. Name is based on fact it scales view
2004-06-16 13:31:32 +00:00
Ton Roosendaal dbfe3daec3 Oh, the fix is an addition of a OB_NEG_SCALE flag in ob->transflag, which
is calculated in where_is_object.
Negative scale is found by a cross product of first 2 rows in matrix, and
comparing that (dot product) with third row.
2004-05-29 16:22:07 +00:00
Ton Roosendaal 6b51c684f1 NEW! Blender now displays flipped (negative scaled) Objects correctly in
OpenGL draw.

(BTW: the previous commit also solves raytrace errors with negative scaled
objects...)

Further a cleanup of displaylist flags and object/base flags. The #define
ACTIVE is moved to filesel.c (only used here).
The GONNA_MOVE #define got a OB_ added in front.
2004-05-29 16:17:46 +00:00
Ton Roosendaal 1a6329533f Removed double #defines from include, added some comments in code, and
added define for future use to bring back old (fast) AA.
2004-05-18 20:00:51 +00:00
Ton Roosendaal 1adae69b5f Rewind of change in MCol structure.
Kester: since this is in DNA, it backwards converts all R into B now,
which isn't the bug. On big endian systems (OSX) there engine colors
are OK, which indicates the conversion of MCol goes wrong on the
engine side, by using some endian-sensative approach.

The main confusement is, that the MCol struct isn't in use for read
or write in Blender, only for a save in files. The contents of that
struct is wrong, yes. See note in vpaint.c top.
2004-05-16 16:25:40 +00:00
Kester Maddock d5fde6c48b Added #!/usr/bin/python standard script identifier to the start of SConscript files.
Makes text editors identify SConscripts as Python, and syntax highlight properly.
2004-05-16 13:07:20 +00:00
Kester Maddock cfffc96ad8 Fix for bug 1245: Colours are wrong on GameBlender
http://projects.blender.org/tracker/index.php?func=detail&aid=1245&group_id=9&atid=125

The vertex paint routines were storing red in the blue channel, and blue in the red channel.
2004-05-16 12:50:16 +00:00
Ton Roosendaal 16c783d950 Added two more mapping types to World buttons for sky render.
"Sphere": spherical mapping for a 360 degree panorama
"Tube": cylindrical mapping for a 360 degree panorama

Both mappings by default do only the sky (upper) hemisphere. The color
below is same as regular Horiz and Zenith colors, useful for setting
an AO effect.

Sample pics:
http://www.1000skies.com/fullpanos/index.htm (commercial)
2004-05-07 18:03:40 +00:00
Kester Maddock 08c14c7ca0 Mouse Wheel Support for the Game Engine.
This adds "Wheel Up" and "Wheel Down" as choices to the Mouse sensor brick.
2004-05-02 23:45:03 +00:00
Ton Roosendaal 02ba73aaad Sneaked in new feature (request samo):
The Image texture repeat options, now allow a "Checker" repeat. With
odd and even tiles set separately, and a size button to set a
'Mortar' inbetween tiles.

http://www.blender3d.org/cms/Render_engine_features.215.0.html

Also fixed bug: using 'CalcAlpha' option for image textures didn't give
antialised edges for image.
2004-04-28 18:08:34 +00:00
Ton Roosendaal 6d2970e406 Added Ambient channel in "Map To" Panel for materials. Is now means to
control AO and Radio with texture too.
2004-04-26 16:49:05 +00:00
Ton Roosendaal 0facc2681e Solved AO smooth rendering, by introducing a "Bias" value for smoothed
rendered faces.
http://www.blender3d.org/cms/Ambient_Occlusion.231.0.html

ALso removed prints when allocating new 'face groups' etc, which wasn't
informative at all.
2004-04-26 14:17:48 +00:00
Ton Roosendaal dffa667674 Raytrace now has option to change the resolution of the Octree used. It
appeared that the standard size (64x64x64) just works fine for small
scenes, like a single character in a small environment. Larger scenes and
larger environments became exponentional slower.

Disadvantage of larger octrees is longer build time, and overhead traver-
sing it though, so something to tweak based on some experimenting.
A table with test results + blender file will be in CMS soon.

New button is in F10 Render panel, in bottom. Last free spot there! O_o
Sizes supported now 64, 128, 256 or 512.
2004-04-23 21:02:58 +00:00
Ton Roosendaal d694335cc2 Another phase in panelizing all window types. Did lots of small code
fixes, including:

- Panel in action window (disabled it, since there's no need for it)
- fix: when action was added to mesh with vertex keys, the action couldn't
  be deleted, nor did action window draw key names
- mouse on RVK (key) in Action window: Nkey menu pops as well.
  This is not a good candidate to put in Panel, no selection possible here.
- when you change name of RVK in action window, it shows in IpoWindow too
2004-04-20 18:27:10 +00:00
Ton Roosendaal dfc824a134 Preparations to have Panels in all window types. Also implemented
it for the UV Image window (as Nkey replacement). Blendix can take
this further now.

Other little improvement: vertices in UV window now draw unselected
first, and then selected over it. Less confusing!

Next spaces: Action and Nla.
2004-04-19 22:05:37 +00:00
Johnny Matthews 328f6c7c9e Added "Auto AA" toggle in Yafray Render panel defaulted to On (current functionality AA is determined by OSA and GI quality settings)
When disbaled, 2 number buttons appear to allow setting  manual AA passes and AA samples.

Johnny Matthews (guitarGeek)
2004-04-15 15:52:28 +00:00
Ton Roosendaal c2526dc922 More AO fun to play with:
- AO energy slider to control amount
- option "Use sky color" for colored AO. The horizon color will define
  bottom diffuse color, the zenith works on top
- option "Use sky texture" will do a full sky render to define AO color

Please note that AO energy and color only is found when a ray does not
intersect. So for interior scenes make sure 'Dist' value is sufficient
low.

New also is:

- World "Map input" allows "Ang Map" (Angular mapping) which can be used
for 360 degree spherical maps, aka as Light Probes. Check samples here:
http://www.debevec.org/Probes/
Note that Blender doesn't support HDRI images yet, but option "Use sky tex"
already gives intersting results with such images

- World sky rendering with Image Textures now correctly filters and uses
antialiasing. Also noticable for raytrace mirror reflections

- World preview render for sky type "Real" now gives correct view as
defined by current used camera.

I tried to speed up AO tracing with coherence systems, none of it really
worked yet... time to tackle octree itself i guess!
2004-04-12 14:53:17 +00:00
Michel Selten 450fdbfd82 SCons updates
* Updates to the cygwin build.
  the dna.c file used to be generated with a full path. Cygwin doesn't like
  this. The problem was with some cflags and linkflags that are used to build
  makesdna.exe
  Hos nicely pointed this out and proposed a solution.
  Now, these flags are only added to the command when the platform != 'cygwin'.
* Updated some variables in SConstruct.
2004-04-11 21:11:18 +00:00
Ton Roosendaal 2a90de0348 Eeshlo AO patch, revised
- Ambient Occlusion is a more sophisticated ambient trick, which takes
  nearby faces into account by firing a hemisphere of shadow-rays
  around. AKA 'dirt shader'.
- Eeshlo made it a Lamp type, which doesn't fit well. I've moved the
  settings to the World menu, and let the Material->ambient value control
  the amount it contributes
- currently, the AO value is added/subtracted/mixed with the 'diffuse'
  factor while shading, before it is multiplied with Material color

Buttons are in new Panel 'Amb Occ" in F8 menu. Note:

- "Dist:" by shortening the length of rays you get subtler effects and it
  renders faster too
- "DistF:" the attennuation factor gives control over how the 'shadow'
  spreads out.

Further it's just raytracing, so tends to be slooooow.... :)
Here same tricks as for other raytraced scenes apply, especially try to
keep the environment as small as possible (exclude faces from Octree by
giving them no Material Traceable).

I still have to think over a couple of aspects, will await feedback on it:
- AO color? Now it just adds 'white'
- other sampling patterns? I tried dithering, which was so-so
- method of controlling final 'samples' in F10? Might be useful for other
  oversampling too (area light) to have it reacting to a percentage or so..
2004-04-05 21:04:13 +00:00
Ton Roosendaal 0ae03d1626 Eesho's patch for new noise textures!
Basically this provides three new things:

1. Choice of a list of noise-base functions, which can be used by the
   current Clouds, Marble, Wood textures as well.
2. Three new texture types: Musgrave, Voronoi and DistortedNoise
3. Python access to noise functions (not for render!)

All of this together makes Blender's builtin procedural textures a LOT
more powerful. Here again, a full webpage should be made to show off all
possibilities, and explain some of the more scientific names for settings.

A good read on Musgrave textures can be found here:
http://www.ypoart.com/Downloads/Musgrave.htm
About Voronoi:
http://www.ypoart.com/Downloads/Worley.htm
I can't find official DistortedNoise docs easily... maybe its something
Eeshlo created himself.

I've spent some time to change the patch Eeshlo provided. Worth noting:
- created main texture "Musgrave" with 5 sub choices (instead of 5 new
  main textures)
- added for all new textures the option to scale (zoom in out)
- added patch in do_versions to initialize variables

I hope the Python team will check on the Noise.c API. And include in docs!
2004-04-03 13:59:27 +00:00
Kester Maddock 164463e200 #define some constants for physics engines in DNA world types. 2004-04-03 00:04:44 +00:00
Brecht Van Lommel d7f3f66728 New UV editor / Image Window features:
- Draw Faces in the UV editor
- Draw Faces, selected in the UV editor, in the 3D view
- Draw Shadow Mesh in the UV editor (for faces unselected in the 3D view)
- Select Linked UVs (LKEY)
- Unlink Selection (Alt+LKEY)
- Stick (Local) UVs to Mesh Vertex on selection
- Active Face Select
- Reload Image
- Show / Hide Faces in the UV editor (H, Shift+H, Alt+H)
- Proportional Editing (O, Shift+O)
- Stitch, Limit Stitch UVs (snap by mesh vertex)
- Weld / Align UVs (WKEY)
- UVs Snap to Pixels on/off switch
- RMB in Texture Paint or Vertex Paint mode picks color
- Select Inverse in Faceselect mode

I hope these are all the features that were commited. The new UV Mapping
panel (and code) will follow later.
2004-04-01 12:55:12 +00:00
Stephen Swaney cd5ea5e724 add comment to BezTriple struct. 2004-03-24 16:06:01 +00:00
Nathan Letwory 00291b5cf4 [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process
[SCons] Build solid and qhull from the extern directory and link statically against them

That was about it.

There are a few things that needs double checking:

* Makefiles
* Projectfiles
* All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
2004-03-22 22:02:18 +00:00
Daniel Dunbar aedf456938 - split the data structures that actually constitute a mesh
(MVert,MFace,etc) off into DNA_meshdata_types.h, to isolate areas
    of source that actually edit mesh *data* vs. areas that just edit
    mesh object information.
2004-03-20 22:55:42 +00:00
Michel Selten 48d2ea15f1 SCons updates
* Removed win32 specific stuff from the SConscript in makesdna/intern.
  This stuff is obsolete after yesterdays update.
2004-03-16 18:43:18 +00:00
Michel Selten 90d179f014 SCons updates
* Added the following flags to config.opts:
  - PYTHON_LINKFLAGS
  - PLATFORM_LIBS
  - PLATFORM_LIBPATH
  - PLATFORM_LINKFLAGS
  Backup your original config.opts file and run scons again to get these new
  options.
* Use freetype-config instead of pkg-config for determining the freetype2
  flags.
* The new PYTHON_LINKFLAGS now enable the dynamic linking on Linux and
  possibly other platforms as well. This should resolve all linking problems
  reported to the mailing lists. (At least for Linux, I can't test other
  platforms).
2004-03-15 19:55:11 +00:00
Chris Want 6c650c586d Fixed issues surrounding the increased vertex limit:
* Created a MESH_MAX_VERTS macro in DNA_mesh_types.h
* fixed vert limit for converting displistmesh ==> mesh
* fixed vert limit when doing boolean operations
2004-03-14 21:21:09 +00:00
Chris Want dd3c9c0c46 Removed the struct MFaceInt from DNA_mesh_types.h (by the recommendation
of zr). This struct was never written to file and the new 'int based'
MFace can be used in it's place. Some removal of redundant code could
perhaps be done now (I didn't do any though, just "s/MFaceInt/MFace/").
2004-03-14 21:00:51 +00:00
Daniel Dunbar 16e90d56d2 - replaced AUTOSPACE define with {ME_,CU_,MB_}AUTOSPACE,
different objects shouldn't share flags this way (still sharing of
  other mesh flags in renderer... ickity pickity, but I'm not fixing now)
 - removed some unnecessary uses of DNA_mesh_types.h
2004-03-14 16:59:48 +00:00
Michel Selten 70a4ead0ae SCons updates
* Blender static now links. By default this option is disabled on all
  platforms. Simply set the option in config.opts to 'true'.
* Added the following flags to config.opts:
  - HOST_CC.    This is the C compiler for the host platform. This value is the
                same as TARGET_CC when not cross compiling.
  - HOST_CXX.   This is the C++ compiler for the host platform. This value is
                the same as TARGET_CXX when not cross compiling.
  - TARGET_CC.  This is the C compiler for the target platform.
  - TARGET_CXX. This is the C++ compiler for the target platform.
  - TARGET_AR.  This is the linker command for linking libraries.
  - PATH        This is the standard search path
  All SConscript files have been updated to reflect these changes. Now it's
  possible to change only the root SConstruct file, and all compiler specific
  variables are passed automatically to all SConscript files. Of course, this
  does not apply to makesdna because there the host and target platform is
  different from all other libraries.
  To pass a variable that applies to all platforms, all we now have to do is
  set the correct value in library_env


Note: as usual, to get the latest options in the config.opts file, first
      remove your version.
2004-02-29 21:40:48 +00:00
Michel Selten 9330e553e8 SCons updates
* libraries are now generated in [BUILD_DIR]/lib
* passed the user_options to all libraries now.
  This means I could remove a couple of Export/Import lines.
* Changed the order in source/blender/src/SConscript and
  source/gameengine/SConscript.
  All libraries are now sorted alphabetically. This has no impact on the build
  process.
2004-02-15 19:25:32 +00:00
Michel Selten 95dc219ff8 SCons updates
* All output is now generated in a seperate directory. By default this is
  ../build/
  Currently all .lib / .a files are still build in lib/
  So, I guess I need to update all SConscript files to build the lib now also
  in the build_dir. TODO
* User configurable options have been added.
  When running SCons for the first time, a new config.opts file is generated.
  The defaults are taken from each section currently in SConstruct.
  Currently implemented options:
  - VERSION             // Blender version. not used at the moment
  - BUILD_BINARY        // release or debug
  - BUILD_DIR           // target directory to build intermediate files
  - USE_INTERNATIONAL   // true or false
  - BUILD_GAMEENGINE    // true or false
  - USE_PHYSICS         // ode or solid
  - USE_OPENAL          // true or false
  - USE_FMOD            // true or false
  - USE_QUICKTIME       // true or false

  Note that all options are strings, so quotes are necessary (')

  There's currently some duplicate code in the SConstruct and SConscript
  files, but this currently works and cleanup can be done in small steps
  afterwards.

* Disabled international support on Linux by default for now.
  There is something wrong with this currently. I'll fix it in the near
  future.
2004-02-07 20:44:43 +00:00
Alfredo de Greef c225bf1240 On request of broken, monkeyboi and others the rendering engine menu is back again.
The menu button was also moved to the render panel, this required some changes to the placement of the other buttons.
I hope this is no problem...
2004-01-27 05:46:12 +00:00
Michel Selten c8d8b2c4de SCons update
* makesdna generates dna.c which in turn should be compiled with nice cflags,
  linkflags etc. But, a small error slipped in which caused the .c file to be
  compiled into a nice .o file without those flags.
  Thanks to Hos for pointing out the error and persisting there indeed was an
  error.
2004-01-25 20:57:25 +00:00
Alejandro Conty Estevez 79884ff70b Added another control for new pathlight refinement parameter and solved
a problem with name collision betwen textures and shaders reported by kino.
2004-01-24 12:23:41 +00:00
Matt Ebb b0479d893f * Preferences for displaying the grid floor, X axis, Y axis,
Z axis. (ported from tuhopuu2)

Controls are found in the 3D View Properties panel (with
the rest of the grid settings). This is more flexible for
people like me who hate the grid getting in the way when
modelling - turning off the grid floor and turning on the Z
axis gives a setup like in Wings 3D or Clay.

* Cleaned up the 3D View Properties and Background Image panel's layout while I was adding the new buttons (including change over to UiDefButBit).
2004-01-24 05:06:12 +00:00
Willian Padovani Germano 1652884463 BPython:
-- removed struct Script (DNA_script_types.h) from makesdna to blender/include/BPI_script.h
   (BPI meaning Blender Python-related external Include file).
   Had agreed with Ton that makesdna was not the proper place for it.
-- fixed two small warnings in Ipo.c (variables might be used uninitialized)
-- fixed a bug reported on blender.org's python forum by Wim Van Hoydonck (aka tuinbels):
   Blender would hang if a script failed.  My fault, accidentally put a node=node->next type call outside the while loop check, so it never ended.

With makesdna/DNA_script_types.h removed and include/BPI_script.h added, msvc projectfiles will need to be updated.  Sorry to do it now, but I promissed I'd fix this before next release.
2004-01-21 04:38:03 +00:00
Alfredo de Greef 41144750da corrected particle object dupliverts and aramature duplivert export problems
corrected power slider increment update
2004-01-18 20:00:17 +00:00
Alejandro Conty Estevez 3b1b0f3ef5 Gradient button is back and now there are controls to export bias and
raydepth to yafray. Plus some minor fixes
2004-01-15 17:01:02 +00:00
Robert Wenzlaff 52e5a15bab - Separates displace from Var slider. Added Disp Slider to
control how the intensity channel affects displacement.  Nor
	  slider still controls how Nor channel affects displacement.

	- Scaled Nor displacement to make Nor slider more usable.

	- Removed Data scale from displacement routines.  Made
	  sliders unusable for objects scaled in editmode.  Displacement
	  now relative to unit sized object.  Displace still tracks
	  with object scale, so scale out of editmode if you want a
	  large object with deep displacement.
2004-01-15 04:06:24 +00:00
Alejandro Conty Estevez 4712655080 Global photons export for yafray. Square arealights, spot and point can work
as emitters. Needs latest yafray code, still not in cvs.
2004-01-13 16:51:35 +00:00
Rob Haarsma 4a8f52f619 Converted the Userpreference buttons to zr's new ButBit calls.
Also added USER_*  to each define located in DNA_userdef.h.
2004-01-13 14:50:45 +00:00
Matt Ebb 589ef22aef * Fixed a silly problem when changing the colours of the 'Neutral' button theme entry (which changed both the outline of buttons and various other grey buttons). Added a new theme colour 'Outline' and left 'Neutral' to remain, well, neutral.
Thanks Desoto for the report.
2004-01-10 13:41:03 +00:00
Robert Wenzlaff 6a9d29d1db -Changed "Simple" button to pulldown menu or subsurf type.
Paves way for additional subsurf types, and avoids confusion
	where Simple is on, but Subsurf is off.
2004-01-10 01:22:07 +00:00
Kent Mein e3080c9580 Added support for outputting bmp's
The padding is slightly messed up, so it produces somewhat trunkcated images
however it works.  I'll try and fix it later but I have to go home now.
Its atleast usable at this stage.

I moved bmp_decode.c to bmp.c and cleaned it up a little bit.

Kent
2004-01-09 22:04:08 +00:00
Alejandro Conty Estevez 234fb27248 Added export for caustic settings based on the raytrans values. And settings
for casting them from GI (pathlight). A new contro "caus depth" in the panel
controls the maximun number of bounces going through objects.

Now images like this:
http://www.coala.uniovi.es/~jandro/noname/images/causfromblender.jpg
are possible with scenes like this:
http://www.coala.uniovi.es/~jandro/noname/examples/exp_test2.blend
2004-01-08 11:42:40 +00:00
Alejandro Conty Estevez db7b5a9617 Added multi-processor setting for yafray and quotes around the xml
file in the system call to avoid problems with complex paths.
2004-01-06 23:33:25 +00:00
Ton Roosendaal e4d0d9cc44 - decided to use a new variable for the new exposure option, instead of
re-using old one. New one = 'exp'.
- at first I used the old 'exposure' value, and just mapped it to 0. this
  causes a problem with upward compatibility, old blenders then render a
  black picture. is too confusing!
- warning; exposure values saved with commit of last week will get lost.
2004-01-06 20:25:50 +00:00
Robert Wenzlaff 8eb1d25f96 - Adaptive spliting of renderfaces for displacement. Choose to split
between verts 1-3 or 2-4 based on minimum displacement gradient.
        drastically improves smoothness with out additional subdividing.
2004-01-06 05:21:16 +00:00
Stefan Gartner 20d64f4b8d don't link makesdna against libpng and friends when building with scons 2004-01-05 14:49:52 +00:00
Robert Wenzlaff 22bfc207f3 -First port of Displacement mapping from tuhopuu. Image textures not working
yet (R.vn and R.vlr no longer exist, and were needed to get the image mapped
right).  Works esp. well with Subsurfs. Sensitive to vertex normal issues
in Simple and Mesh modes.

-Also porting Simple Subdivide.  Subdivides mesh at rendertime w/o changing
shape, for smooth displace and Radiosity.

-Removed an unused var from KnifeSubdivide.
2004-01-05 08:44:49 +00:00
Wouter van Heyst 57a7dfe5a5 - Revert to NaN makefiles 2004-01-05 00:06:11 +00:00
Alejandro Conty Estevez eff07b8329 Basic initial yafray integration by Eeshlo.
Materials are exported the best we can do by now. It will look almost as in
blender except for the missing procedural textures and some minor issues.
You have to tweak normal modulation amount to get the desired result cause
is not the same in yafray.

We added a panel in render space to adjust some yafray settings (GI and so)

Also we export transparency and reflection using new raytracing settings,
but that will be changed and improved soon.

Remember that you have to set YFexport path in user defaults and yafray must
be on path (version 0.0.6)

We added the "yafray" button to activate all this stuff in the render window.
Panel and settings are only shown when checked.

So now when activated the code calls yafray export instead of the internal
renderer and finally the resulting image is loaded back into render window's
buffer. So animation is also possible and results can be saved using blender
usual scheme.
2004-01-04 22:10:36 +00:00
Michel Selten 29d23bf864 Forgot to add some lines and cleanup in the makesdna/intern/SConscript file.
The makesdna tool is SDL 'aware', but I forgot to pass some crucial flags to
the build command.
While working in that file, did some cleanup to make it more consistent with
the other SConscript files.
2004-01-04 21:42:01 +00:00
Michel Selten d3e1fc8870 SCons build system files added.
You'll need SCons (www.scons.org) to build.
Platforms currently working:
* Linux (me)
  - options for quicktime, openal and international disabled
  - uses the system libs and include files for building - no option to build
    with the precompiled libraries yet.
* Windows (jesterKing)
  - builds with quicktime (optional)
  - builds with openal (optional)
  - builds with international support (optional)
  - Use the DOS box to build
  - builds with precompiled libraries
* Irix (Hos)
  - Uses default Irix compiler
  - Not all optimization levels correct yet
  - options for quicktime, openal and international disabled
  - builds with precompiled libraries
* Cygwin (me)
  - has a problem in the linking stage
  - uses free build tools (gcc)
  - options for quicktime, openal and international disabled
  - uses the system libs and include files for building - no option to build
    with the precompiled libraries yet.
* MacOS (sgefant)
  - builds with quicktime (optional)
  - options for openal and international disabled
  - builds a nice bundle
  - builds with precompiled libraries

Thanks to IanWill for a bugfix in the Linux build.
Note: This is a work in progress. A lot still has to be done - for example the
      optional parts are only to be enabled by directly setting 'true' or
      'false' in the SConstruct file. This needs to be moved to a user config
      file. Also, the .o/.obj files are stored in the source tree. This needs
      to be fixed as well.
      The game engine is not yet built.
2004-01-04 21:11:59 +00:00
Chris Want 9f009558bf A few related bug-fixes/refinements
* A patch to make sure that constraints on bones that point to
    external objects are evaluated correctly (and that the bones that
    depend on these bones are evaluated correctly, etc, ad nauseum).
    This addresses some of intrr's issues (the blender-related ones,
    that is).

  * Make sure that deformed displists are updated when the user
    manipulates any of the constraint buttons.

  * Added a nice little function, ik_chain_looper(), that executes a
    callback for every bone in an IK chain.
2004-01-04 03:39:06 +00:00
Chris Want d311e96174 Armature speed ups, Part III
----------------------------

Another (major) armature speed up for bones with many constraints.

When tranform()-ing, figure out which bones need to be recalculated
beforehand and only update those bones.
2004-01-03 03:53:18 +00:00
Chris Want 33916a2402 Armature speed ups, Part II
---------------------------
"Delay Deform" option for armatures.

The button is under the X-ray bones button in the edit buttons.
With this armature option selected, manipulations in pose mode
will only deform children after the transformation is finished.
While hardly an optimal solution to the slow armature crisis, this
gives about 4 times speed up on some meshes (ah well, at least lets
me isolate armature vs. displist slowdowns while profiling).
2004-01-03 01:40:53 +00:00
Martin Poirier 7f90973344 Fix a problem that has been bugging me for a while. Tracking axis by default are different for Lamp and Camera than for the rest. For the constraint, it wasn't using the correct ones for them, so obviously, it didn't track correctly by default.
Fixed by checking the object type and changing the up and track axis accordingly.

Also added some comments in the DNA file (recompiling makedna because of comments is fun!)
2004-01-01 19:21:06 +00:00
Ton Roosendaal 10c0f4ae9f - bug fix #828
Blender crashed when assigning background image to 3d window, when no
  buttons window was visible. This caused by copying code from old location
  with still using some variables of the 'button space' struct.

  Solved by creating these variables in View3d 'space' as well, and using
  these instead. Could also remove old coder /* comment */ that there was
  a unknown bug in the code there. :)
2003-12-31 13:48:45 +00:00
Chris Want 9bc012f97c A fix for the missing pad1 bug: henceforth, world->pad1 shall be known as
world->gameEngine (a la tuhopuu).
2003-12-31 04:00:26 +00:00
Ton Roosendaal d8b21b01c3 Added improved exposure calculation
- based at 1.0-exp(-color) trick in Yafray. But to guarantee backwards
  compatibility, and some more control, Stefano Selleri hacked a useful
  formula for it.
- We now have 2 values to set:
  - "exp": the exponential correction value (0-1)
  - "range": the light range that maps on color 1.0 (0-5)
- Using exp(x) (is e^x) we can much better prevent overflows from render,
  which are currently hard-clipped in Blender. Setting a small 'exp' value
  wil efficiently smooth out high energy and map that back to a color for
  display.
- total formula:
  newcol= linfac*(1.0-exp(col*logfac))
    col, newcol are colors
  linfac= 1.0 + 1.0/((2.0*wrld.exp +0.5)^10)
  logfac= log( (linfac-1.0)/linfac )/wrld.range
    wrld.exp and wrld.range are the button values
- default setting: exp=0.0 and range=1.0 give results extremely close to
  previous rendering.
- graph: http://www.selleri.org/Blender/buffer/Image1.png  for 'exp' setting
  ranging from 0-1, and with 'range'=2

Thanks Stefano for the help!
2003-12-30 18:03:37 +00:00
Ton Roosendaal 3ce1dc9065 Area lights and more...
- New lamp type added "Area". This uses the radiosity formula (Stoke) to
  calculate the amount of energy which is received from a plane. Result
  is very nice local light, which nicely spreads out.
- Area lamps have a 'gamma' option to control the light spread
- Area lamp builtin sizes: square, rect, cube & box. Only first 2 are
  implemented. Set a type, and define area size
- Button area size won't affect the amount of energy. But scaling the lamp
  in 3d window will do. This is to cover the case when you scale an entire
  scene, the light then will remain identical
  If you just want to change area lamp size, use buttons when you dont want
  to make the scene too bright or too dark
- Since area lights realistically are sensitive for distance (quadratic), the
  effect it has is quickly too much, or too less. For this the "Dist" value
  in Lamp can be used. Set it at Dist=10 to have reasonable light on distance
  10 Blender units (assumed you didnt scale lamp object).
- I tried square sized specularity, but this looked totally weird. Not
  committed
- Plan is to extend area light with 3d dimensions, boxes and cubes.
- Note that area light is one-sided, towards negative Z. I need to design
  a nice drawing method for it.

Area Shadow

- Since there are a lot of variables associated with soft shadow, they now
  only are available for Area lights. Allowing spot & normal lamp to have
  soft shadow is possible though, but will require a reorganisation of the
  Lamp buttons. Is a point of research & feedback still.
- Apart from area size, you now can individually set amount of samples in
  X and Y direction (for area lamp type 'Rect'). For box type area lamp,
  this will become 3 dimensions
- Area shadows have four options:
  "Clip circle" : only uses a circular shape of samples, gives smoother
  results
  "Dither" : use a 2x2 dither mask
  "Jitter" : applys a pseudo-random offset to samples
  "Umbra" : extra emphasis on area that's fully in shadow.

Raytrace speedup

- improved filling in faces in Octree. Large faces occupied too many nodes
- added a coherence check; rays fired sequentially that begin and end in
  same octree nodes, and that don't intersect, are quickly rejected
- rendering shadow scenes benefits from this 20-40%. My statue test monkey
  file now renders in 19 seconds (was 30).

Plus:

- adjusted specular max to 511, and made sure Blinn spec has again this
  incredible small spec size
- for UI rounded theme: the color "button" displayed RGB color too dark
- fixed countall() function, to also include Subsurf totals
- removed setting the 'near' clipping for pressing dot-key numpad
- when you press the buttons-window icon for 'Shading Context' the context
  automaticilly switches as with F5 hotkey

Please be warned that this is not a release... settings in files might not
work as it did, nor guaranteed to work when we do a release. :)
2003-12-29 16:52:51 +00:00
Robert Wenzlaff 85ae21d5dd Commit of cursor framework. Cursors now defined in source/blender/src/cursors.c and
source/blender/include/BIF_cursors.h.  Allows large cursors on Win32 and X11.
See cursors.c for documentatioin on how to use.
2003-12-26 20:12:42 +00:00
Ton Roosendaal 8fbff1a3b7 - Fresnel V4.0
Based on feedback (thnx phase!) I found a big disadvantage of the 'real'
fresnel formula. It doesnt degrade to 0.0, causing 2-3 times too many
rays being fired compared to the previous one. So; a lot slower.

Now committed is a hybrid which allows (close to) real, and nice artistic
freedom, *and* it really goes to 0.0 and 1.0, assisting nicely in optimal
render times.
A real doc how it works (with pics) will be made before real release.

- Fixed bug in raytrace: the first renderpass didn't use fresnel for mirror.
- Fixed bug in previewrender, now it closer matches how fresnel renders
2003-12-23 22:31:48 +00:00
Ton Roosendaal 454166026a - another fresnel improvement. :)
At last irc meeting, eeshlo pointed to an error in the code. It didn't
  use the IOR value correctly. This has been solved. So how it works now:
  - the IOR button value influences (very subtle) the fresnel effect.
    Only for realism diehards.
  - the Fresnel value (slider) now denotes the power in the function
    rf + (1-rf) * (1-c)^5
    where rf= rf = ((ior-1)/(ior+1))^2
    and c the dot-product ray/normal.
  - so, set the slider at '5' and you have real fresnel. Lower values
    for interesting artistic effects.

- put back the forgotten code for gaussian corrected sampling during
  antialising render. Normally, each sub-pixel sample in Blender counts
  equally, and together make up the pixel color.
  With 'Gauss' option set (F10 menu) each sub-pixel sample creates a small
  weighted mask with variable size, which (can) affect neighbouring pixels
  as well. The result is smoother edges, less sensitive for gamma, and
  well suited to reduce motion-aliasing (when things move extreme slow).
  This is result of *long* period of research in NeoGeo days, and based on
  every scientific sampling/reconstructing theory we could find. Plus a
  little bit of our selves. :)

- I should write once how blender constructs Jitter tables for sub-sampling.
  this is a very nice method, and superior to normal block filter or random
  jittering... time!
2003-12-22 22:27:51 +00:00
Ton Roosendaal ec99255c27 Phew, a lot of work, and no new features...
Main target was to make the inner rendering loop using no globals anymore.
This is essential for proper usage while raytracing, it caused a lot of
hacks in the raycode as well, which even didn't work correctly for all
situations (textures especially).

Done this by creating a new local struct RenderInput, which replaces usage
of the global struct Render R. The latter now only is used to denote
image size, viewmatrix, and the like.

Making the inner render loops using no globals caused 1000s of vars to
be changed... but the result definitely is much nicer code, which enables
making 'real' shaders in a next stage.
It also enabled me to remove the hacks from ray.c

Then i went to the task of removing redundant code. Especially the calculus
of texture coords took place (identical) in three locations.
Most obvious is the change in the unified render part, which is much less
code now; it uses the same rendering routines as normal render now.
(Note; not for halos yet!)

I also removed 6 files called 'shadowbuffer' something. This was experimen-
tal stuff from NaN days. And again saved a lot of double used code.

Finally I went over the blenkernel and blender/src calls to render stuff.
Here the same local data is used now, resulting in less dependency.
I also moved render-texture to the render module, this was still in Kernel.
(new file: texture.c)

So! After this commit I will check on the autofiles, to try to fix that.
MSVC people have to do it themselves.
This commit will need quite some testing help, but I'm around!
2003-12-21 21:52:51 +00:00
Ton Roosendaal 0060be6603 More render stuff:
- added 'Mapping to" channel "RayMirror", to control mirror with texture
- fixed bug in using mirror-rgb as texture channel... this is cumbersome
  because it is abused by Envmap in a not nice way. Fixing the abuse will
  cause compatibility errors, which can be fixed when we up release # to
  2.32.

- added "Translucency", which is nothing else than allowing another
  shading pass for the backside of a face (with normal inverted). This
  is interesting for all kinds of situations where you want light from
  behind to 'shine through'. Also works to reduce dark areas in
  unlighted parts of rendering transparent faces. Light from behind on
  transparent red window should make it glowing some, right?!
- added texture channel for this as well

- Reorganized Material Panels to reveil some consistancy where buttons
  can be found. Not perfect yet, but at least all options for Shaders and
  options for Mirror & Transparency now are together.
  This gives some space in Shader Panel for nice expansion.
2003-12-19 15:23:12 +00:00
Ton Roosendaal cb20f1cdb4 another trace commit
- implemented tracing of transparency for shadows. This is a material
  option, in the new RayTrace panel.
  it only traces color and alpha, not shading. So the results of some
  transparant colored unlit faces can look odd. I will look onto that.
- changed fresnel formula (got hint from eeshlo!). this simplifies the UI,
  now only one button needed. The fresnel value "should" be identical as
  the refraction index, but that is booooring! So i added a special fresnel
  refraction slider for both mirroring and transparency. By setting all 3
  sliders equal, you get 'realism'.
- fresnel for transparancy works for Ztra rendering too. Same for transpa-
  rent shadow. But then you need to set 'ray' on in F10 menu.
- uploaded new monkey_glass blend in download.blender.org/demo/test/

Next stage: killing the globals from render, and implement "translucency"
which is effectively allowing faces being lit from behind, as paper or
cloth.
2003-12-18 21:34:48 +00:00
Ton Roosendaal 97d4dbc9c3 Another commit for raytracing, now with glass refraction & fresnel!
Changelog:

- enable refraction with button "Ray Transp" in Material buttons.
- set "Angular Index" value for amount of refraction.
- use the "Alpha" value to define transparency.
- remember to set a higher "Depth" too... glass can bounce quite some
  more than expected.
- for correct refraction, 3D models MUST have normals pointing in the
  right direction (consistently pointing outside).
- refraction 'sees' the thickness of glass based on what you model. So
  make for realistic glass both sides of a surface.

- I needed to do some rewriting for correct mirroring/refraction,
  especially to prevent specularity being blended away.
  Solved this with localizing shading results in the rendercore.c.
  Now specularity correctly is added, and reduces the 'mirror' value.
- Localizing more parts of the render code is being planned. The old
  render heavily relies on struct Render and struct Osa to store globals.
  For scanline render no problem, but recursive raytracing dislikes that.

- done test with gamma-corrected summation of colors during tracing, is
  commented out still. But this will give more balanced reflections. Now
  dark reflections that are reflected in a bright surface seem incorrect.

- Introduced 'Fresnel' effect for Mirror and Transparency. This
  influences the amount of mirror/transparency based at viewing angle.
  Next to a new Fresnel slider, also a 'falloff' button has been added to
  define the way it spreads.
- Fresnel also works for Ztransp rendering

- created new Panel for Raytrace options
  I have to evaluate still where it all should be logically located.
- material preview shows fake reflection and fake refraction as well.
2003-12-16 14:12:01 +00:00
Chris Want 356cf79534 OK, My turn to break things ...
The maximum vertex count for a mesh has been raised from 65000 to
2000000000L (yep, 2 billion!).

Please test!

Chris
2003-12-16 01:27:37 +00:00
Willian Padovani Germano 49021f7ec4 BPython - first step for better integration of Python in Blender:
- add a new space: Space Script
- add a new dna struct: Script
- add these two properly everywhere they are meant to

It's not a tiny commit, but most of it is ground work for what is still to be done.
Right now the benefits should be: freeing the Text Editor to be used in a window even while a script w/ gui in "on" and letting more than one currently running script w/ gui be accessible from each window

Some files are added, so some build systems (not autotools) will need updates
2003-12-14 01:18:09 +00:00
Ton Roosendaal a18cc02374 - Xmas special: shiny mirroring bells & whistles!
This is a revision of the old NeoGeo raytracer, dusted off, improved quite
a lot, and nicely integrated in the rest of rendering pipeline.
Enable it with F10-"Ray", and set either a 'ray-shadow' lamp or give the
Material a "RayMirror" value.
It has been added for 2 reasons:
- get feedback on validity... I need artists to play around with it if it's
  actually useful. It still *is* raytracing, meaning complex scenes will
  easily become slow.
- for educational purposes. All raytracing happens in ray.c, which can be
  quite easily adjusted for other effects.

When too many disasters pop up with this, I'll make it a compile #ifdef.
But so far, it seems to do a decent job.

Demo files: http://www.blender.org/docs/ray_test.tgz
An article (tech) about how it works, and about the new octree invention
will be posted soon. :)

Note: it doesn't work with unified render yet.
2003-12-10 20:41:53 +00:00
Ton Roosendaal 4347b1a752 - fix: keys couldnt have more than 32k vertices. Just made a short into an
int in the key struct.
  warn: this recompiles dna!
2003-11-19 17:07:17 +00:00
Alexander Ewering 79f753531e - Fixes hidden vertices for undo. They are now stored in mvert->flag and
thus also preserved over exiting/entering editmode (is this desirable?)
  Can be turned off easily ...

- "Half-fixes" lost UV info problem with undo. I couldn't get it to
  crash or lose UV info anymore, but we now have a memory leak (me->tface).

  Ton, please check this!
2003-11-19 16:21:37 +00:00
Ton Roosendaal d8f8605098 - Bug fix: at osx, default AA font couldnt be written in .b.blend
(unless you manually install font)
- Bug fix: string for AA font was only 64 chars... made 256.

- Changed API for buttons aligning... it now detects automatic what rows
  are, or collums, and aligns buttons. This makes call easier:
  uiBlockBeginAlign(block);
  ... defBut....
  uiBlockEndAlign(block);
  Only works when you provide buttons in row order!
- made sure only 'rounded' theme uses this align stuff
- still work in progress.. I commit now because I leave to denmark for 2 days!

http://www.blender.org/bf/rt.jpg  <- now also groups with rows+collums
2003-11-14 15:49:26 +00:00
Martin Poirier baf23c7648 Fixed the lag with Follow Path and optimized constraint loops with Track To and Lock Track. I was plainly disabling the refresh of the target, but that caused a lag (3D window, not Render). Now, it raises a flag when it find a loop, so it only disables the refreshing when it needs to.
This is a temporary fix, but a complete fix will require a rewrite of of some part of the where_is_object function, and that would take too much time before 2.31.
2003-11-13 23:04:46 +00:00
Ton Roosendaal 2ffb2376e0 - bug fix #694
when using linked-duplicated mesh, with subsurf and tfaces (UV texture)
  the render crashed.
  Found out the renderloop makes a new displaylist for each Mesh, also when
  it is linked multiple times. That way pointers to previous created elements
  in displaylists become invalid. Crash!
  Result now it even renders faster for linked-duplis. :)
2003-11-13 12:44:34 +00:00
Ton Roosendaal f3a809b09f - made option for auto open toolbox on left/mouse hold.
standard starts with 0.5 sec. Turn the threshold value up to effectively
  disable it when you dislike it. But give it a try!
- added 'Home' after splitting window for buttonswindow
2003-10-29 01:10:10 +00:00
Ton Roosendaal 4bec8ba7d5 Fixing loose ends:
- nkey menu for buttonswindow (hex values) couldnt be restored yet, is
  for next release
- replaced Nkey in IpoWindow with Panel, this now displays the buttons
  that were formerly in 'anim buttons' as well; to view the boundbox
  values of all visible curves, and adjust it.
- the new panel also has the 'set speed' option, fixed stuff in it and
  added better errorwarning... still not a very well coded tool!
2003-10-28 14:20:03 +00:00
Ton Roosendaal 41545885b8 - added a 'collapse pulldown' icon to all headers that have it
- narrowed the space icon takes, looks pretty
- the status (pulldown or not) is now stored locally per window, it was
  global flag in user settings.
2003-10-27 13:23:48 +00:00
Ton Roosendaal 9ea73362ae New feature!
You now can adjust the way the default 'solid opengl' drawing happens.
It provides three lights now, all still located around your viewpoint.
In the UserSettings menu you can set them on/off, give location and
color / specularity.

Very nice to enhance modeling in solid drawmode :)

By default blender starts with 2 lights on now, but this is something we
can define in the default .b.blend later on.
2003-10-25 16:53:50 +00:00
Ton Roosendaal 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
Martin Poirier 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
Ton Roosendaal 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
Ton Roosendaal 7f5d06d638 Another mega commit... loadsof restructure, and a pretty good one! :)
- changed the BIF_DrawString() function. it used to work different for
  AA fonts  as for default fonts. Now it's identical. Setting color for fonts
  can just be done with OpenGL, for both font types.
  Removed: BIF_DrawStringRGB()
- added theme color options for Buttons
- recoded DefButton, so it automatically chooses the right color.
- had to remove a 1000 uiBlockSetCol() calls for that reason...
- uiBlockSetCol() still works, to override automatic color

- removed entirely the silly old color system (BIFColorID). All color
  calls can now be done with a BIF_ThemeColor() call, including fonts and
  buttons and opengl stuff

- all buttons in button header have headercolor by default

- recoded drawing icons, it was a really bad & old loop doing manually
  colorshading and blending... which was per pixel a load of code!
  Now it uses a single OpenGL call to blend or colorize. Quite faster!
- (as test, for review) icons don't colorize anymore with button color,
  but have a different alpha to blend in (when not active)


- recoded the entire interface_draw.c file...:
- drawing buttons is separated in three parts:
  1. main drawing function for text and icons
  2. free definable callback for button itself
  3. free definable callback for slider
- removed a load of redundant code for this!
- coded a minimal theme, and adjusted Matt's buttons to match new
  callback system

- adding new drawing themes is piece of cake now
- for coders, default 'themes' to be aware of:
  UI_EMBOSS : the themable drawing style
  UI_EMBOSSP: the pulldown menu system (apart from color not themable)
  UI_EMBOSSN: draw nothing, only text and/or icon
  UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa
  this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call.

TODO: make UI API call for button alignment

(plus removed another series of warnings from code...)

Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
2003-10-20 15:40:20 +00:00
Robert Wenzlaff 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
Ton Roosendaal a9af685011 - further work on theme colors:
- panels work
  - ipo window done
  - buttonswindow done

Please be warned that saving  Themes now wont work... it will also save
BLACK for all uninitalized colors... so dont panic when you see weird
things, just go back the default theme and copy a new one.
2003-10-17 23:18:18 +00:00
Ton Roosendaal 58a0811ad9 - fixed bug in windows with extreme small height... it didnt accept
input
- was needed for usage of this windowtype (headerless) as 'timeline'
  dragger, which was supposed to be...
- as extra I fixed 'home', it sets start/end frame for sound window
- at mouselocation the current frame or time is printed
- rightmouse menu switches seconds/frames (should be in header as option...)
- displaybutton 'frs/sec/' updates soundwindow too

So, its not perfect... but try opening a tiny high headerless audio
window on top of buttonswin or somewhere full width. not bad...
2003-10-17 19:03:53 +00:00
Ton Roosendaal 0321602b65 - The basic layer for Themes in place!
- currently only implemented for 3d window
- create as many themes you like, and name them
- default theme is not editable, and always will be defined at startup
  (initTheme)
- saves in .B.blend
- themes for spaces can become local too, so you can set individual
  3d windows at theme 'Maya' or so. (to be implemented)
- it uses alpha as well...!

API:
This doesnt use the old method with BFCOLORID blahblah. The API is copied
from OpenGL conventions (naming) as much as possible:

- void BIF_ThemeColor(ScrArea *sa, int colorid)
  sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc)

- void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset)
  sets a color with offset, no more weird COLORSHADE_LGREY stuff

- void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col)
  like opengl, this gives you in *col the three rgb values

- void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col)
  or the one to get 4 bytes

ThemeColor calls for globals (UI etc) can also call NULL for *sa... this
is to be implemented still.

Next step: cleaning up interface.c for all weird colorcalls.
2003-10-17 14:02:08 +00:00
Ton Roosendaal 5d1438ad96 - fixed editing vertices again!
I had to clean up very old calls to switch matrices for 3d windows.
To make it more clear, I've introduced defines for the infamous persp()
function:

persp(PERSP_WIN);  sets matrices at pixel level window
persp(PERSP_VIEW); restores matrices back to 3d drawing
persp(PERSP_STORE); only called once, to store correct matrices

I will now check on frontbuffer drawing of vertices... it's very doubtful
if it's used still correctly, was only meant for visual speed in the
early nineties you know. :)
2003-10-16 09:39:19 +00:00
Ton Roosendaal c7618783fb - further work on view3d panels:
- you can close them (x icon) or press ESC
- option to open panel at mouse location (try Nkey)
- using 'collapse' (triangle icon) stows header in bottom
- opening again restores at old location
- dragging panels or zooming clips nicely with window

evaluate: an 'auto close' when mouse goes outside panel

Warning: vertex selecting still broken! :) It's 2 am now, bedtime...
2003-10-16 00:17:24 +00:00
Ton Roosendaal 6480956c58 - expanded internal windowmanager that it allows button panels in any
window (type)
- each SpaceData struct (not the window!) can get 'block handlers'
  assigned, basically event codes that invoke drawing button panels.
- this is saved in files, and Panels behave in any window like it does now
  in buttonswindow
- it also means that a 'space window' should leave with a matrix set for
  buttons level
- try it in view3d header menu, 'view'->'backdrop'. this opens the old
  viewbuttons
- it all works non blocking! instant updates of viewbuttons visible in
  3d window now.

Not done yet:
- checking and fixing frontbuffer drawing (select a wireframe draws over)
- temporally vertices cannot be selected, is my next project
- closing or hiding Panels...
- styling stuff... i committed for others to review as well.

Have fun. this is certainly a huge improvement over the old viewbuttons!
2003-10-15 12:26:26 +00:00
Ton Roosendaal 4629da0ffa - fixed threshold for merging closed Panels (was not sufficient narrow)
- in 'Horizontal Align' mode, Panels now close as a vertical bar
- switching align modes, also switches how closed Panels are drawn
- opengl nor ftgl support vertical string drawing... so for now it only
  draws the capitals of the Panel title in a horizontal collapsed header
2003-10-14 10:45:35 +00:00
Ton Roosendaal 44b32134ae - converted constraint buttons, they're a Panel in Object main menu
- converted sound buttons, part of Scene
- special request Matt: headers of windows 2 pixels higher! (test)
- special request Stefano: icons instead of menu for buttons-header
- 'data browse' buttons now almost all in buttonswindow.
- almost all buttons have been panelized now.

next stage: cleaning up usage of color in Blender, to allow presests!
2003-10-13 23:46:08 +00:00
Ton Roosendaal 5f6d8e59c4 - Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
- Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
2003-10-12 13:58:56 +00:00
Ton Roosendaal 0d03929b9b Another huge commit!!!
First, check on the new files, which are listed below.
The new butspace.h is a local include, only to be used for the buttons
drawn in the buttonswindow.

- editbuts, animbuts, gamebuts, displaybuts, paintbuts,  work now
- i quite completely reorganized it, it's now nicely telling you what
  context it is in
- sorting error in panel align fixed (tabs were flipping)
- align works correctly automatic when you click around in Blender
- editsca.c renamed to buttons_logic.h
- button names are truncated from the right for allmost all buttons
  (except text buttons and number buttons)
- while dragging panels, you cannot move them outside window anymore

And of course fixed loads of little bugs I encountered while testing
it all. This is a version I really need good test & feedback for.

Next step: restoring material/lamp/texture/world
2003-10-10 17:29:01 +00:00
Ton Roosendaal 416b110f90 - brought back hilites in buttons when mouse-over
- automatic pulldown opening can now be controlled ( user setting?)
  it has two thresholds:
  - when no menu was opened before, it waits A milliseconds
  - when (in the same block a menu was opened, it waits B millisec.
  Currently A= 0.4 sec, B= 0.1 (or so)
- 3d window header; brought back old drawtype menu (test, compare!)
- another test: the old menubutton doesnt work anymore with hold-mouse
  only, you can also use it as the other popups (old method still works)
- proposal; all buttons that pop up a block, get special drawtype (arrows)
2003-10-07 22:55:16 +00:00
Ton Roosendaal 336afad8d6 - added little original feature to panels: TABS! :)
while dragging you can merge panels, or while dragging on a tab you
  can unmerge them.
2003-10-05 13:19:08 +00:00
Ton Roosendaal 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
Ton Roosendaal d8955d1b33 - Recursive environment map render
Multiple environments now can be rendered in one pass. Previously the other objects with environment maps didn't show up in a reflection. Like this:
http://www.blender.org/bf/dep.jpg

By default, Blender renders now this result:
http://www.blender.org/bf/dep0.jpg

For a further 'recursive ray-tracing effect' you can give each EnvMap texture a higher "Depth" value. Here is a result with depth set at '2':
http://www.blender.org/bf/dep2.jpg

Related new options:
- in (F10) DisplayButtons, environment map rendering can be turned on and off.
- in EnvMap texture buttons you can free all environment maps
- Environment map sizes are also reduced with the (F10) 'percentage' option.

Tech note: with this commit the VlakRen struct has on *ob pointer!
2003-09-23 21:05:51 +00:00
Jiri Hnidek 5d2f98f440 - improved polygonization (linear interpolation) of Implicit Surfaces (Meta)
- added new MetaElem types (plane, elipsoid and cube) old TubeX, TubeY and TubeZ will not be supported
- new buttons in Edit button window (dx, dy, dz)
- added new items into the headers menu and toolbox menu

more details at: http://blender.webpark.cz
2003-09-05 13:54:22 +00:00
Ton Roosendaal 470b5c0366 So, for the platform managers to check:
- the link order for Blender has changed, the libradiosity.a has to be moved after the librender.a (obviously for a new dependency!). Check blender/source/Makefile
- there's a new file: blender/source/radiosity/intern/source/radrender.c

Here's what the new code does:

Using the core routines of the Radiosity tool, each renderface with 'emit material' and each renderface with 'radio material flag' set will be used to itterate to a global illumination solution. Per face with high energy (emit) little images are rendered (hemicubes) which makes up lookup tables to 'shoot' its energy to other faces.
In the end this energy - color - then is directly added to the pixel colors while rendering, Gouraud shaded.
Since it's done with renderfaces, it works for all primitives in Blender.

What is doesn't do yet:
- take into account textured color of faces. Currently it uses the material RGB color for filtering distributed energy.
- do some smart pre-subdividing. I don't know yet if this is useful... Right now it means that you'll have to balance the models yourself, to deliver small faces where you want a high accuracy for shadowing.
- unified render (is at my todo list)

User notes:
- per Material you want to have included in radiosity render: set the 'radio' flag. For newly added Materials it is ON by default now.
- the Ambient slider in Material controls the amount of radiosity color.
- for enabling radiosity rendering, set the F10 "Radio" button.
- the Radiosity buttons now only show the relevant radiosity rendering options. Pressing "collect meshes" will show all buttons again.
- for meshes, the faces who use Radio material always call the 'autosmooth' routine, this to make sure sharp angles (like corners in a room) do not have shared vertices. For some smooth models (like the raptor example) you might increase the standard smoothing angle from 30 to 45 degree.

Technical notes:
- I had to expand the renderface and rendervertices for it... shame on me! Faces have one pointer extra, render vertices four floats...
- The size of the hemicubes is now based at the boundbox of the entire scene (0.002 of it). This should be more reliable... to be done
- I fixed a bug in radiosity render, where sometimes backfaces where lit

In general:
I'd like everyone to play a bit with this system. It's not easy to get good results with it. A simple "hit and go" isn't there... maybe some good suggestions?
2003-08-31 20:33:46 +00:00
Ton Roosendaal aa9f2a5733 - saves the 'draw faces' flag in a file, in fact the entire G.f flag.
WARN: this recompiles other stuff too, outside of the loader. be sure
  to 'make' in source/blender/ or a higher dir.
2003-07-21 19:41:07 +00:00
Chris Want cf495e6655 Support for using the action window as a tool for modifying
(mesh or lattice) RVK IpoCurves: support currently includes:

	- RVK sliders. Pressing the little triangle next to
	  the word 'sliders' in the channel names opens them up.
	- NKEY in the area where the key block names are allows the
	  user to change the name of the keyblock, and the max and min
	  values of the RVK sliders.
	- ability to visualize the keyframes for the IpoCurves when
	  the object is selected.
	- right mouse can be used to select the keys
	- border select in the main area can be used to border
	  select keys.
	- AKEY selects/deselects all of the keys
	- GKEY and SKEY can be used to grab or scale the key
	  selections.
	- XKEY deletes the selected keys.
	- DKEY duplicated the selected keys.
	- VKEY, HKEY and shift-HKEY change the bezier handles for
	  the selected keys.

Please, please, please test!
2003-07-20 23:04:09 +00:00
Ton Roosendaal 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
Ton Roosendaal 9bf630a1f3 WARNING: with makefiles I could not get a stable blender compiled.
do a make clean in source/blender/ to be sure!

- Included the new shaders from Cessen... well, only the shader calls
  themselves. To make sure the shaders work I nicely integrated it

- MaterialButtons: layout changed a bit, but still resembles the old
  layout. The 'shader' options now are located together.

- Shaders are separated in 'diffuse' and 'specular'. You can combine them
  freely.

- diffuse Lambert: old shader
  diffuse Oren Nayar: new shader, gives sandy/silky/skinny material well
  diffuse Toon: for cartoon render

- specular Phong: new spec, traditional 70ies spec
  specular CookTorr: a reduced version of cook torrance shading, does
                     off specular peak well
  specular Blinn: new spec, same features as CookTorr, but with extra
                  'refraction' setting
  specular Toon: new spec for cartoon render

- default blender starts with settings that render compatible!

- works in shaded view and preview-render

- works in unified render

Further little changes:

- removed paranoia compile warnings from render/loader/blenlib

- and the warnings at files I worked at were removed.
2003-07-19 20:31:29 +00:00
Wouter van Heyst 4f27386740 Commit message and the brunt of the code courtesy of intrr, apologies for the
size of this;


Finally, the Sequencer audio support and global audio/animation sync stuff!
(See http://intrr.org/blender/audiosequencer.html)

Stuff that has been done:

./source/blender/blenloader/intern/writefile.c
./source/blender/blenloader/intern/readfile.c

Added code to make it handle sounds used by audio strips, and to convert
Scene data from older (<2.28) versions to init Scene global audio settings
(Scene->audio) to defaults.

./source/blender/include/BSE_seqaudio.h
./source/blender/src/seqaudio.c

The main audio routines that start/stop/scrub the audio stream at
a certain frame position, provide the frame reference for the current
stream position, mix the audio, convert the audio, mixdown the audio
into a file.

./source/blender/makesdna/DNA_sound_types.h

Introduced new variables in the bSound struct to accomodate the sample
data after converted to the scene's global mixing format (stream, streamlen).
Also added a new flag SOUND_FLAGS_SEQUENCE that gets set if the Sound
belongs to a sequence strip.

./source/blender/makesdna/DNA_scene_types.h

Added AudioData struct, which holds scene-global audio settings.

./source/blender/makesdna/DNA_sequence_types.h

Added support for audio strips. Some variables to hold Panning/Attenuation
information, position information, reference to the sample, and some flags.

./source/blender/makesdna/DNA_userdef_types.h
./source/blender/src/usiblender.c

Added a "Mixing buffer size" userpref. Made the versions stuff initialize
it to a default for versions <2.28.

./source/blender/makesdna/DNA_space_types.h
./source/blender/src/filesel.c

Added a Cyan dot to .WAV files. Any other suggestions on a better color? :)

./source/blender/src/editsound.c

Changes (fixes) to the WAV file loader, re-enabled some gameengine code that
is needed for dealing with bSounds and bSamples.

./source/blender/src/editipo.c
./source/blender/src/drawseq.c
./source/blender/src/editnla.c
./source/blender/src/space.c
./source/blender/src/drawview.c
./source/blender/src/renderwin.c
./source/blender/src/headerbuttons.c

 - Created two different wrappers for update_for_newframe(), one which scrubs
   the audio, one which doesn't.
 - Replaced some of the occurences of update_for_newframe() with
   update_for_newframe_muted(), which doesn't scrub the audio.
 - In drawview.c: Changed the synchronization scheme to get the current audio
   position from the audio engine, and use that as a reference for setting
   CFRA. Implements a/v sync and framedrop.
 - In editipo.c: Changed handling of Fac IPOs to be usable for audio strips as
   volume envelopes.
 - In space.c: Added the mixing buffer size Userpref, enabled audio scrubbing
   (update_for_newframe()) for moving the sequence editor framebar.

./source/blender/src/editseq.c

Added support for audio strips and a default directory for WAV files which
gets saved from the last Shift-A operation.

./source/blender/src/buttons.c

Added Scene-global audio sequencer settings in Sound buttons.

./source/blender/src/sequence.c

Various stuff that deals with handling audio strips differently than
usual strips.
2003-07-13 20:16:56 +00:00
Ton Roosendaal 1323315937 - associated .h file change for previous commit (bug #152).
plus added a warning in screen_types.h. Some wierd person
  thinks ENUM is nice? It's dangerous! ;-)
2003-06-27 15:29:36 +00:00
Ton Roosendaal a0ea4df1ba - added reference to genfile.c instructions 2003-06-23 12:28:20 +00:00
Chris Want 924a849755 Support for building bf-blender under windows with gcc (huge thanks to
Florian Eggenburger).

Full instructions are in doc/README.windows-gcc.

Main differences from Florian's patch:

- the 'lib' dir should now be the same level as the 'blender' dir (rather
than being a subdir of 'blender'). This is consistent with the other
platforms that bf-blender supports (tuhopuu will also adopt this convention
hopefully soon).

- the script 'free_windows-env.mk' is no longer needed ... see the
docs about how this is overcome (again, tuhopuu will hopefully
also follow this route soon).

- the dlltool dir has it's own Makefile that builds all of the
needed stub libraries from the dll's in cvs.
2003-05-24 20:04:37 +00:00
Rob Haarsma 9662763ee0 Updated Quicktime code so settings can be stored in the blendfile.
This enables Blender to;
- have scenes with different codec settings. (same as avicodec)
- render directly without dialog.
- batch/background render to Quicktime movies.

Only tested on windows. ;)
2003-05-21 01:21:07 +00:00
Kent Mein 6f19051502 Slightly Modified version of Kester Maddock's Lamps patch to up the
max from 256 to 32766.

I removed the duplicate define and updated the files that needed it.

Kent
2003-05-20 17:09:55 +00:00
Rob Haarsma 331eb81e09 modified so .Blanguages and .bfont get loaded from .blender dir.
the path to the selected ui font gets stored in the U.fontdir userprefs.
fixed a fullscreen thingie for windows.
2003-05-12 14:23:03 +00:00
Rob Haarsma 5756d0e1bd modified userprefs layout.
modified linenumber display.

for Win32:
added display of framenumber in titlebar of animwindow.
added userpref that enables all codecs for rendering.
2003-05-11 23:28:32 +00:00
Rob Haarsma fe05ca64f2 fixed a (wn32 avi) codec issue when adding an Empty scene.
added ttc and otc to the list of font extensions.
2003-05-11 15:44:23 +00:00
Rob Haarsma ad0bf55843 added a fullscreen button in the top header (windows only)
written by Florian Eggenberger.
2003-05-08 16:24:58 +00:00
Rob Haarsma b43473e425 Multilingual interface support added.
All modifications are behind compileflag INTERNATIONAL,
and affect these two directories; source/blender/src and
source/blender/ftfont.

Thanks to philipp, a new utf8towchar() function is added
to Shizu's work, which fixes the international support for
OSX. It also makes the iconv library obsolete. This means
all translation files (blender.mo) need to be 'recoded' to
UTF-8, and language support in the fileselect window and
the text editor is not possible. Iconv might be added in
the future to enable these features.
2003-05-03 12:17:11 +00:00
Rob Haarsma 52f6a630ce Added rename/delete popups to the file and imageselect windows.
Redesigned the userpreference window layout. (not finished yet)

Enhanced the texteditor with; a rightmousemenu, clipboard text
support (for windows !) and the alt-m keystroke generates a 3d
text object. (up to 1000 characters)

(1, 2, 3, 4 and 7 from http://www.tncci.com/blender/feats.html)
2003-04-28 11:17:21 +00:00
Rob Haarsma 706ccc0401 Added Quicktime support for OSX and Windows.
This code allows you to load Quicktime images and movies as textures
and render animations to Quicktime movies.
Note that the selected output codec is *not* saved in the blendfile.

To enable Quicktime functionality you need the SDK from Apple:
OSX: ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Mac.hqx
Win: ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Win.hqx
Add the \QTDevWin\CIncludes and \QTDevWin\Libraries directories
from this SDK to your build environment.

Enable the WITH_QUICKTIME compile flag in the following directories:
bf\blender\source\blender\imbuf
bf\blender\source\blender\src
bf\blender\source\blender\render
bf\blender\source\creator
2003-04-28 02:15:46 +00:00
Ton Roosendaal 0b2b5dbfb9 More translations of c comments, now also include files! 2003-04-27 11:55:33 +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
Wouter van Heyst a6a50cc27f Left over generated cruft, time to go 2003-03-24 00:15:20 +00:00
Rob Haarsma d8a909905b added filetype for python (.py) scripts 2003-02-06 14:03:51 +00:00
Stefan Gartner 4709eced07 added simple shaded+wire and solid+wire drawmodes. It basically draws
the wireframe after drawing the model in solid/shaded/textured mode.
The user can set this per object using the "Wire" button in the
edit buttons window.
2003-02-01 08:25:09 +00:00
Rob Haarsma e785342319 added mousewheel support part 2 2003-01-28 11:14:38 +00:00
Chris Want 9ca562765b Added x-ray bones support (sgefant ended up
doing the bulk of the work when he added the button).
The new x-ray button is added in the edit buttons when
the armature is selected. (suggested by ztonzy)
2003-01-28 05:16:41 +00:00
Rob Haarsma 5d93519fbc added showlinenrs variable to spacetext 2003-01-23 16:39:17 +00:00
Stefan Gartner 707dfe1c38 added two accidentally deleted #'s (without them makesdna wouldn't work
properly)

sgefant
2002-12-27 21:14:32 +00:00
Kent Mein f1c4f705a1 Removed the config.h thing from the .h's in the source dir.
So we should be all set now :)

Kent
--
mein@cs.umn.edu
2002-12-27 13:11:01 +00:00
Stefan Gartner 87e588d4c9 compile and run source/blender/makesdna/intern/makesdna to (re)create
source/blender/makesdna/intern/dna.c

This should fix the segfault at startup for non-x86 systems (tested on
linux/ppc and linux/x86). I would be glad if someone could check
if it works on other systems as well.

sgefant
2002-12-10 23:55:59 +00:00
Kent Mein 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
Kent Mein b9a19f1ea7 Did all of the .h's in source
(adding)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

also the Makefile.in's were from previous patch adding
the system depend stuff to configure.ac

Kent
--
mein@cs.umn.edu
2002-11-25 11:16:17 +00:00
Kent Mein 01bff70383 fixed spacing in the headers to get rid of some warnings and some other
little minor spacing issues.
2002-10-30 02:07:20 +00:00
Kent Mein d063311b08 Fixed defined __sparc to also check for __sparc__ (thanks to Ferris) 2002-10-29 21:55:52 +00:00
Hans Lambermont 12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00