2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* $Id$
|
|
|
|
*
|
2008-04-17 00:40:48 +02:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2008-04-17 00:40:48 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
2008-04-17 00:40:48 +02:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2002-10-12 13:37:38 +02:00
|
|
|
*/
|
|
|
|
#ifndef DNA_SCENE_TYPES_H
|
|
|
|
#define DNA_SCENE_TYPES_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "DNA_vec_types.h"
|
|
|
|
#include "DNA_listBase.h"
|
|
|
|
#include "DNA_scriptlink_types.h"
|
|
|
|
#include "DNA_ID.h"
|
|
|
|
#include "DNA_scriptlink_types.h"
|
|
|
|
|
|
|
|
struct Radio;
|
|
|
|
struct Object;
|
|
|
|
struct World;
|
|
|
|
struct Scene;
|
|
|
|
struct Image;
|
|
|
|
struct Group;
|
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
2006-01-23 23:05:47 +01:00
|
|
|
struct bNodeTree;
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
typedef struct Base {
|
|
|
|
struct Base *next, *prev;
|
|
|
|
unsigned int lay, selcol;
|
|
|
|
int flag;
|
|
|
|
short sx, sy;
|
|
|
|
struct Object *object;
|
|
|
|
} Base;
|
|
|
|
|
|
|
|
typedef struct AviCodecData {
|
2006-02-05 20:18:55 +01:00
|
|
|
void *lpFormat; /* save format */
|
|
|
|
void *lpParms; /* compressor options */
|
|
|
|
unsigned int cbFormat; /* size of lpFormat buffer */
|
|
|
|
unsigned int cbParms; /* size of lpParms buffer */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
unsigned int fccType; /* stream type, for consistency */
|
|
|
|
unsigned int fccHandler; /* compressor */
|
|
|
|
unsigned int dwKeyFrameEvery; /* keyframe rate */
|
|
|
|
unsigned int dwQuality; /* compress quality 0-10,000 */
|
|
|
|
unsigned int dwBytesPerSecond; /* bytes per second */
|
|
|
|
unsigned int dwFlags; /* flags... see below */
|
|
|
|
unsigned int dwInterleaveEvery; /* for non-video streams only */
|
|
|
|
unsigned int pad;
|
2003-05-11 17:44:23 +02:00
|
|
|
|
|
|
|
char avicodecname[128];
|
2002-10-12 13:37:38 +02:00
|
|
|
} AviCodecData;
|
|
|
|
|
2003-05-21 03:21:07 +02:00
|
|
|
typedef struct QuicktimeCodecData {
|
|
|
|
|
2006-02-05 20:18:55 +01:00
|
|
|
void *cdParms; /* codec/compressor options */
|
|
|
|
void *pad; /* padding */
|
2003-05-21 03:21:07 +02:00
|
|
|
|
2006-02-05 20:18:55 +01:00
|
|
|
unsigned int cdSize; /* size of cdParms buffer */
|
|
|
|
unsigned int pad2; /* padding */
|
2003-05-21 03:21:07 +02:00
|
|
|
|
|
|
|
char qtcodecname[128];
|
|
|
|
} QuicktimeCodecData;
|
|
|
|
|
2006-02-05 20:18:55 +01:00
|
|
|
typedef struct FFMpegCodecData {
|
2007-01-09 12:10:12 +01:00
|
|
|
int type;
|
|
|
|
int codec;
|
|
|
|
int audio_codec;
|
|
|
|
int video_bitrate;
|
|
|
|
int audio_bitrate;
|
|
|
|
int gop_size;
|
|
|
|
int flags;
|
2006-02-05 20:18:55 +01:00
|
|
|
|
|
|
|
int rc_min_rate;
|
|
|
|
int rc_max_rate;
|
|
|
|
int rc_buffer_size;
|
|
|
|
int mux_packet_size;
|
|
|
|
int mux_rate;
|
|
|
|
} FFMpegCodecData;
|
|
|
|
|
|
|
|
|
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 22:16:56 +02:00
|
|
|
typedef struct AudioData {
|
|
|
|
int mixrate;
|
|
|
|
float main; /* Main mix in dB */
|
|
|
|
short flag;
|
|
|
|
short pad[3];
|
|
|
|
} AudioData;
|
2003-05-21 03:21:07 +02:00
|
|
|
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
typedef struct SceneRenderLayer {
|
|
|
|
struct SceneRenderLayer *next, *prev;
|
|
|
|
|
|
|
|
char name[32];
|
2006-12-07 15:17:38 +01:00
|
|
|
|
|
|
|
struct Material *mat_override;
|
|
|
|
struct Group *light_override;
|
|
|
|
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
unsigned int lay; /* scene->lay itself has priority over this */
|
2008-01-24 16:03:34 +01:00
|
|
|
unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
|
2006-12-07 15:17:38 +01:00
|
|
|
int layflag;
|
2008-01-24 16:03:34 +01:00
|
|
|
|
|
|
|
int pad;
|
|
|
|
|
2006-12-07 15:17:38 +01:00
|
|
|
int passflag; /* pass_xor has to be after passflag */
|
|
|
|
int pass_xor;
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
} SceneRenderLayer;
|
|
|
|
|
|
|
|
/* srl->layflag */
|
|
|
|
#define SCE_LAY_SOLID 1
|
|
|
|
#define SCE_LAY_ZTRA 2
|
|
|
|
#define SCE_LAY_HALO 4
|
2006-06-17 12:25:07 +02:00
|
|
|
#define SCE_LAY_EDGE 8
|
|
|
|
#define SCE_LAY_SKY 16
|
|
|
|
#define SCE_LAY_STRAND 32
|
2006-12-07 15:17:38 +01:00
|
|
|
/* flags between 32 and 0x8000 are set to 1 already, for future options */
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
|
2008-02-20 15:17:53 +01:00
|
|
|
#define SCE_LAY_ALL_Z 0x8000
|
|
|
|
#define SCE_LAY_XOR 0x10000
|
|
|
|
#define SCE_LAY_DISABLE 0x20000
|
|
|
|
#define SCE_LAY_ZMASK 0x40000
|
|
|
|
#define SCE_LAY_NEG_ZMASK 0x80000
|
2006-09-24 11:21:04 +02:00
|
|
|
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
/* srl->passflag */
|
|
|
|
#define SCE_PASS_COMBINED 1
|
|
|
|
#define SCE_PASS_Z 2
|
|
|
|
#define SCE_PASS_RGBA 4
|
|
|
|
#define SCE_PASS_DIFFUSE 8
|
|
|
|
#define SCE_PASS_SPEC 16
|
|
|
|
#define SCE_PASS_SHADOW 32
|
|
|
|
#define SCE_PASS_AO 64
|
2006-12-05 17:44:57 +01:00
|
|
|
#define SCE_PASS_REFLECT 128
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
#define SCE_PASS_NORMAL 256
|
|
|
|
#define SCE_PASS_VECTOR 512
|
2006-12-05 17:44:57 +01:00
|
|
|
#define SCE_PASS_REFRACT 1024
|
|
|
|
#define SCE_PASS_INDEXOB 2048
|
2006-12-10 21:30:15 +01:00
|
|
|
#define SCE_PASS_UV 4096
|
|
|
|
#define SCE_PASS_RADIO 8192
|
2008-01-19 12:17:12 +01:00
|
|
|
#define SCE_PASS_MIST 16384
|
|
|
|
|
2006-12-10 21:30:15 +01:00
|
|
|
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
|
|
|
|
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
typedef struct RenderData {
|
2007-01-09 12:10:12 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
struct AviCodecData *avicodecdata;
|
2003-05-21 03:21:07 +02:00
|
|
|
struct QuicktimeCodecData *qtcodecdata;
|
2007-01-09 12:10:12 +01:00
|
|
|
struct FFMpegCodecData ffcodecdata;
|
2006-02-05 20:18:55 +01:00
|
|
|
|
2007-03-19 08:32:36 +01:00
|
|
|
int cfra, sfra, efra; /* frames as in 'images' */
|
|
|
|
int psfra, pefra; /* start+end frames of preview range */
|
2006-02-05 20:18:55 +01:00
|
|
|
|
2007-01-09 12:10:12 +01:00
|
|
|
int images, framapto;
|
2006-11-29 18:01:09 +01:00
|
|
|
short flag, threads;
|
I'm not sure if I'm allowed to do this, but I'm hoping this is ok...
I have been able to compile blender on linux 64 without problems up to a
month ago, but a recent change is giving me problems, and probably others
as well (on linux 64 at least). But if not, this commit shouldn't change
anything.
The problem was an added pad variable to RenderData in DNA_scene_types.h,
in a somewhat problematic place, since it causes the compiler to pad the
struct at the 'ListBase layers' variable, a struct of two pointers,
which caused me all sorts of trouble, variables declared after this having
incorrect or incorrectly assigned values.
This commit fixes this.
In makesdna.c is a useful section which will write a c program called
'padding.c' which compares the actual size to the expected size, which
for the RenderData and Scene struct in this case had a difference of 8.
Also useful was the gcc -Wpadded warning flag.
Hopefully I don't get 'fired' for this... ;)
Now back to fixing the yafray bugs...
2006-06-02 05:39:03 +02:00
|
|
|
|
2003-04-27 13:55:33 +02:00
|
|
|
float ctime; /* use for calcutions */
|
2002-10-12 13:37:38 +02:00
|
|
|
float framelen, blurfac;
|
|
|
|
|
2007-04-04 15:18:41 +02:00
|
|
|
/** For UR edge rendering: give the edges this color */
|
2002-10-12 13:37:38 +02:00
|
|
|
float edgeR, edgeG, edgeB;
|
|
|
|
|
|
|
|
short fullscreen, xplay, yplay, freqplay; /* standalone player */
|
2006-02-05 20:18:55 +01:00
|
|
|
short depth, attrib, rt1, rt2; /* standalone player */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2006-02-05 20:18:55 +01:00
|
|
|
short stereomode; /* standalone player stereo settings */
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
|
|
|
|
short dimensionspreset; /* for the dimensions presets menu */
|
|
|
|
|
2006-02-05 20:18:55 +01:00
|
|
|
short filtertype; /* filter is box, tent, gauss, mitch, etc */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
short size, maximsize; /* size in %, max in Kb */
|
2003-04-27 13:55:33 +02:00
|
|
|
/* from buttons: */
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* The desired number of pixels in the x direction
|
|
|
|
*/
|
|
|
|
short xsch;
|
|
|
|
/**
|
|
|
|
* The desired number of pixels in the y direction
|
|
|
|
*/
|
|
|
|
short ysch;
|
|
|
|
/**
|
|
|
|
* The number of part to use in the x direction
|
|
|
|
*/
|
|
|
|
short xparts;
|
|
|
|
/**
|
|
|
|
* The number of part to use in the y direction
|
|
|
|
*/
|
|
|
|
short yparts;
|
|
|
|
|
2006-01-09 11:55:41 +01:00
|
|
|
short winpos, planes, imtype, subimtype;
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/** Mode bits: */
|
|
|
|
/* 0: Enable backbuffering for images */
|
|
|
|
short bufflag;
|
|
|
|
short quality;
|
2006-01-09 11:55:41 +01:00
|
|
|
|
2008-04-09 17:46:26 +02:00
|
|
|
short rpad, rpad1, rpad2;
|
2008-03-21 18:37:24 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* Flags for render settings. Use bit-masking to access the settings.
|
|
|
|
*/
|
2008-03-21 18:37:24 +01:00
|
|
|
int scemode;
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Flags for render settings. Use bit-masking to access the settings.
|
|
|
|
*/
|
2003-12-10 21:41:53 +01:00
|
|
|
int mode;
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2004-04-23 23:02:58 +02:00
|
|
|
/* render engine, octree resolution */
|
2008-03-21 18:37:24 +01:00
|
|
|
short renderer, ocres;
|
2004-01-27 06:46:12 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* What to do with the sky/background. Picks sky/premul/key
|
|
|
|
* blending for the background
|
|
|
|
*/
|
|
|
|
short alphamode;
|
2007-01-09 12:10:12 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* The number of samples to use per pixel.
|
|
|
|
*/
|
|
|
|
short osa;
|
2007-10-21 22:18:54 +02:00
|
|
|
|
|
|
|
short frs_sec, edgeint;
|
2007-01-09 12:10:12 +01:00
|
|
|
|
Compositing workflow upgrade;
You now can set a Preview panel in the Image window, to define a sub-rect
of an image to be processed. Works like the preview in 3D Window. Just
press SHIFT+P to get it activated. Very nice speedup!
This is how it works:
- The compositor still uses the scene image size (including % setting) for
Viewer or Composite output size
- If a preview exists, it calculates the cropped rect from its position
in the Image window, and stores that in the Scene render data
- On composite execute, it copies only this part from the 'generator nodes',
right now Images or Render Results. That makes the entire composite tree
only using small rects, so it will execute fast.
- Also the render window will only display the cropped rect, and on F12
only the cropped part is being executed
- On rendering in background mode, the cropping is ignored though.
Usability notes:
- translating or zooming view will automatically invoke a recalculation
- if you zoom in on details, the calculated rect will even become smaller
- only one Imagewindow can have this Preview Panel, to prevent conflicts of
what the cropped area should be. Compositing is on Scene level, not local
per image window. (Note; 3D Previews are local per window!)
- Closing the preview panel will invoke a full-size recalculation
- All passes/layers from rendering are nicely cropped, including Z and
vectors.
The work to make the compositor do cropping was simple, but getting the
Image window displaying correctly and get all events OK was a lot of work...
indeed, we need to refactor Image Window usage once. Sorry for making the
mess even bigger now. :) I've tried not to interfere with UV edit or Paint
though... only when you're in compositing mode the panel will work.
BUG fix:
3D Preview render didn't work when multiple layers were set in the current
scene.
2006-02-09 12:07:04 +01:00
|
|
|
/* safety, border and display rect */
|
2006-01-09 11:55:41 +01:00
|
|
|
rctf safety, border;
|
Compositing workflow upgrade;
You now can set a Preview panel in the Image window, to define a sub-rect
of an image to be processed. Works like the preview in 3D Window. Just
press SHIFT+P to get it activated. Very nice speedup!
This is how it works:
- The compositor still uses the scene image size (including % setting) for
Viewer or Composite output size
- If a preview exists, it calculates the cropped rect from its position
in the Image window, and stores that in the Scene render data
- On composite execute, it copies only this part from the 'generator nodes',
right now Images or Render Results. That makes the entire composite tree
only using small rects, so it will execute fast.
- Also the render window will only display the cropped rect, and on F12
only the cropped part is being executed
- On rendering in background mode, the cropping is ignored though.
Usability notes:
- translating or zooming view will automatically invoke a recalculation
- if you zoom in on details, the calculated rect will even become smaller
- only one Imagewindow can have this Preview Panel, to prevent conflicts of
what the cropped area should be. Compositing is on Scene level, not local
per image window. (Note; 3D Previews are local per window!)
- Closing the preview panel will invoke a full-size recalculation
- All passes/layers from rendering are nicely cropped, including Z and
vectors.
The work to make the compositor do cropping was simple, but getting the
Image window displaying correctly and get all events OK was a lot of work...
indeed, we need to refactor Image Window usage once. Sorry for making the
mess even bigger now. :) I've tried not to interfere with UV edit or Paint
though... only when you're in compositing mode the panel will work.
BUG fix:
3D Preview render didn't work when multiple layers were set in the current
scene.
2006-02-09 12:07:04 +01:00
|
|
|
rcti disprect;
|
2006-01-09 11:55:41 +01:00
|
|
|
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
/* information on different layers to be rendered */
|
|
|
|
ListBase layers;
|
2007-10-21 22:18:54 +02:00
|
|
|
short actlay, pad;
|
2008-04-09 17:46:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
|
|
|
|
*/
|
|
|
|
float xasp;
|
|
|
|
/**
|
|
|
|
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
|
|
|
|
*/
|
|
|
|
float yasp;
|
== Core ==
This adds fractional FPS support to blender and should finally
make NTSC work correctly.
NTSC has an FPS of 30.0/1.001 which is approximately 29.97 FPS.
Therefore, it is not enough to simply make frs_sec a float, since
you can't represent this accurately enough.
I added a seperate variable frs_sec_base and FPS is now
frs_sec / frs_sec_base.
I changed all the places, where frs_sec was used to my best knowledge.
For convenience sake, I added several macros, that should make life
easier in the future:
FRA2TIME(a) : convert frame number to a double precision time in seconds
TIME2FRA(a) : the same in the opposite direction
FPS : return current FPS as a double precision number
(last resort)
This closes bug #6715
Standard framerates not supported / breaks sync -- 23.967 29.967 etc.
https://projects.blender.org/tracker/?func=detail&aid=6715&group_id=9&atid=125
Please give this heavy testing with NTSC files, quicktime in/export
and the python interface.
Errors are most probably only spotted on longer timelines, so that is
also important.
The patch was tested by Troy Sobotka and me, so it most probably should
work out of the box, but wider testing is important, since errors are
very subtle.
Enjoy!
2007-10-21 17:42:08 +02:00
|
|
|
|
|
|
|
float frs_sec_base;
|
Orange; more render & compo stuff!
-> Rendering in RenderLayers
It's important to distinguish a 'render layer' from a 'pass'. The first is
control over the main pipeline itself, to indicate what geometry is being
is rendered. The 'pass' (not in this commit!) is related to internal
shading code, like shadow/spec/AO/normals/etc.
Options for RenderLayers now are:
- Indicate which 3d 'view layers' have to be included (so you can render
front and back separately)
- "Solid", all solid faces, includes sky at the moment too
- "ZTransp", all transparent faces
- "Halo", the halos
- "Strand", the particle strands (not coded yet...)
Currently only 2 'passes' are exported for render, which is the "Combined"
buffer and the "Z. The latter now works, and can be turned on/off.
Note that all layers are still fully kept in memory now, saving the tiles
and layers to disk (in exr) is also todo.
-> New Blur options
The existing Blur Node (compositor) now has an optional input image. This
has to be a 'value buffer', which can be a Zbuffer, or any mask you can
think of. The input values have to be in the 0-1 range, so another new
node was added too "Map Value".
The value input can also be used to tweak blur size with the (todo)
Time Node.
Temporal screenies:
http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt2.jpg
BTW: The compositor is very slow still, it recalulates all nodes on each
change still. Persistant memory and dependency checks is coming!
2006-01-26 23:18:46 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
2007-01-09 12:10:12 +01:00
|
|
|
* Value used to define filter size for all filter options */
|
|
|
|
float gauss;
|
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 20:28:52 +01:00
|
|
|
|
2007-02-07 10:17:57 +01:00
|
|
|
/** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
|
|
|
|
float postmul, postgamma, posthue, postsat;
|
|
|
|
|
|
|
|
/* Dither noise intensity */
|
2004-11-01 16:21:50 +01:00
|
|
|
float dither_intensity;
|
The zblur plugin (aka as DoF) integrated in render. Compared to patch
submitted by Alexander, changes/improvements are:
- Moved to new Panel in Scene buttons "Post Effects". Together with other
postprocessing options, such as Edge render. It is also not called DoF,
this because that's a bit pretending too much then. It's a zblur still!
- Made it render Alpha as well
- Made it use and deliver float buffers
- Huge cleanup of zblur.c code, was very messy. It was alling things in render
code without need even (win matrices, transform faces, etc)
- Fixed errors in using Z values (zbuffer is signed int)
- Removed very weird gamma corrections for front/back half
- Tweaked gaussian table, allow variable 'Sigma' to be set for gauss curve
- Didn't copy 'auto focus' yet. Use of this is very limited, and gives
false expectations, nor works for rendering anims with deamons well.
Main issue remains: it's not a very advanced feature... I still doubt
very much if this deserves to be released. Spent 2 days on trying to get
the key issues solved, with not much results.
- gauss filter code has weird side effects on large blur size
- having unsharp (blurred) in front also blurs what's around in back.
only blurred in back with sharp in front works a little bit
- severe aliasing errors... also due the code splitting in 2 halves
- doesnt work with unified yet
- won't work for halos, spot halos or transparant faces
Anyhoo... It was promised to be committed, so now artists can play with it.
Who knows it's useful after all, or some fixes can be implemented. :)
2005-04-23 22:49:23 +02:00
|
|
|
|
2007-01-09 12:10:12 +01:00
|
|
|
/* Bake Render options */
|
|
|
|
short bake_osa, bake_filter, bake_mode, bake_flag;
|
2007-11-28 23:21:12 +01:00
|
|
|
short bake_normal_space, bpad;
|
2008-02-18 19:14:19 +01:00
|
|
|
float bake_maxdist, bake_biasdist, bake_pad;
|
2007-01-09 12:10:12 +01:00
|
|
|
|
2004-07-13 21:22:41 +02:00
|
|
|
/* yafray: global panel params. TODO: move elsewhere */
|
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 02:52:12 +02:00
|
|
|
short GIquality, GIcache, GImethod, GIphotons, GIdirect;
|
Added some backward compatibility with old yafray blendershader. Because of missing
parameters the material preset menu won't be as useful. Both glass presets will look the same
because there is no 'filter' parameter in the old yafray for instance.
So using the new Blender version with an old yafray version should work a bit better,
though the other way around, using the new yafray with an old blender version, will generally
not work as well.
I added a few extra things. In 'yafray' panel re-arranged some buttons, and added a new
button 'Clamp RGB'. This button will be enabled by default and helps to improve AA on
high contrast edges in the image. When using bokeh however, it is best to switch this off,
otherwise lens shaped highlights will be quite a bit less visible.
Changed the 'extinction' parameter name to the probably more correct term 'absorption',
though mathematically it works out the same. Also changed the behaviour of this color,
it no longer specifies a color that will be removed as I wrote in the previous commit,
but instead the actual color at one (blender) unit of distance. The 'Ds' (distance scale)
button below the color sliders controls the scaling of this unit distance.
What this means is that if you take the standard blender cube, which covers two units of
distance by default, setting the distance scale button to 2.0 will make sure that the color
you specified is exactly that color at that distance (provided the base color itself is white
of course, or 'filter' is 0, otherwise it will be filtered by the base color too).
Beyond this distance the color will get darker.
The glow option for point/soft/sphere lights has a new parameter 'GloOfs', or glow offset.
Setting this to a higher value then 0 will soften the central peak of the glow.
Another unreported bug fix: For xml export, when yafray failed to render the xml file
for some unknown reason, or because of other problems, the export code would still load
the previously rendered image, this causes problems however if the image resolution is
not the same as the current Blender buffer, and so could cause memory corruption or crashes.
This is now taken into account.
World image backgrounds now use the blender mapping settings as well, but only the
'AngMap', 'Sphere' and 'Tube' settings. But in yafray those last two, unlike Blender, cover
the whole view, not just the upper half, so is not really fully compatible with yafray.
So now you have to set one of these buttons too when loading a hdr lightprobe image.
btw, something I forgot to mention in previous commits is that the exposure control using
the texture brightness slider is no longer restricted to integer values. It is now a
floating point value, so you're not restricted to the 0 1 and 2 slider positions anymore,
anything in between will work too.
And finally, display updating is now more like Blender, using the mouse cursor as frame
counter for animation, etc.
2005-05-27 19:52:53 +02:00
|
|
|
short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
|
2004-01-08 12:42:40 +01:00
|
|
|
int GIdepth, GIcausdepth, GIpixelspersample;
|
2004-07-13 21:22:41 +02:00
|
|
|
int GIphotoncount, GImixphotons;
|
2004-01-13 17:51:35 +01:00
|
|
|
float GIphotonradius;
|
2008-02-17 23:11:05 +01:00
|
|
|
int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2;
|
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 02:52:12 +02:00
|
|
|
float GIshadowquality, GIrefinement, GIpower, GIindirpower;
|
2004-07-13 21:22:41 +02:00
|
|
|
float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
|
2004-01-04 23:10:36 +01:00
|
|
|
|
2007-01-09 12:10:12 +01:00
|
|
|
/* paths to backbufffer, output, ftype */
|
2008-01-20 18:53:58 +01:00
|
|
|
char backbuf[160], pic[160];
|
2006-02-05 20:18:55 +01:00
|
|
|
|
2007-10-20 18:17:27 +02:00
|
|
|
/* stamps flags. */
|
|
|
|
int stamp;
|
|
|
|
short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
|
|
|
|
|
|
|
|
/* stamp info user data. */
|
|
|
|
char stamp_udata[160];
|
|
|
|
|
|
|
|
/* foreground/background color. */
|
|
|
|
float fg_stamp[4];
|
|
|
|
float bg_stamp[4];
|
2008-02-13 12:18:08 +01:00
|
|
|
|
|
|
|
/* render simplify */
|
|
|
|
int simplify_subsurf;
|
|
|
|
int simplify_shadowsamples;
|
|
|
|
float simplify_particles;
|
|
|
|
float simplify_aosss;
|
2008-03-10 12:39:37 +01:00
|
|
|
|
|
|
|
/* cineon */
|
|
|
|
short cineonwhite, cineonblack;
|
|
|
|
float cineongamma;
|
2002-10-12 13:37:38 +02:00
|
|
|
} RenderData;
|
|
|
|
|
2008-02-14 19:56:14 +01:00
|
|
|
/* control render convert and shading engine */
|
|
|
|
typedef struct RenderProfile {
|
|
|
|
struct RenderProfile *next, *prev;
|
|
|
|
char name[32];
|
|
|
|
|
|
|
|
short particle_perc;
|
|
|
|
short subsurf_max;
|
|
|
|
short shadbufsample_max;
|
|
|
|
short pad1;
|
|
|
|
|
|
|
|
float ao_error, pad2;
|
|
|
|
|
|
|
|
} RenderProfile;
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
typedef struct GameFraming {
|
|
|
|
float col[3];
|
|
|
|
char type, pad1, pad2, pad3;
|
|
|
|
} GameFraming;
|
|
|
|
|
|
|
|
#define SCE_GAMEFRAMING_BARS 0
|
|
|
|
#define SCE_GAMEFRAMING_EXTEND 1
|
|
|
|
#define SCE_GAMEFRAMING_SCALE 2
|
|
|
|
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
typedef struct TimeMarker {
|
|
|
|
struct TimeMarker *next, *prev;
|
|
|
|
int frame;
|
|
|
|
char name[64];
|
|
|
|
unsigned int flag;
|
|
|
|
} TimeMarker;
|
|
|
|
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
typedef struct ImagePaintSettings {
|
2006-08-30 12:43:51 +02:00
|
|
|
struct Brush *brush;
|
|
|
|
short flag, tool;
|
|
|
|
int pad3;
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
} ImagePaintSettings;
|
|
|
|
|
|
|
|
typedef struct ParticleBrushData {
|
2008-02-14 19:56:14 +01:00
|
|
|
short size, strength; /* common settings */
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
short step, invert; /* for specific brushes only */
|
|
|
|
} ParticleBrushData;
|
|
|
|
|
|
|
|
typedef struct ParticleEditSettings {
|
|
|
|
short flag;
|
|
|
|
short totrekey;
|
|
|
|
short totaddkey;
|
|
|
|
short brushtype;
|
|
|
|
|
|
|
|
ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
|
|
|
|
|
|
|
|
float emitterdist;
|
|
|
|
int draw_timed;
|
|
|
|
} ParticleEditSettings;
|
2006-08-30 12:43:51 +02:00
|
|
|
|
=== Custom Transform Orientation ===
Custom Orientations can be added with Ctrl-Shift-C (hotkey suggestions are welcomed), this adds and select the new alignment. Custom Orientations can also be added, deleted, selected from the Transform Orientations panel (View -> Transform Orientations). Standard orientations (global, local, normal, view) can also be selected from this panel.
If you plan on using only a single custom orientation and don't really need a list, I suggest you use the hotkey as it adds and selects at the same time.
Custom Orientations are save in the scene and are selected per 3D view (like normal orientation).
Adding from an object, the orientation is a normalized version of the object's orientation.
Adding from mesh data, a single element (vertex, edge, face) must be selected in its respective selection mode. Vertex orientation Z-axis is based on the normal, edge Z-axis on the edge itself (X-axis is on the XoY plane when possible, Y-axis is perpendicular to the rest). Face orientation Z-axis is the face normal, X-axis is perpendicular to the first edge, Y-axis is perpendicular to the rest.
(More logical orientations can be suggested).
I plan to add: 2 vertice (connected or not) => edge orientation , 3 vertice = face orientation
Differences from the patch:
- orientations no longer link back to the object they came from, everything is copy on creation.
- orientations are overwritten based on name (if you add an orientation with the same name as one that already exists, it overwrites the old one)
2008-01-13 19:24:09 +01:00
|
|
|
typedef struct TransformOrientation {
|
|
|
|
struct TransformOrientation *next, *prev;
|
|
|
|
char name[36];
|
|
|
|
float mat[3][3];
|
|
|
|
} TransformOrientation;
|
|
|
|
|
2005-08-24 22:37:25 +02:00
|
|
|
typedef struct ToolSettings {
|
2006-05-21 19:12:10 +02:00
|
|
|
/* Subdivide Settings */
|
2005-08-24 22:37:25 +02:00
|
|
|
short cornertype;
|
|
|
|
short editbutflag;
|
2006-12-26 03:00:56 +01:00
|
|
|
/*Triangle to Quad conversion threshold*/
|
|
|
|
float jointrilimit;
|
2006-05-21 19:12:10 +02:00
|
|
|
/* Extrude Tools */
|
2006-11-09 15:30:11 +01:00
|
|
|
float degr;
|
2005-08-24 22:37:25 +02:00
|
|
|
short step;
|
|
|
|
short turn;
|
|
|
|
|
|
|
|
float extr_offs;
|
|
|
|
float doublimit;
|
|
|
|
|
2006-05-21 19:12:10 +02:00
|
|
|
/* Primitive Settings */
|
|
|
|
/* UV Sphere */
|
2005-08-24 22:37:25 +02:00
|
|
|
short segments;
|
|
|
|
short rings;
|
|
|
|
|
2006-05-21 19:12:10 +02:00
|
|
|
/* Cylinder - Tube - Circle */
|
2005-08-24 22:37:25 +02:00
|
|
|
short vertices;
|
|
|
|
|
2006-05-21 19:12:10 +02:00
|
|
|
/* UV Calculation */
|
2006-02-05 15:12:45 +01:00
|
|
|
short unwrapper;
|
|
|
|
float uvcalc_radius;
|
|
|
|
float uvcalc_cubesize;
|
|
|
|
short uvcalc_mapdir;
|
|
|
|
short uvcalc_mapalign;
|
|
|
|
short uvcalc_flag;
|
|
|
|
|
2007-12-15 08:35:16 +01:00
|
|
|
/* Auto-IK */
|
|
|
|
short autoik_chainlen;
|
2007-11-07 01:28:45 +01:00
|
|
|
|
=== Custom Transform Orientation ===
Custom Orientations can be added with Ctrl-Shift-C (hotkey suggestions are welcomed), this adds and select the new alignment. Custom Orientations can also be added, deleted, selected from the Transform Orientations panel (View -> Transform Orientations). Standard orientations (global, local, normal, view) can also be selected from this panel.
If you plan on using only a single custom orientation and don't really need a list, I suggest you use the hotkey as it adds and selects at the same time.
Custom Orientations are save in the scene and are selected per 3D view (like normal orientation).
Adding from an object, the orientation is a normalized version of the object's orientation.
Adding from mesh data, a single element (vertex, edge, face) must be selected in its respective selection mode. Vertex orientation Z-axis is based on the normal, edge Z-axis on the edge itself (X-axis is on the XoY plane when possible, Y-axis is perpendicular to the rest). Face orientation Z-axis is the face normal, X-axis is perpendicular to the first edge, Y-axis is perpendicular to the rest.
(More logical orientations can be suggested).
I plan to add: 2 vertice (connected or not) => edge orientation , 3 vertice = face orientation
Differences from the patch:
- orientations no longer link back to the object they came from, everything is copy on creation.
- orientations are overwritten based on name (if you add an orientation with the same name as one that already exists, it overwrites the old one)
2008-01-13 19:24:09 +01:00
|
|
|
/* Image Paint (8 byttse aligned please!) */
|
2007-04-24 16:52:35 +02:00
|
|
|
struct ImagePaintSettings imapaint;
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
|
|
|
|
/* Particle Editing */
|
|
|
|
struct ParticleEditSettings particle;
|
2007-04-24 16:52:35 +02:00
|
|
|
|
2006-05-21 19:12:10 +02:00
|
|
|
/* Select Group Threshold */
|
|
|
|
float select_thresh;
|
2006-08-30 12:43:51 +02:00
|
|
|
|
2006-11-09 09:43:27 +01:00
|
|
|
/* IPO-Editor */
|
|
|
|
float clean_thresh;
|
2006-12-08 01:44:44 +01:00
|
|
|
|
|
|
|
/* Retopo */
|
|
|
|
char retopo_mode;
|
2007-01-27 19:11:07 +01:00
|
|
|
char retopo_paint_tool;
|
2007-01-16 20:06:58 +01:00
|
|
|
char line_div, ellipse_div, retopo_hotspot;
|
2007-03-21 07:33:04 +01:00
|
|
|
|
|
|
|
/* Multires */
|
|
|
|
char multires_subdiv_type;
|
2007-01-16 20:06:58 +01:00
|
|
|
|
2007-11-07 01:28:45 +01:00
|
|
|
/* Skeleton generation */
|
|
|
|
short skgen_resolution;
|
|
|
|
float skgen_threshold_internal;
|
|
|
|
float skgen_threshold_external;
|
2007-11-08 23:03:04 +01:00
|
|
|
float skgen_length_ratio;
|
|
|
|
float skgen_length_limit;
|
|
|
|
float skgen_angle_limit;
|
2007-11-20 23:25:25 +01:00
|
|
|
float skgen_correlation_limit;
|
2007-11-27 22:50:06 +01:00
|
|
|
float skgen_symmetry_limit;
|
2007-11-07 01:28:45 +01:00
|
|
|
short skgen_options;
|
2007-11-08 23:03:04 +01:00
|
|
|
char skgen_postpro;
|
2007-11-14 02:57:17 +01:00
|
|
|
char skgen_postpro_passes;
|
2007-11-20 23:25:25 +01:00
|
|
|
char skgen_subdivisions[3];
|
2007-11-07 01:28:45 +01:00
|
|
|
|
2007-11-27 22:50:06 +01:00
|
|
|
char pad3[5];
|
2005-08-24 22:37:25 +02:00
|
|
|
} ToolSettings;
|
|
|
|
|
2006-11-06 02:08:26 +01:00
|
|
|
/* Used by all brushes to store their properties, which can be directly set
|
|
|
|
by the interface code. Note that not all properties are actually used by
|
|
|
|
all the brushes. */
|
|
|
|
typedef struct BrushData
|
|
|
|
{
|
|
|
|
short size;
|
|
|
|
char strength, dir; /* Not used for smooth brush */
|
2006-12-06 03:10:27 +01:00
|
|
|
char view;
|
2008-02-01 20:45:11 +01:00
|
|
|
char flag;
|
2006-12-06 03:10:27 +01:00
|
|
|
char pad[2];
|
2006-11-06 02:08:26 +01:00
|
|
|
} BrushData;
|
2006-11-18 22:01:25 +01:00
|
|
|
|
2006-12-25 09:52:57 +01:00
|
|
|
struct SculptSession;
|
2006-11-06 02:08:26 +01:00
|
|
|
typedef struct SculptData
|
|
|
|
{
|
2008-02-16 20:13:40 +01:00
|
|
|
/* Note! all pointers in this struct must be duplicated header_info.c's copy_scene function */
|
|
|
|
|
2006-12-25 09:52:57 +01:00
|
|
|
/* Data stored only from entering sculptmode until exiting sculptmode */
|
|
|
|
struct SculptSession *session;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
|
|
|
/* Pointers to all of sculptmodes's textures */
|
|
|
|
struct MTex *mtex[10];
|
|
|
|
|
2007-12-20 20:07:47 +01:00
|
|
|
/* Editable brush shape */
|
|
|
|
struct CurveMapping *cumap;
|
|
|
|
|
2006-11-06 02:08:26 +01:00
|
|
|
/* Settings for each brush */
|
2007-03-14 21:00:01 +01:00
|
|
|
BrushData drawbrush, smoothbrush, pinchbrush, inflatebrush, grabbrush, layerbrush, flattenbrush;
|
2008-03-21 02:10:32 +01:00
|
|
|
|
|
|
|
/* For rotating around a pivot point */
|
|
|
|
float pivot[3];
|
|
|
|
|
2006-11-06 02:08:26 +01:00
|
|
|
short brush_type;
|
|
|
|
|
|
|
|
/* For the Brush Shape */
|
|
|
|
short texact, texnr;
|
|
|
|
short spacing;
|
|
|
|
char texrept;
|
|
|
|
char texfade;
|
2006-12-29 22:53:52 +01:00
|
|
|
char texsep;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
2006-11-26 13:23:21 +01:00
|
|
|
char averaging;
|
2007-06-25 00:28:28 +02:00
|
|
|
char flags;
|
2006-12-04 06:36:50 +01:00
|
|
|
|
2006-12-23 06:40:58 +01:00
|
|
|
/* Control tablet input */
|
2006-12-29 09:40:19 +01:00
|
|
|
char tablet_size, tablet_strength;
|
|
|
|
|
|
|
|
/* Symmetry is separate from the other BrushData because the same
|
|
|
|
settings are always used for all brush types */
|
2006-12-29 22:53:52 +01:00
|
|
|
char symm;
|
2008-03-21 02:10:32 +01:00
|
|
|
|
2007-12-17 04:21:25 +01:00
|
|
|
/* Added to store if the 'Rake' setting has been set */
|
|
|
|
char rake;
|
2008-04-14 23:37:23 +02:00
|
|
|
char axislock;
|
|
|
|
char pad[2];
|
2006-11-06 02:08:26 +01:00
|
|
|
} SculptData;
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
typedef struct Scene {
|
|
|
|
ID id;
|
|
|
|
struct Object *camera;
|
|
|
|
struct World *world;
|
|
|
|
|
|
|
|
struct Scene *set;
|
|
|
|
struct Image *ima;
|
|
|
|
|
|
|
|
ListBase base;
|
|
|
|
struct Base *basact;
|
|
|
|
|
|
|
|
float cursor[3];
|
So! Finally a show-off of the *power* of Martin P's work! :)
- Made framework for 3d Transform Manipulators (widgets)
- The Manipulators act like '2d buttons', by default with LeftMouse and with
while-hold-move-release
- Implemented now: Translation Widget, which allows:
- four hotspots for axis grab or view-aligned grab
- center defined by 'around' setting
- SHIFT+LMB gives planar constraint on other 2 axes
- works in Object mode and Edit mode (not posemode yet)
Enable it with (temporal) icon in 3D header. All other 'normal' transforms
then keeps working btw.
On the todo for this widget:
- choice for Global, Local or Normal orientation
The way the widgets are going to work is in review still. Commit is also for
Matt for his proposal/paper on topic.
Some notes regarding this project;
- no life updates (on mouse over) like 3DS, I think that's neurotic
- on click, dominant axis changes to theme defined "Transform" color, other axes disappear, like maya
- manipulater size is fixed preset, independent zoom.
- manipulator follows selection, and is located based on 'around' mode
Unresolved;
- in maya, when you select 2 or more objects, the manipulator draws on the 'active' object, also interesting
- what to do with G,R,S hotkeys? It could switch the manipulator "mode"...
- header button/menu for manipulator mode?
2005-03-17 22:31:49 +01:00
|
|
|
float twcent[3]; /* center for transform widget */
|
|
|
|
float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
|
2002-10-12 13:37:38 +02:00
|
|
|
unsigned int lay;
|
2005-05-03 12:54:42 +02:00
|
|
|
|
|
|
|
/* editmode stuff */
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
float editbutsize; /* size of normals */
|
2007-10-25 17:23:52 +02:00
|
|
|
short selectmode; /* for mesh only! */
|
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
2006-01-23 23:05:47 +01:00
|
|
|
short proportional, prop_mode;
|
2007-10-18 23:47:55 +02:00
|
|
|
short automerge, pad5, pad6, pad7;
|
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
2006-01-23 23:05:47 +01:00
|
|
|
|
|
|
|
short use_nodes;
|
2007-10-18 23:47:55 +02:00
|
|
|
|
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
2006-01-23 23:05:47 +01:00
|
|
|
struct bNodeTree *nodetree;
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
|
2007-07-30 15:26:22 +02:00
|
|
|
void *ed; /* sequence editor data is allocated here */
|
2002-10-12 13:37:38 +02:00
|
|
|
struct Radio *radio;
|
|
|
|
|
|
|
|
struct GameFraming framing;
|
|
|
|
|
2005-08-24 22:37:25 +02:00
|
|
|
struct ToolSettings *toolsettings;
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/* migrate or replace? depends on some internal things... */
|
|
|
|
/* no, is on the right place (ton) */
|
|
|
|
struct RenderData r;
|
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 22:16:56 +02:00
|
|
|
struct AudioData audio;
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
ScriptLink scriptlink;
|
2005-04-30 23:27:05 +02:00
|
|
|
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
ListBase markers;
|
=== Custom Transform Orientation ===
Custom Orientations can be added with Ctrl-Shift-C (hotkey suggestions are welcomed), this adds and select the new alignment. Custom Orientations can also be added, deleted, selected from the Transform Orientations panel (View -> Transform Orientations). Standard orientations (global, local, normal, view) can also be selected from this panel.
If you plan on using only a single custom orientation and don't really need a list, I suggest you use the hotkey as it adds and selects at the same time.
Custom Orientations are save in the scene and are selected per 3D view (like normal orientation).
Adding from an object, the orientation is a normalized version of the object's orientation.
Adding from mesh data, a single element (vertex, edge, face) must be selected in its respective selection mode. Vertex orientation Z-axis is based on the normal, edge Z-axis on the edge itself (X-axis is on the XoY plane when possible, Y-axis is perpendicular to the rest). Face orientation Z-axis is the face normal, X-axis is perpendicular to the first edge, Y-axis is perpendicular to the rest.
(More logical orientations can be suggested).
I plan to add: 2 vertice (connected or not) => edge orientation , 3 vertice = face orientation
Differences from the patch:
- orientations no longer link back to the object they came from, everything is copy on creation.
- orientations are overwritten based on name (if you add an orientation with the same name as one that already exists, it overwrites the old one)
2008-01-13 19:24:09 +01:00
|
|
|
ListBase transform_spaces;
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
|
2007-09-25 06:11:57 +02:00
|
|
|
short jumpframe, pad1;
|
|
|
|
short snap_flag, snap_target;
|
2006-04-16 18:50:26 +02:00
|
|
|
|
2005-04-30 23:27:05 +02:00
|
|
|
/* none of the dependancy graph vars is mean to be saved */
|
|
|
|
struct DagForest *theDag;
|
|
|
|
short dagisvalid, dagflags;
|
2006-05-15 12:46:04 +02:00
|
|
|
short pad4, recalc; /* recalc = counterpart of ob->recalc */
|
2006-11-06 02:08:26 +01:00
|
|
|
|
|
|
|
/* Sculptmode data */
|
|
|
|
struct SculptData sculptdata;
|
2002-10-12 13:37:38 +02:00
|
|
|
} Scene;
|
|
|
|
|
|
|
|
|
|
|
|
/* **************** RENDERDATA ********************* */
|
|
|
|
|
|
|
|
/* bufflag */
|
|
|
|
#define R_BACKBUF 1
|
|
|
|
#define R_BACKBUFANIM 2
|
|
|
|
#define R_FRONTBUF 4
|
|
|
|
#define R_FRONTBUFANIM 8
|
|
|
|
|
2003-12-10 21:41:53 +01:00
|
|
|
/* mode (int now) */
|
2004-01-04 23:10:36 +01:00
|
|
|
#define R_OSA 0x0001
|
|
|
|
#define R_SHADOW 0x0002
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_GAMMA 0x0004
|
|
|
|
#define R_ORTHO 0x0008
|
2003-09-23 23:05:51 +02:00
|
|
|
#define R_ENVMAP 0x0010
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_EDGE 0x0020
|
|
|
|
#define R_FIELDS 0x0040
|
|
|
|
#define R_FIELDSTILL 0x0080
|
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 22:33:46 +02:00
|
|
|
#define R_RADIO 0x0100
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_BORDER 0x0200
|
|
|
|
#define R_PANORAMA 0x0400
|
2006-05-27 15:35:03 +02:00
|
|
|
#define R_CROP 0x0800
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_COSMO 0x1000
|
|
|
|
#define R_ODDFIELD 0x2000
|
|
|
|
#define R_MBLUR 0x4000
|
2007-01-09 12:10:12 +01:00
|
|
|
/* unified was here */
|
2003-12-10 21:41:53 +01:00
|
|
|
#define R_RAYTRACE 0x10000
|
2005-11-23 16:20:45 +01:00
|
|
|
/* R_GAUSS is obsolete, but used to retrieve setting from old files */
|
2003-12-22 23:27:51 +01:00
|
|
|
#define R_GAUSS 0x20000
|
2006-01-31 22:49:05 +01:00
|
|
|
/* fbuf obsolete... */
|
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 20:28:52 +01:00
|
|
|
#define R_FBUF 0x40000
|
2008-02-19 23:23:21 +01:00
|
|
|
/* threads obsolete... is there for old files, now use for autodetect threads */
|
2008-02-20 19:56:07 +01:00
|
|
|
#define R_THREADS 0x80000
|
|
|
|
/* Use the same flag for autothreads */
|
2008-02-21 09:43:13 +01:00
|
|
|
#define R_FIXED_THREADS 0x80000
|
2008-02-19 23:23:21 +01:00
|
|
|
|
2006-01-31 22:49:05 +01:00
|
|
|
#define R_SPEED 0x100000
|
2007-05-17 18:51:09 +02:00
|
|
|
#define R_SSS 0x200000
|
2008-01-20 18:53:58 +01:00
|
|
|
#define R_NO_OVERWRITE 0x400000 /* skip existing files */
|
|
|
|
#define R_TOUCH 0x800000 /* touch files before rendering */
|
2008-02-13 12:18:08 +01:00
|
|
|
#define R_SIMPLIFY 0x1000000
|
2008-01-20 18:53:58 +01:00
|
|
|
|
The zblur plugin (aka as DoF) integrated in render. Compared to patch
submitted by Alexander, changes/improvements are:
- Moved to new Panel in Scene buttons "Post Effects". Together with other
postprocessing options, such as Edge render. It is also not called DoF,
this because that's a bit pretending too much then. It's a zblur still!
- Made it render Alpha as well
- Made it use and deliver float buffers
- Huge cleanup of zblur.c code, was very messy. It was alling things in render
code without need even (win matrices, transform faces, etc)
- Fixed errors in using Z values (zbuffer is signed int)
- Removed very weird gamma corrections for front/back half
- Tweaked gaussian table, allow variable 'Sigma' to be set for gauss curve
- Didn't copy 'auto focus' yet. Use of this is very limited, and gives
false expectations, nor works for rendering anims with deamons well.
Main issue remains: it's not a very advanced feature... I still doubt
very much if this deserves to be released. Spent 2 days on trying to get
the key issues solved, with not much results.
- gauss filter code has weird side effects on large blur size
- having unsharp (blurred) in front also blurs what's around in back.
only blurred in back with sharp in front works a little bit
- severe aliasing errors... also due the code splitting in 2 halves
- doesnt work with unified yet
- won't work for halos, spot halos or transparant faces
Anyhoo... It was promised to be committed, so now artists can play with it.
Who knows it's useful after all, or some fixes can be implemented. :)
2005-04-23 22:49:23 +02:00
|
|
|
|
2005-11-23 16:20:45 +01:00
|
|
|
/* filtertype */
|
|
|
|
#define R_FILTER_BOX 0
|
|
|
|
#define R_FILTER_TENT 1
|
|
|
|
#define R_FILTER_QUAD 2
|
|
|
|
#define R_FILTER_CUBIC 3
|
|
|
|
#define R_FILTER_CATROM 4
|
|
|
|
#define R_FILTER_GAUSS 5
|
|
|
|
#define R_FILTER_MITCH 6
|
2007-10-26 17:32:36 +02:00
|
|
|
#define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
|
2004-01-27 06:46:12 +01:00
|
|
|
|
|
|
|
/* yafray: renderer flag (not only exclusive to yafray) */
|
|
|
|
#define R_INTERN 0
|
|
|
|
#define R_YAFRAY 1
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2008-03-21 18:37:24 +01:00
|
|
|
/* scemode (int now) */
|
2006-02-14 12:28:13 +01:00
|
|
|
#define R_DOSEQ 0x0001
|
|
|
|
#define R_BG_RENDER 0x0002
|
2005-11-23 16:20:45 +01:00
|
|
|
/* passepartout is camera option now, keep this for backward compatibility */
|
2006-02-14 12:28:13 +01:00
|
|
|
#define R_PASSEPARTOUT 0x0004
|
2006-02-15 10:35:01 +01:00
|
|
|
#define R_PREVIEWBUTS 0x0008
|
2006-02-14 12:28:13 +01:00
|
|
|
#define R_EXTENSION 0x0010
|
|
|
|
#define R_NODE_PREVIEW 0x0020
|
|
|
|
#define R_DOCOMP 0x0040
|
|
|
|
#define R_COMP_CROP 0x0080
|
|
|
|
#define R_FREE_IMAGE 0x0100
|
|
|
|
#define R_SINGLE_LAYER 0x0200
|
Memory saving for large renders:
New option "Save Buffers", in first Output panel of renderbuttons, will not
allocate all render buffers, but instead save the rendered tiles to exr.
For each scene rendered, a single exr file then is created.
After rendering, the files get read, and only then the memory allocation is
done.
The exr files are saved in the temp dir (from user settings), and have
names derived from the filename+scene name. That way these buffers remain
relatively unique, and can be re-used later too.
Saving all render-layers and passes in a single file (as F3 command) will
be done later. Also reading back the current muli-layer exr files is not
supported yet (will read black). The purpose is that these files then can
be used as input for the Compositor.
One fun thing I added; after rendering once with this option, close
Blender, and restart it. If you have a Composite set up press 'R' on an
active RenderResult node. This will refresh the node(s) and load the exr,
so you can composite again without a re-render.
2006-03-14 22:29:42 +01:00
|
|
|
#define R_EXR_TILE_FILE 0x0400
|
2006-05-12 13:27:01 +02:00
|
|
|
#define R_COMP_FREE 0x0800
|
2006-07-02 20:26:20 +02:00
|
|
|
#define R_NO_IMAGE_LOAD 0x1000
|
2008-01-28 17:33:59 +01:00
|
|
|
#define R_NO_TEX 0x2000
|
2007-10-20 18:17:27 +02:00
|
|
|
#define R_STAMP_INFO 0x4000
|
2008-01-28 17:33:59 +01:00
|
|
|
#define R_FULL_SAMPLE 0x8000
|
2008-03-21 18:37:24 +01:00
|
|
|
#define R_COMP_RERENDER 0x10000
|
2007-10-20 18:17:27 +02:00
|
|
|
|
|
|
|
/* r->stamp */
|
|
|
|
#define R_STAMP_TIME 0x0001
|
|
|
|
#define R_STAMP_FRAME 0x0002
|
|
|
|
#define R_STAMP_DATE 0x0004
|
|
|
|
#define R_STAMP_CAMERA 0x0008
|
|
|
|
#define R_STAMP_SCENE 0x0010
|
|
|
|
#define R_STAMP_NOTE 0x0020
|
|
|
|
#define R_STAMP_DRAW 0x0040 /* draw in the image */
|
|
|
|
#define R_STAMP_MARKER 0x0080
|
2007-11-08 14:02:59 +01:00
|
|
|
#define R_STAMP_FILENAME 0x0100
|
|
|
|
#define R_STAMP_SEQSTRIP 0x0200
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
/* alphamode */
|
|
|
|
#define R_ADDSKY 0
|
|
|
|
#define R_ALPHAPREMUL 1
|
|
|
|
#define R_ALPHAKEY 2
|
|
|
|
|
|
|
|
/* planes */
|
|
|
|
#define R_PLANES24 24
|
|
|
|
#define R_PLANES32 32
|
|
|
|
#define R_PLANESBW 8
|
|
|
|
|
|
|
|
/* imtype */
|
|
|
|
#define R_TARGA 0
|
|
|
|
#define R_IRIS 1
|
|
|
|
#define R_HAMX 2
|
2008-01-20 18:53:58 +01:00
|
|
|
#define R_FTYPE 3 /* ftype is nomore */
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_JPEG90 4
|
|
|
|
#define R_MOVIE 5
|
|
|
|
#define R_IRIZ 7
|
|
|
|
#define R_RAWTGA 14
|
|
|
|
#define R_AVIRAW 15
|
|
|
|
#define R_AVIJPEG 16
|
|
|
|
#define R_PNG 17
|
|
|
|
#define R_AVICODEC 18
|
2006-12-20 18:57:56 +01:00
|
|
|
#define R_QUICKTIME 19
|
2004-01-09 23:04:08 +01:00
|
|
|
#define R_BMP 20
|
2005-11-20 15:32:07 +01:00
|
|
|
#define R_RADHDR 21
|
2005-11-22 19:50:03 +01:00
|
|
|
#define R_TIFF 22
|
Orange branch: OpenEXR finally in Blender!
Credits go to Gernot Ziegler, who originally coded EXR support, and to
Austin Benesh for bringing it further. Kent Mein provided a lot of code
for integrating float buffers in Blender imbuf and ImBuf API cleanup,
and provided Make and Scons and static linking.
At this moment; the EXR libraries are a *dependency*, so you cannot get
the Orange branch compiled without having OpenEXR installed. Get the
(precompiled or sources) stuff from www.openexr.com. Current default is
that the headers and lib resides in /user/local/
Several changes/additions/fixes were added:
- EXR code only supported 'half' format (16 bits per channel). I've added
float writing, but for reading it I need tomorrow. :)
- Quite some clumsy copying of data happened in EXR code.
- cleaned up the api calls already a bit, preparing for more advanced
support
- Zbuffers were saved 16 bits, now 32 bits
- automatic adding of .exr extensions went wrong
Imbuf:
- added proper imbuf->flags and imbuf->mall support for float buffers, it
was created for *each* imbuf. :)
- found bugs for float buffers in scaling and flipping. Code there will
need more checks still
- imbuf also needs to be verified to behave properly when no 32 bits
rect exists (for saving for example)
TODO:
- support internal float images for textures, backbuf, AO probes, and
display in Image window
Hope this commit won't screwup syncing with bf-blender... :/
2006-01-09 01:40:35 +01:00
|
|
|
#define R_OPENEXR 23
|
2006-02-05 20:18:55 +01:00
|
|
|
#define R_FFMPEG 24
|
|
|
|
#define R_FRAMESERVER 25
|
2006-12-20 18:57:56 +01:00
|
|
|
#define R_CINEON 26
|
|
|
|
#define R_DPX 27
|
|
|
|
#define R_MULTILAYER 28
|
2007-06-25 21:50:25 +02:00
|
|
|
#define R_DDS 29
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2006-01-09 11:55:41 +01:00
|
|
|
/* subimtype, flag options for imtype */
|
|
|
|
#define R_OPENEXR_HALF 1
|
|
|
|
#define R_OPENEXR_ZBUF 2
|
2006-02-03 22:38:59 +01:00
|
|
|
#define R_PREVIEW_JPG 4
|
2008-03-10 12:39:37 +01:00
|
|
|
#define R_CINEON_LOG 8
|
|
|
|
#define R_TIFF_16BIT 16
|
2006-01-09 11:55:41 +01:00
|
|
|
|
2007-01-09 12:10:12 +01:00
|
|
|
/* bake_mode: same as RE_BAKE_xxx defines */
|
|
|
|
/* bake_flag: */
|
2007-11-28 23:21:12 +01:00
|
|
|
#define R_BAKE_CLEAR 1
|
|
|
|
#define R_BAKE_OSA 2
|
|
|
|
#define R_BAKE_TO_ACTIVE 4
|
2008-02-22 15:27:46 +01:00
|
|
|
#define R_BAKE_NORMALIZE 8
|
2007-11-28 23:21:12 +01:00
|
|
|
|
|
|
|
/* bake_normal_space */
|
|
|
|
#define R_BAKE_SPACE_CAMERA 0
|
|
|
|
#define R_BAKE_SPACE_WORLD 1
|
|
|
|
#define R_BAKE_SPACE_OBJECT 2
|
|
|
|
#define R_BAKE_SPACE_TANGENT 3
|
2006-01-09 11:55:41 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/* **************** SCENE ********************* */
|
|
|
|
#define RAD_PHASE_PATCHES 1
|
|
|
|
#define RAD_PHASE_FACES 2
|
|
|
|
|
2004-05-29 18:17:46 +02:00
|
|
|
/* base->flag is in DNA_object_types.h */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2007-09-25 06:11:57 +02:00
|
|
|
/* scene->snap_flag */
|
|
|
|
#define SCE_SNAP 1
|
|
|
|
/* scene->snap_target */
|
|
|
|
#define SCE_SNAP_TARGET_CLOSEST 0
|
|
|
|
#define SCE_SNAP_TARGET_CENTER 1
|
|
|
|
#define SCE_SNAP_TARGET_MEDIAN 2
|
2008-01-20 23:43:48 +01:00
|
|
|
#define SCE_SNAP_TARGET_ACTIVE 3
|
2002-10-12 13:37:38 +02:00
|
|
|
|
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 22:52:51 +02:00
|
|
|
/* sce->selectmode */
|
2007-10-23 20:56:43 +02:00
|
|
|
#define SCE_SELECT_VERTEX 1 /* for mesh */
|
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 22:52:51 +02:00
|
|
|
#define SCE_SELECT_EDGE 2
|
|
|
|
#define SCE_SELECT_FACE 4
|
|
|
|
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
/* sce->selectmode for particles */
|
|
|
|
#define SCE_SELECT_PATH 1
|
|
|
|
#define SCE_SELECT_POINT 2
|
|
|
|
#define SCE_SELECT_END 4
|
|
|
|
|
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
2006-01-23 23:05:47 +01:00
|
|
|
/* sce->recalc (now in use by previewrender) */
|
|
|
|
#define SCE_PRV_CHANGED 1
|
|
|
|
|
2005-05-03 12:54:42 +02:00
|
|
|
/* sce->prop_mode (proportional falloff) */
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
#define PROP_SMOOTH 0
|
|
|
|
#define PROP_SPHERE 1
|
|
|
|
#define PROP_ROOT 2
|
|
|
|
#define PROP_SHARP 3
|
|
|
|
#define PROP_LIN 4
|
|
|
|
#define PROP_CONST 5
|
2006-09-25 07:15:19 +02:00
|
|
|
#define PROP_RANDOM 6
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
|
|
|
|
/* return flag next_object function */
|
2002-10-12 13:37:38 +02:00
|
|
|
#define F_START 0
|
|
|
|
#define F_SCENE 1
|
|
|
|
#define F_SET 2
|
|
|
|
#define F_DUPLI 3
|
|
|
|
|
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 22:16:56 +02:00
|
|
|
/* audio->flag */
|
|
|
|
#define AUDIO_MUTE 1
|
|
|
|
#define AUDIO_SYNC 2
|
|
|
|
#define AUDIO_SCRUB 4
|
|
|
|
|
2006-02-05 20:18:55 +01:00
|
|
|
#define FFMPEG_MULTIPLEX_AUDIO 1
|
|
|
|
#define FFMPEG_AUTOSPLIT_OUTPUT 2
|
Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 19:19:21 +02:00
|
|
|
|
2008-02-01 20:45:11 +01:00
|
|
|
/* Sculpt brush flags */
|
|
|
|
#define SCULPT_BRUSH_AIRBRUSH 1
|
|
|
|
#define SCULPT_BRUSH_ANCHORED 2
|
2007-06-25 00:28:28 +02:00
|
|
|
/* SculptData.flags */
|
|
|
|
#define SCULPT_INPUT_SMOOTH 1
|
2007-06-25 01:02:58 +02:00
|
|
|
#define SCULPT_DRAW_FAST 2
|
|
|
|
#define SCULPT_DRAW_BRUSH 4
|
2007-01-14 05:55:51 +01:00
|
|
|
/* SculptData.brushtype */
|
2007-06-25 01:02:58 +02:00
|
|
|
#define DRAW_BRUSH 1
|
|
|
|
#define SMOOTH_BRUSH 2
|
|
|
|
#define PINCH_BRUSH 3
|
2006-11-06 02:08:26 +01:00
|
|
|
#define INFLATE_BRUSH 4
|
2007-06-25 01:02:58 +02:00
|
|
|
#define GRAB_BRUSH 5
|
|
|
|
#define LAYER_BRUSH 6
|
2007-03-14 21:00:01 +01:00
|
|
|
#define FLATTEN_BRUSH 7
|
2007-01-14 05:55:51 +01:00
|
|
|
/* SculptData.texrept */
|
|
|
|
#define SCULPTREPT_DRAG 1
|
|
|
|
#define SCULPTREPT_TILE 2
|
|
|
|
#define SCULPTREPT_3D 3
|
2006-11-06 02:08:26 +01:00
|
|
|
|
2006-12-29 09:40:19 +01:00
|
|
|
#define SYMM_X 1
|
|
|
|
#define SYMM_Y 2
|
|
|
|
#define SYMM_Z 4
|
|
|
|
|
2008-04-14 23:37:23 +02:00
|
|
|
#define AXISLOCK_X 1
|
|
|
|
#define AXISLOCK_Y 2
|
|
|
|
#define AXISLOCK_Z 4
|
|
|
|
|
Brush Datablock:
- Added a new Brush datablock, only used by image paint, but intended
to be used in texture paint, vertex paint, weight paint and sculpt
mode also.
- Being a datablock, these brushes can be saved, appended and linked.
They have a fake user by default, to make sure they are saved even if
not selected.
Image Painting:
- Replaced the img module with C code in imagepaint.c
- Airbrush is no longer a separate tool, but rather an option that can
be used for soften, smear and clone also.
- Blend modes mix, add, subtract, multiply, darken and lighten have been
added, code taken directly from vertex paint.
Note to project files maintainers:
- The img module was removed from SCons and Makefiles, and this should
be done in other build systems also. I'll wait to remove the module
from cvs, to not break compilation.
2006-07-27 00:29:23 +02:00
|
|
|
/* toolsettings->imagepaint_flag */
|
2006-07-28 02:56:35 +02:00
|
|
|
#define IMAGEPAINT_DRAWING 1
|
|
|
|
#define IMAGEPAINT_DRAW_TOOL 2
|
|
|
|
#define IMAGEPAINT_DRAW_TOOL_DRAWING 4
|
Brush Datablock:
- Added a new Brush datablock, only used by image paint, but intended
to be used in texture paint, vertex paint, weight paint and sculpt
mode also.
- Being a datablock, these brushes can be saved, appended and linked.
They have a fake user by default, to make sure they are saved even if
not selected.
Image Painting:
- Replaced the img module with C code in imagepaint.c
- Airbrush is no longer a separate tool, but rather an option that can
be used for soften, smear and clone also.
- Blend modes mix, add, subtract, multiply, darken and lighten have been
added, code taken directly from vertex paint.
Note to project files maintainers:
- The img module was removed from SCons and Makefiles, and this should
be done in other build systems also. I'll wait to remove the module
from cvs, to not break compilation.
2006-07-27 00:29:23 +02:00
|
|
|
|
2008-03-26 15:50:29 +01:00
|
|
|
/* toolsettings->uvcalc_flag */
|
|
|
|
#define UVCALC_FILLHOLES 1
|
|
|
|
#define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
|
|
|
|
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
/* toolsettings->particle flag */
|
|
|
|
#define PE_KEEP_LENGTHS 1
|
|
|
|
#define PE_LOCK_FIRST 2
|
|
|
|
#define PE_DEFLECT_EMITTER 4
|
|
|
|
#define PE_INTERPOLATE_ADDED 8
|
|
|
|
#define PE_SHOW_CHILD 16
|
|
|
|
#define PE_SHOW_TIME 32
|
|
|
|
#define PE_X_MIRROR 64
|
|
|
|
|
|
|
|
/* toolsetting->particle brushtype */
|
|
|
|
#define PE_BRUSH_NONE -1
|
|
|
|
#define PE_BRUSH_COMB 0
|
|
|
|
#define PE_BRUSH_CUT 1
|
|
|
|
#define PE_BRUSH_LENGTH 2
|
|
|
|
#define PE_BRUSH_PUFF 3
|
|
|
|
#define PE_BRUSH_ADD 4
|
|
|
|
#define PE_BRUSH_WEIGHT 5
|
|
|
|
#define PE_BRUSH_SMOOTH 6
|
|
|
|
|
|
|
|
/* this must equal ParticleEditSettings.brush array size */
|
|
|
|
#define PE_TOT_BRUSH 7
|
|
|
|
|
2006-12-08 01:44:44 +01:00
|
|
|
/* toolsettings->retopo_mode */
|
2007-01-27 19:11:07 +01:00
|
|
|
#define RETOPO 1
|
|
|
|
#define RETOPO_PAINT 2
|
|
|
|
|
|
|
|
/* toolsettings->retopo_paint_tool */
|
2006-12-08 01:44:44 +01:00
|
|
|
#define RETOPO_PEN 1
|
|
|
|
#define RETOPO_LINE 2
|
|
|
|
#define RETOPO_ELLIPSE 4
|
|
|
|
|
2007-11-07 01:28:45 +01:00
|
|
|
/* toolsettings->skgen_options */
|
|
|
|
#define SKGEN_FILTER_INTERNAL 1
|
|
|
|
#define SKGEN_FILTER_EXTERNAL 2
|
2007-11-27 22:50:06 +01:00
|
|
|
#define SKGEN_SYMMETRY 4
|
|
|
|
#define SKGEN_CUT_LENGTH 8
|
|
|
|
#define SKGEN_CUT_ANGLE 16
|
|
|
|
#define SKGEN_CUT_CORRELATION 32
|
2007-11-20 23:25:25 +01:00
|
|
|
|
|
|
|
#define SKGEN_SUB_LENGTH 0
|
|
|
|
#define SKGEN_SUB_ANGLE 1
|
|
|
|
#define SKGEN_SUB_CORRELATION 2
|
|
|
|
#define SKGEN_SUB_TOTAL 3
|
2007-11-08 23:03:04 +01:00
|
|
|
|
|
|
|
/* toolsettings->skgen_postpro */
|
2007-11-14 02:57:17 +01:00
|
|
|
#define SKGEN_SMOOTH 0
|
|
|
|
#define SKGEN_AVERAGE 1
|
|
|
|
#define SKGEN_SHARPEN 2
|
2007-11-07 01:28:45 +01:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|