2011-02-17 21:48:12 +01:00
|
|
|
/*
|
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,
|
2010-02-12 14:34:04 +01:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
*/
|
|
|
|
|
2011-02-17 21:48:12 +01:00
|
|
|
/** \file DNA_scene_types.h
|
|
|
|
* \ingroup DNA
|
|
|
|
*/
|
|
|
|
|
2012-02-17 19:59:41 +01:00
|
|
|
#ifndef __DNA_SCENE_TYPES_H__
|
|
|
|
#define __DNA_SCENE_TYPES_H__
|
2011-12-30 08:25:49 +01:00
|
|
|
|
2011-12-04 07:05:48 +01:00
|
|
|
#include "DNA_defs.h"
|
|
|
|
|
2012-06-14 17:04:40 +02:00
|
|
|
/* XXX, temp feature - campbell */
|
2009-12-16 20:49:33 +01:00
|
|
|
#define DURIAN_CAMERA_SWITCH
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 12:05:07 +02:00
|
|
|
#include "DNA_color_types.h" /* color management */
|
2002-10-12 13:37:38 +02:00
|
|
|
#include "DNA_vec_types.h"
|
|
|
|
#include "DNA_listBase.h"
|
|
|
|
#include "DNA_ID.h"
|
2009-09-28 05:56:31 +02:00
|
|
|
#include "DNA_freestyle_types.h"
|
2015-02-12 18:54:41 +01:00
|
|
|
#include "DNA_gpu_types.h"
|
2015-04-06 15:40:12 +02:00
|
|
|
#include "DNA_userdef_types.h"
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2015-02-11 15:07:04 +01:00
|
|
|
struct CurveMapping;
|
2002-10-12 13:37:38 +02:00
|
|
|
struct Object;
|
2010-08-04 06:01:27 +02:00
|
|
|
struct Brush;
|
2002-10-12 13:37:38 +02:00
|
|
|
struct World;
|
|
|
|
struct Scene;
|
|
|
|
struct Image;
|
|
|
|
struct Group;
|
2009-09-19 00:25:49 +02:00
|
|
|
struct Text;
|
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;
|
2009-09-19 00:25:49 +02:00
|
|
|
struct AnimData;
|
|
|
|
struct Editing;
|
|
|
|
struct SceneStats;
|
|
|
|
struct bGPdata;
|
2016-08-03 23:31:48 +02:00
|
|
|
struct bGPDbrush;
|
2011-11-07 13:55:18 +01:00
|
|
|
struct MovieClip;
|
2014-04-13 18:03:14 +02:00
|
|
|
struct ColorSpace;
|
2009-08-04 02:40:36 +02:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ************************************************************* */
|
|
|
|
/* Scene Data */
|
|
|
|
|
|
|
|
/* Base - Wrapper for referencing Objects in a Scene */
|
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;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ************************************************************* */
|
|
|
|
/* Output Format Data */
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
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 {
|
2009-11-20 11:37:50 +01:00
|
|
|
/*Old quicktime implementation compatibility fields, read only in 2.5 - deprecated*/
|
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;
|
2009-11-20 11:37:50 +01:00
|
|
|
|
|
|
|
typedef struct QuicktimeCodecSettings {
|
|
|
|
/* Codec settings detailed for 2.5 implementation*/
|
|
|
|
int codecType; /* Types defined in quicktime_export.h */
|
|
|
|
int codecSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
|
|
|
|
|
|
|
|
/* Settings not available in current QTKit API */
|
|
|
|
int codec;
|
|
|
|
int codecFlags;
|
|
|
|
int colorDepth;
|
|
|
|
int codecTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
|
|
|
|
int minSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
|
|
|
|
int minTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
|
|
|
|
int keyFrameRate;
|
|
|
|
int bitRate; /* bitrate in bps */
|
2010-04-10 11:31:41 +02:00
|
|
|
|
|
|
|
/* Audio Codec settings */
|
|
|
|
int audiocodecType;
|
|
|
|
int audioSampleRate;
|
|
|
|
short audioBitDepth;
|
|
|
|
short audioChannels;
|
|
|
|
int audioCodecFlags;
|
|
|
|
int audioBitRate;
|
|
|
|
int pad1;
|
2009-11-20 11:37:50 +01:00
|
|
|
} QuicktimeCodecSettings;
|
2003-05-21 03:21:07 +02:00
|
|
|
|
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;
|
2009-09-20 16:00:00 +02:00
|
|
|
int audio_mixrate;
|
2011-06-21 22:39:41 +02:00
|
|
|
int audio_channels;
|
|
|
|
int audio_pad;
|
2009-09-20 19:55:03 +02:00
|
|
|
float audio_volume;
|
2007-01-09 12:10:12 +01:00
|
|
|
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;
|
2008-05-11 22:40:55 +02:00
|
|
|
IDProperty *properties;
|
2006-02-05 20:18:55 +01:00
|
|
|
} FFMpegCodecData;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ************************************************************* */
|
|
|
|
/* Audio */
|
2006-02-05 20:18:55 +01:00
|
|
|
|
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 {
|
2009-09-20 16:00:00 +02:00
|
|
|
int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
|
|
|
|
float main; // 2.5: now in FFMpegCodecData: audio_volume
|
2009-09-20 19:55:03 +02:00
|
|
|
float speed_of_sound;
|
|
|
|
float doppler_factor;
|
|
|
|
int distance_model;
|
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
|
|
|
short flag;
|
2009-09-20 19:55:03 +02:00
|
|
|
short pad;
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 15:58:59 +02:00
|
|
|
float volume;
|
|
|
|
float pad2;
|
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
|
|
|
} AudioData;
|
2003-05-21 03:21:07 +02:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Render Layers */
|
|
|
|
|
|
|
|
/* Render Layer */
|
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;
|
|
|
|
|
2012-01-11 09:51:06 +01:00
|
|
|
char name[64]; /* MAX_NAME */
|
2006-12-07 15:17:38 +01:00
|
|
|
|
|
|
|
struct Material *mat_override;
|
|
|
|
struct Group *light_override;
|
|
|
|
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 10:53:59 +02:00
|
|
|
unsigned int lay; /* scene->lay itself has priority over this */
|
|
|
|
unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
|
|
|
|
unsigned int lay_exclude; /* not used by internal, exclude */
|
2006-12-07 15:17:38 +01:00
|
|
|
int layflag;
|
2008-01-24 16:03:34 +01:00
|
|
|
|
2006-12-07 15:17:38 +01:00
|
|
|
int passflag; /* pass_xor has to be after passflag */
|
|
|
|
int pass_xor;
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 10:53:59 +02:00
|
|
|
|
|
|
|
int samples;
|
2014-02-06 15:18:34 +01:00
|
|
|
float pass_alpha_threshold;
|
2009-09-28 05:56:31 +02:00
|
|
|
|
|
|
|
struct FreestyleConfig freestyleConfig;
|
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
|
2014-01-27 19:58:54 +01:00
|
|
|
#define SCE_LAY_EDGE 8
|
2006-06-17 12:25:07 +02:00
|
|
|
#define SCE_LAY_SKY 16
|
|
|
|
#define SCE_LAY_STRAND 32
|
2009-09-28 05:56:31 +02:00
|
|
|
#define SCE_LAY_FRS 64
|
2015-11-24 09:21:40 +01:00
|
|
|
#define SCE_LAY_AO 128
|
|
|
|
/* flags between 256 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 */
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 22:05:07 +01:00
|
|
|
typedef enum ScenePassType {
|
|
|
|
SCE_PASS_COMBINED = (1 << 0),
|
|
|
|
SCE_PASS_Z = (1 << 1),
|
|
|
|
SCE_PASS_RGBA = (1 << 2),
|
|
|
|
SCE_PASS_DIFFUSE = (1 << 3),
|
|
|
|
SCE_PASS_SPEC = (1 << 4),
|
|
|
|
SCE_PASS_SHADOW = (1 << 5),
|
|
|
|
SCE_PASS_AO = (1 << 6),
|
|
|
|
SCE_PASS_REFLECT = (1 << 7),
|
|
|
|
SCE_PASS_NORMAL = (1 << 8),
|
|
|
|
SCE_PASS_VECTOR = (1 << 9),
|
|
|
|
SCE_PASS_REFRACT = (1 << 10),
|
|
|
|
SCE_PASS_INDEXOB = (1 << 11),
|
|
|
|
SCE_PASS_UV = (1 << 12),
|
|
|
|
SCE_PASS_INDIRECT = (1 << 13),
|
|
|
|
SCE_PASS_MIST = (1 << 14),
|
|
|
|
SCE_PASS_RAYHITS = (1 << 15),
|
|
|
|
SCE_PASS_EMIT = (1 << 16),
|
|
|
|
SCE_PASS_ENVIRONMENT = (1 << 17),
|
|
|
|
SCE_PASS_INDEXMA = (1 << 18),
|
|
|
|
SCE_PASS_DIFFUSE_DIRECT = (1 << 19),
|
|
|
|
SCE_PASS_DIFFUSE_INDIRECT = (1 << 20),
|
|
|
|
SCE_PASS_DIFFUSE_COLOR = (1 << 21),
|
|
|
|
SCE_PASS_GLOSSY_DIRECT = (1 << 22),
|
|
|
|
SCE_PASS_GLOSSY_INDIRECT = (1 << 23),
|
|
|
|
SCE_PASS_GLOSSY_COLOR = (1 << 24),
|
|
|
|
SCE_PASS_TRANSM_DIRECT = (1 << 25),
|
|
|
|
SCE_PASS_TRANSM_INDIRECT = (1 << 26),
|
|
|
|
SCE_PASS_TRANSM_COLOR = (1 << 27),
|
|
|
|
SCE_PASS_SUBSURFACE_DIRECT = (1 << 28),
|
|
|
|
SCE_PASS_SUBSURFACE_INDIRECT = (1 << 29),
|
|
|
|
SCE_PASS_SUBSURFACE_COLOR = (1 << 30),
|
2014-10-04 15:00:26 +02:00
|
|
|
SCE_PASS_DEBUG = (1 << 31), /* This is a virtual pass. */
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 22:05:07 +01:00
|
|
|
} ScenePassType;
|
2009-07-06 15:27:40 +02:00
|
|
|
|
2006-12-10 21:30:15 +01:00
|
|
|
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
|
|
|
|
|
2015-04-06 15:40:12 +02:00
|
|
|
/* View - MultiView */
|
|
|
|
typedef struct SceneRenderView {
|
|
|
|
struct SceneRenderView *next, *prev;
|
|
|
|
|
|
|
|
char name[64]; /* MAX_NAME */
|
|
|
|
char suffix[64]; /* MAX_NAME */
|
|
|
|
|
|
|
|
int viewflag;
|
|
|
|
int pad[2];
|
|
|
|
char pad2[4];
|
|
|
|
|
|
|
|
} SceneRenderView;
|
|
|
|
|
|
|
|
/* srv->viewflag */
|
|
|
|
#define SCE_VIEW_DISABLE (1<<0)
|
|
|
|
|
|
|
|
/* scene.render.views_format */
|
|
|
|
enum {
|
|
|
|
SCE_VIEWS_FORMAT_STEREO_3D = 0,
|
|
|
|
SCE_VIEWS_FORMAT_MULTIVIEW = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ImageFormatData.views_output */
|
|
|
|
enum {
|
|
|
|
R_IMF_VIEWS_INDIVIDUAL = 0,
|
|
|
|
R_IMF_VIEWS_STEREO_3D = 1,
|
|
|
|
R_IMF_VIEWS_MULTIVIEW = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct Stereo3dFormat {
|
|
|
|
short flag;
|
|
|
|
char display_mode; /* encoding mode */
|
|
|
|
char anaglyph_type; /* anaglyph scheme for the user display */
|
|
|
|
char interlace_type; /* interlace type for the user display */
|
|
|
|
char pad[3];
|
|
|
|
} Stereo3dFormat;
|
|
|
|
|
|
|
|
/* Stereo3dFormat.display_mode */
|
|
|
|
typedef enum eStereoDisplayMode {
|
|
|
|
S3D_DISPLAY_ANAGLYPH = 0,
|
|
|
|
S3D_DISPLAY_INTERLACE = 1,
|
|
|
|
S3D_DISPLAY_PAGEFLIP = 2,
|
|
|
|
S3D_DISPLAY_SIDEBYSIDE = 3,
|
|
|
|
S3D_DISPLAY_TOPBOTTOM = 4,
|
|
|
|
} eStereoDisplayMode;
|
|
|
|
|
|
|
|
/* Stereo3dFormat.flag */
|
|
|
|
typedef enum eStereo3dFlag {
|
|
|
|
S3D_INTERLACE_SWAP = (1 << 0),
|
|
|
|
S3D_SIDEBYSIDE_CROSSEYED = (1 << 1),
|
|
|
|
S3D_SQUEEZED_FRAME = (1 << 2),
|
|
|
|
} eStereo3dFlag;
|
|
|
|
|
|
|
|
/* Stereo3dFormat.anaglyph_type */
|
|
|
|
typedef enum eStereo3dAnaglyphType {
|
|
|
|
S3D_ANAGLYPH_REDCYAN = 0,
|
|
|
|
S3D_ANAGLYPH_GREENMAGENTA = 1,
|
|
|
|
S3D_ANAGLYPH_YELLOWBLUE = 2,
|
|
|
|
} eStereo3dAnaglyphType;
|
|
|
|
|
|
|
|
/* Stereo3dFormat.interlace_type */
|
|
|
|
typedef enum eStereo3dInterlaceType {
|
|
|
|
S3D_INTERLACE_ROW = 0,
|
|
|
|
S3D_INTERLACE_COLUMN = 1,
|
|
|
|
S3D_INTERLACE_CHECKERBOARD = 2,
|
|
|
|
} eStereo3dInterlaceType;
|
|
|
|
|
2012-01-11 00:14:20 +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
|
|
|
|
2011-11-22 11:04:28 +01:00
|
|
|
/* Generic image format settings,
|
|
|
|
* this is used for NodeImageFile and IMAGE_OT_save_as operator too.
|
|
|
|
*
|
|
|
|
* note: its a bit strange that even though this is an image format struct
|
|
|
|
* the imtype can still be used to select video formats.
|
|
|
|
* RNA ensures these enum's are only selectable for render output.
|
|
|
|
*/
|
2011-11-21 21:19:58 +01:00
|
|
|
typedef struct ImageFormatData {
|
2011-11-22 01:35:26 +01:00
|
|
|
char imtype; /* R_IMF_IMTYPE_PNG, R_... */
|
2011-11-21 21:19:58 +01:00
|
|
|
/* note, video types should only ever be set from this
|
|
|
|
* structure when used from RenderData */
|
|
|
|
char depth; /* bits per channel, R_IMF_CHAN_DEPTH_8 -> 32,
|
|
|
|
* not a flag, only set 1 at a time */
|
|
|
|
|
2012-04-24 04:01:23 +02:00
|
|
|
char planes; /* - R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA */
|
2011-11-21 21:19:58 +01:00
|
|
|
char flag; /* generic options for all image types, alpha zbuffer */
|
|
|
|
|
|
|
|
char quality; /* (0 - 100), eg: jpeg quality */
|
|
|
|
char compress; /* (0 - 100), eg: png compression */
|
|
|
|
|
|
|
|
|
|
|
|
/* --- format specific --- */
|
|
|
|
|
|
|
|
/* OpenEXR */
|
|
|
|
char exr_codec;
|
|
|
|
|
|
|
|
/* Cineon */
|
|
|
|
char cineon_flag;
|
|
|
|
short cineon_white, cineon_black;
|
|
|
|
float cineon_gamma;
|
|
|
|
|
|
|
|
/* Jpeg2000 */
|
|
|
|
char jp2_flag;
|
2012-12-23 14:57:09 +01:00
|
|
|
char jp2_codec;
|
2011-11-21 21:19:58 +01:00
|
|
|
|
2016-01-14 11:02:13 +01:00
|
|
|
/* TIFF */
|
|
|
|
char tiff_codec;
|
|
|
|
|
|
|
|
char pad[4];
|
2015-04-06 15:40:12 +02:00
|
|
|
|
|
|
|
/* Multiview */
|
|
|
|
char views_format;
|
|
|
|
Stereo3dFormat stereo3d_format;
|
2011-11-21 21:19:58 +01:00
|
|
|
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 12:05:07 +02:00
|
|
|
/* color management */
|
|
|
|
ColorManagedViewSettings view_settings;
|
|
|
|
ColorManagedDisplaySettings display_settings;
|
2011-11-21 21:19:58 +01:00
|
|
|
} ImageFormatData;
|
|
|
|
|
2011-11-22 01:35:26 +01:00
|
|
|
|
|
|
|
/* ImageFormatData.imtype */
|
|
|
|
#define R_IMF_IMTYPE_TARGA 0
|
|
|
|
#define R_IMF_IMTYPE_IRIS 1
|
|
|
|
/* #define R_HAMX 2 */ /* hamx is nomore */
|
|
|
|
/* #define R_FTYPE 3 */ /* ftype is nomore */
|
|
|
|
#define R_IMF_IMTYPE_JPEG90 4
|
|
|
|
/* #define R_MOVIE 5 */ /* movie is nomore */
|
|
|
|
#define R_IMF_IMTYPE_IRIZ 7
|
|
|
|
#define R_IMF_IMTYPE_RAWTGA 14
|
|
|
|
#define R_IMF_IMTYPE_AVIRAW 15
|
|
|
|
#define R_IMF_IMTYPE_AVIJPEG 16
|
|
|
|
#define R_IMF_IMTYPE_PNG 17
|
2012-08-03 00:07:10 +02:00
|
|
|
/* #define R_IMF_IMTYPE_AVICODEC 18 */ /* avicodec is nomore */
|
2011-11-22 01:35:26 +01:00
|
|
|
#define R_IMF_IMTYPE_QUICKTIME 19
|
|
|
|
#define R_IMF_IMTYPE_BMP 20
|
|
|
|
#define R_IMF_IMTYPE_RADHDR 21
|
|
|
|
#define R_IMF_IMTYPE_TIFF 22
|
|
|
|
#define R_IMF_IMTYPE_OPENEXR 23
|
|
|
|
#define R_IMF_IMTYPE_FFMPEG 24
|
|
|
|
#define R_IMF_IMTYPE_FRAMESERVER 25
|
|
|
|
#define R_IMF_IMTYPE_CINEON 26
|
|
|
|
#define R_IMF_IMTYPE_DPX 27
|
|
|
|
#define R_IMF_IMTYPE_MULTILAYER 28
|
|
|
|
#define R_IMF_IMTYPE_DDS 29
|
|
|
|
#define R_IMF_IMTYPE_JP2 30
|
|
|
|
#define R_IMF_IMTYPE_H264 31
|
|
|
|
#define R_IMF_IMTYPE_XVID 32
|
|
|
|
#define R_IMF_IMTYPE_THEORA 33
|
2013-10-08 23:17:24 +02:00
|
|
|
#define R_IMF_IMTYPE_PSD 34
|
2011-11-22 01:35:26 +01:00
|
|
|
|
2011-11-24 06:18:26 +01:00
|
|
|
#define R_IMF_IMTYPE_INVALID 255
|
|
|
|
|
2011-11-21 21:19:58 +01:00
|
|
|
/* ImageFormatData.flag */
|
|
|
|
#define R_IMF_FLAG_ZBUF (1<<0) /* was R_OPENEXR_ZBUF */
|
|
|
|
#define R_IMF_FLAG_PREVIEW_JPG (1<<1) /* was R_PREVIEW_JPG */
|
|
|
|
|
2011-11-22 01:06:54 +01:00
|
|
|
/* return values from BKE_imtype_valid_depths, note this is depts per channel */
|
2011-11-21 21:19:58 +01:00
|
|
|
#define R_IMF_CHAN_DEPTH_1 (1<<0) /* 1bits (unused) */
|
|
|
|
#define R_IMF_CHAN_DEPTH_8 (1<<1) /* 8bits (default) */
|
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 14:49:00 +02:00
|
|
|
#define R_IMF_CHAN_DEPTH_10 (1<<2) /* 10bits (uncommon, Cineon/DPX support) */
|
|
|
|
#define R_IMF_CHAN_DEPTH_12 (1<<3) /* 12bits (uncommon, jp2/DPX support) */
|
|
|
|
#define R_IMF_CHAN_DEPTH_16 (1<<4) /* 16bits (tiff, halff float exr) */
|
|
|
|
#define R_IMF_CHAN_DEPTH_24 (1<<5) /* 24bits (unused) */
|
|
|
|
#define R_IMF_CHAN_DEPTH_32 (1<<6) /* 32bits (full float exr) */
|
2011-11-21 21:19:58 +01:00
|
|
|
|
2011-11-21 21:47:19 +01:00
|
|
|
/* ImageFormatData.planes */
|
|
|
|
#define R_IMF_PLANES_RGB 24
|
|
|
|
#define R_IMF_PLANES_RGBA 32
|
|
|
|
#define R_IMF_PLANES_BW 8
|
2011-11-21 21:19:58 +01:00
|
|
|
|
2011-11-22 01:35:26 +01:00
|
|
|
/* ImageFormatData.exr_codec */
|
|
|
|
#define R_IMF_EXR_CODEC_NONE 0
|
|
|
|
#define R_IMF_EXR_CODEC_PXR24 1
|
|
|
|
#define R_IMF_EXR_CODEC_ZIP 2
|
|
|
|
#define R_IMF_EXR_CODEC_PIZ 3
|
|
|
|
#define R_IMF_EXR_CODEC_RLE 4
|
2015-03-12 14:02:33 +01:00
|
|
|
#define R_IMF_EXR_CODEC_ZIPS 5
|
|
|
|
#define R_IMF_EXR_CODEC_B44 6
|
|
|
|
#define R_IMF_EXR_CODEC_B44A 7
|
|
|
|
#define R_IMF_EXR_CODEC_DWAA 8
|
|
|
|
#define R_IMF_EXR_CODEC_DWAB 9
|
|
|
|
#define R_IMF_EXR_CODEC_MAX 10
|
2011-11-22 01:35:26 +01:00
|
|
|
|
|
|
|
/* ImageFormatData.jp2_flag */
|
|
|
|
#define R_IMF_JP2_FLAG_YCC (1<<0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */
|
|
|
|
#define R_IMF_JP2_FLAG_CINE_PRESET (1<<1) /* was R_JPEG2K_CINE_PRESET */
|
|
|
|
#define R_IMF_JP2_FLAG_CINE_48 (1<<2) /* was R_JPEG2K_CINE_48FPS */
|
|
|
|
|
2012-12-23 14:57:09 +01:00
|
|
|
/* ImageFormatData.jp2_codec */
|
|
|
|
#define R_IMF_JP2_CODEC_JP2 0
|
|
|
|
#define R_IMF_JP2_CODEC_J2K 1
|
|
|
|
|
2011-11-22 01:35:26 +01:00
|
|
|
/* ImageFormatData.cineon_flag */
|
|
|
|
#define R_IMF_CINEON_FLAG_LOG (1<<0) /* was R_CINEON_LOG */
|
|
|
|
|
2016-01-14 11:02:13 +01:00
|
|
|
/* ImageFormatData.tiff_codec */
|
|
|
|
enum {
|
|
|
|
R_IMF_TIFF_CODEC_DEFLATE = 0,
|
|
|
|
R_IMF_TIFF_CODEC_LZW = 1,
|
|
|
|
R_IMF_TIFF_CODEC_PACKBITS = 2,
|
|
|
|
R_IMF_TIFF_CODEC_NONE = 3,
|
|
|
|
};
|
|
|
|
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 22:05:07 +01:00
|
|
|
typedef struct BakeData {
|
|
|
|
struct ImageFormatData im_format;
|
|
|
|
|
|
|
|
char filepath[1024]; /* FILE_MAX */
|
|
|
|
|
|
|
|
short width, height;
|
|
|
|
short margin, flag;
|
|
|
|
|
|
|
|
float cage_extrusion;
|
2016-01-15 16:00:56 +01:00
|
|
|
int pass_filter;
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 22:05:07 +01:00
|
|
|
|
|
|
|
char normal_swizzle[3];
|
|
|
|
char normal_space;
|
|
|
|
|
|
|
|
char save_mode;
|
|
|
|
char pad[3];
|
|
|
|
|
|
|
|
char cage[64]; /* MAX_NAME */
|
|
|
|
} BakeData;
|
|
|
|
|
|
|
|
/* (char) normal_swizzle */
|
|
|
|
typedef enum BakeNormalSwizzle {
|
|
|
|
R_BAKE_POSX = 0,
|
|
|
|
R_BAKE_POSY = 1,
|
|
|
|
R_BAKE_POSZ = 2,
|
|
|
|
R_BAKE_NEGX = 3,
|
|
|
|
R_BAKE_NEGY = 4,
|
|
|
|
R_BAKE_NEGZ = 5,
|
|
|
|
} BakeNormalSwizzle;
|
|
|
|
|
|
|
|
/* (char) save_mode */
|
|
|
|
typedef enum BakeSaveMode {
|
|
|
|
R_BAKE_SAVE_INTERNAL = 0,
|
|
|
|
R_BAKE_SAVE_EXTERNAL = 1,
|
|
|
|
} BakeSaveMode;
|
|
|
|
|
2016-01-15 16:00:56 +01:00
|
|
|
/* bake->pass_filter */
|
2016-01-16 03:01:10 +01:00
|
|
|
typedef enum BakePassFilter {
|
2016-01-15 16:00:56 +01:00
|
|
|
R_BAKE_PASS_FILTER_NONE = 0,
|
|
|
|
R_BAKE_PASS_FILTER_AO = (1 << 0),
|
|
|
|
R_BAKE_PASS_FILTER_EMIT = (1 << 1),
|
|
|
|
R_BAKE_PASS_FILTER_DIFFUSE = (1 << 2),
|
|
|
|
R_BAKE_PASS_FILTER_GLOSSY = (1 << 3),
|
|
|
|
R_BAKE_PASS_FILTER_TRANSM = (1 << 4),
|
|
|
|
R_BAKE_PASS_FILTER_SUBSURFACE = (1 << 5),
|
|
|
|
R_BAKE_PASS_FILTER_DIRECT = (1 << 6),
|
|
|
|
R_BAKE_PASS_FILTER_INDIRECT = (1 << 7),
|
|
|
|
R_BAKE_PASS_FILTER_COLOR = (1 << 8),
|
|
|
|
} BakePassFilter;
|
|
|
|
|
|
|
|
#define R_BAKE_PASS_FILTER_ALL (~0)
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Render Data */
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
typedef struct RenderData {
|
2011-11-21 21:19:58 +01:00
|
|
|
struct ImageFormatData im_format;
|
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;
|
2009-11-20 11:37:50 +01:00
|
|
|
struct QuicktimeCodecSettings qtcodecsettings;
|
2007-01-09 12:10:12 +01:00
|
|
|
struct FFMpegCodecData ffcodecdata;
|
2011-11-21 21:19:58 +01:00
|
|
|
|
2007-03-19 08:32:36 +01:00
|
|
|
int cfra, sfra, efra; /* frames as in 'images' */
|
2010-06-27 07:39:55 +02:00
|
|
|
float subframe; /* subframe offset from cfra, in 0.0-1.0 */
|
2007-03-19 08:32:36 +01:00
|
|
|
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
|
|
|
|
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 */
|
2014-01-27 19:58:54 +01:00
|
|
|
float edgeR, edgeG, edgeB;
|
2011-12-30 08:25:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* standalone player */ // XXX deprecated since 2.5
|
|
|
|
short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED;
|
|
|
|
short freqplay DNA_DEPRECATED;
|
|
|
|
/* standalone player */ // XXX deprecated since 2.5
|
|
|
|
short depth DNA_DEPRECATED, attrib DNA_DEPRECATED;
|
|
|
|
|
|
|
|
|
2010-11-21 04:45:35 +01:00
|
|
|
int frame_step; /* frames to jump during render/playback */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2011-12-04 07:05:48 +01:00
|
|
|
short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5
|
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 */
|
2011-09-25 14:31:21 +02:00
|
|
|
|
|
|
|
short filtertype; /* filter is box, tent, gauss, mitch, etc */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2013-03-24 11:52:20 +01:00
|
|
|
short size; /* size in % */
|
|
|
|
|
|
|
|
short maximsize DNA_DEPRECATED; /* max in Kb */
|
2013-02-21 19:07:56 +01:00
|
|
|
|
|
|
|
short pad6;
|
|
|
|
|
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
|
|
|
|
*/
|
2013-02-21 19:07:56 +01:00
|
|
|
int xsch;
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* The desired number of pixels in the y direction
|
|
|
|
*/
|
2013-02-21 19:07:56 +01:00
|
|
|
int ysch;
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* The number of part to use in the x direction
|
|
|
|
*/
|
2012-11-05 09:05:14 +01:00
|
|
|
short xparts DNA_DEPRECATED;
|
2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* The number of part to use in the y direction
|
|
|
|
*/
|
2012-11-05 09:05:14 +01:00
|
|
|
short yparts DNA_DEPRECATED;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* render tile dimensions
|
|
|
|
*/
|
2013-02-21 19:07:56 +01:00
|
|
|
int tilex, tiley;
|
2011-11-21 21:19:58 +01:00
|
|
|
|
2011-12-04 07:05:48 +01:00
|
|
|
short planes DNA_DEPRECATED, imtype DNA_DEPRECATED, subimtype DNA_DEPRECATED, quality DNA_DEPRECATED; /*deprecated!*/
|
2006-01-09 11:55:41 +01:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/**
|
|
|
|
* Render to image editor, fullscreen or to new window.
|
|
|
|
*/
|
|
|
|
short displaymode;
|
Option to lock the interface while rendering
Added function called WM_set_locked_interface which does
two things:
- Prevents event queue from being handled, so no operators
(see below) or values are even possible to run or change.
This prevents any kind of "destructive" action performed
from user while rendering.
- Locks interface refresh for regions which does have lock
set to truth in their template. Currently it's just a 3D
viewport, but in the future more regions could be considered
unsafe, or we could want to lock different parts of
interface when doing different jobs.
This is needed because 3D viewport could be using or changing
the same data as renderer currently uses, leading to threading
conflict.
Notifiers are still allowed to handle, so render progress is
seen on the screen, but would need to doublecheck on this, in
terms some notifiers could be changing the data.
For now interface locking happens for render job only in case
"Lock Interface" checkbox is enabled.
Other tools like backing would also benefit of this option.
It is possible to mark operator as safe to be used in locked
interface mode by adding OPTYPE_ALLOW_LOCKED bit to operator
template flags.
This bit is completely handled by wm_evem_system, not
with operator run routines, so it's still possible to
run operators from drivers and handlers.
Currently allowed image editor navigation and zooming.
Reviewers: brecht, campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D142
2014-01-29 11:07:14 +01:00
|
|
|
char use_lock_interface;
|
|
|
|
char pad7;
|
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
|
|
|
|
2009-10-01 20:30:59 +02:00
|
|
|
/**
|
|
|
|
* Flags for raytrace settings. Use bit-masking to access the settings.
|
|
|
|
*/
|
|
|
|
int raytrace_options;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Raytrace acceleration structure
|
|
|
|
*/
|
|
|
|
short raytrace_structure;
|
2004-01-27 06:46:12 +01:00
|
|
|
|
2011-12-04 17:22:53 +01:00
|
|
|
short pad1;
|
2004-01-27 06:46:12 +01:00
|
|
|
|
2009-10-01 20:30:59 +02:00
|
|
|
/* octree resolution */
|
|
|
|
short ocres;
|
|
|
|
short pad4;
|
|
|
|
|
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;
|
2009-10-01 20:30:59 +02:00
|
|
|
|
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;
|
2010-02-06 21:25:17 +01:00
|
|
|
short actlay;
|
|
|
|
|
|
|
|
/* number of mblur samples */
|
|
|
|
short mblur_samples;
|
2008-04-09 17:46:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
|
|
|
|
*/
|
2011-06-11 10:55:29 +02:00
|
|
|
float xasp, 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
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* color management settings - color profiles, gamma correction, etc */
|
|
|
|
int color_mgt_flag;
|
|
|
|
|
2011-12-04 07:05:48 +01:00
|
|
|
/** post-production settings. deprecated, but here for upwards compat (initialized to 1) */
|
2012-10-21 07:46:41 +02:00
|
|
|
float postgamma, posthue, postsat;
|
2007-02-07 10:17:57 +01:00
|
|
|
|
2010-03-22 10:30:00 +01:00
|
|
|
/* 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;
|
Apricot feature, thats fit for trunk.
Baking would split non-planer quads in an unpredictable way, which is fine for rending but game engines often use a fixed order (0,1,2), (0,2,3) or (1,2,3) (1,3,0).
Added an option to use a fixed order when baking.
2008-06-05 20:26:34 +02:00
|
|
|
short bake_normal_space, bake_quad_split;
|
2012-12-18 18:46:42 +01:00
|
|
|
float bake_maxdist, bake_biasdist;
|
2012-12-19 13:30:39 +01:00
|
|
|
short bake_samples, bake_pad;
|
2013-10-09 17:51:14 +02:00
|
|
|
float bake_user_scale, bake_pad1;
|
2004-01-04 23:10:36 +01:00
|
|
|
|
2011-06-11 12:09:56 +02:00
|
|
|
/* path to render output */
|
2012-01-21 15:54:53 +01:00
|
|
|
char pic[1024]; /* 1024 = FILE_MAX */
|
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. */
|
2012-01-21 15:54:53 +01:00
|
|
|
char stamp_udata[768];
|
2007-10-20 18:17:27 +02:00
|
|
|
|
|
|
|
/* foreground/background color. */
|
|
|
|
float fg_stamp[4];
|
|
|
|
float bg_stamp[4];
|
2008-02-13 12:18:08 +01:00
|
|
|
|
2010-03-16 18:37:34 +01:00
|
|
|
/* sequencer options */
|
|
|
|
char seq_prev_type;
|
|
|
|
char seq_rend_type;
|
|
|
|
char seq_flag; /* flag use for sequence render/draw */
|
|
|
|
char pad5[5];
|
|
|
|
|
2008-02-13 12:18:08 +01:00
|
|
|
/* render simplify */
|
2010-02-02 16:51:44 +01:00
|
|
|
int simplify_flag;
|
|
|
|
short simplify_subsurf;
|
2015-05-04 13:26:28 +02:00
|
|
|
short simplify_subsurf_render;
|
|
|
|
short simplify_shadowsamples, pad9;
|
2008-02-13 12:18:08 +01:00
|
|
|
float simplify_particles;
|
2015-05-04 13:26:28 +02:00
|
|
|
float simplify_particles_render;
|
2008-02-13 12:18:08 +01:00
|
|
|
float simplify_aosss;
|
2008-03-10 12:39:37 +01:00
|
|
|
|
|
|
|
/* cineon */
|
2011-12-04 07:05:48 +01:00
|
|
|
short cineonwhite DNA_DEPRECATED, cineonblack DNA_DEPRECATED; /*deprecated*/
|
|
|
|
float cineongamma DNA_DEPRECATED; /*deprecated*/
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* jpeg2000 */
|
2011-12-04 07:05:48 +01:00
|
|
|
short jp2_preset DNA_DEPRECATED, jp2_depth DNA_DEPRECATED; /*deprecated*/
|
2009-09-19 00:25:49 +02:00
|
|
|
int rpad3;
|
|
|
|
|
|
|
|
/* Dome variables */ // XXX deprecated since 2.5
|
2011-12-04 07:05:48 +01:00
|
|
|
short domeres DNA_DEPRECATED, domemode DNA_DEPRECATED; // XXX deprecated since 2.5
|
|
|
|
short domeangle DNA_DEPRECATED, dometilt DNA_DEPRECATED; // XXX deprecated since 2.5
|
|
|
|
float domeresbuf DNA_DEPRECATED; // XXX deprecated since 2.5
|
|
|
|
float pad2;
|
|
|
|
struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2012-04-11 01:53:46 +02:00
|
|
|
/* Freestyle line thickness options */
|
|
|
|
int line_thickness_mode;
|
|
|
|
float unit_line_thickness; /* in pixels */
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* render engine */
|
|
|
|
char engine[32];
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 22:05:07 +01:00
|
|
|
|
|
|
|
/* Cycles baking */
|
|
|
|
struct BakeData bake;
|
2014-07-09 15:02:07 +02:00
|
|
|
|
|
|
|
int preview_start_resolution;
|
2015-06-11 11:27:39 +02:00
|
|
|
|
|
|
|
/* Type of the debug pass to use.
|
|
|
|
* Only used when built with debug passes support.
|
|
|
|
*/
|
|
|
|
short debug_pass_type;
|
|
|
|
|
|
|
|
short pad;
|
2015-04-06 15:40:12 +02:00
|
|
|
|
|
|
|
/* MultiView */
|
2015-10-23 07:46:57 +02:00
|
|
|
ListBase views; /* SceneRenderView */
|
2015-04-06 15:40:12 +02:00
|
|
|
short actview;
|
|
|
|
short views_format;
|
|
|
|
short pad8[2];
|
2015-10-27 15:00:51 +01:00
|
|
|
|
|
|
|
/* Motion blur shutter */
|
|
|
|
struct CurveMapping mblur_shutter_curve;
|
2002-10-12 13:37:38 +02:00
|
|
|
} RenderData;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Render Conversion/Simplfication Settings */
|
|
|
|
|
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
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Game Engine - Dome */
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct GameDome {
|
|
|
|
short res, mode;
|
|
|
|
short angle, tilt;
|
|
|
|
float resbuf, pad2;
|
|
|
|
struct Text *warptext;
|
|
|
|
} GameDome;
|
|
|
|
|
|
|
|
#define DOME_FISHEYE 1
|
|
|
|
#define DOME_TRUNCATED_FRONT 2
|
|
|
|
#define DOME_TRUNCATED_REAR 3
|
|
|
|
#define DOME_ENVMAP 4
|
|
|
|
#define DOME_PANORAM_SPH 5
|
|
|
|
#define DOME_NUM_MODES 6
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Game Engine */
|
|
|
|
|
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
|
|
|
|
|
2011-10-07 07:19:21 +02:00
|
|
|
typedef struct RecastData {
|
2010-07-10 00:16:52 +02:00
|
|
|
float cellsize;
|
|
|
|
float cellheight;
|
|
|
|
float agentmaxslope;
|
|
|
|
float agentmaxclimb;
|
|
|
|
float agentheight;
|
|
|
|
float agentradius;
|
|
|
|
float edgemaxlen;
|
|
|
|
float edgemaxerror;
|
|
|
|
float regionminsize;
|
|
|
|
float regionmergesize;
|
|
|
|
int vertsperpoly;
|
|
|
|
float detailsampledist;
|
|
|
|
float detailsamplemaxerror;
|
2016-04-05 20:38:42 +02:00
|
|
|
char partitioning;
|
|
|
|
char pad1;
|
|
|
|
short pad2;
|
2010-07-10 00:16:52 +02:00
|
|
|
} RecastData;
|
|
|
|
|
2016-04-05 20:38:42 +02:00
|
|
|
#define RC_PARTITION_WATERSHED 0
|
|
|
|
#define RC_PARTITION_MONOTONE 1
|
|
|
|
#define RC_PARTITION_LAYERS 2
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct GameData {
|
|
|
|
|
2016-01-28 07:35:50 +01:00
|
|
|
/* standalone player */
|
2011-09-10 05:07:26 +02:00
|
|
|
struct GameFraming framing;
|
2012-01-11 21:53:22 +01:00
|
|
|
short playerflag, xplay, yplay, freqplay;
|
2011-09-10 05:07:26 +02:00
|
|
|
short depth, attrib, rt1, rt2;
|
2012-01-11 21:53:22 +01:00
|
|
|
short aasamples, pad4[3];
|
2011-09-10 05:07:26 +02:00
|
|
|
|
|
|
|
/* stereo/dome mode */
|
|
|
|
struct GameDome dome;
|
|
|
|
short stereoflag, stereomode;
|
2011-10-07 07:19:21 +02:00
|
|
|
float eyeseparation;
|
2011-09-10 05:07:26 +02:00
|
|
|
RecastData recastData;
|
|
|
|
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* physics (it was in world)*/
|
|
|
|
float gravity; /*Gravitation constant for the game world*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Radius of the activity bubble, in Manhattan length. Objects
|
|
|
|
* outside the box are activity-culled. */
|
2011-07-19 04:47:43 +02:00
|
|
|
float activityBoxRadius;
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/*
|
|
|
|
* bit 3: (gameengine): Activity culling is enabled.
|
2016-01-28 07:35:50 +01:00
|
|
|
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustum culling
|
2012-03-09 19:28:30 +01:00
|
|
|
*/
|
2011-10-04 20:15:28 +02:00
|
|
|
int flag;
|
2011-10-07 07:19:21 +02:00
|
|
|
short mode, matmode;
|
2009-09-19 00:25:49 +02:00
|
|
|
short occlusionRes; /* resolution of occlusion Z buffer in pixel */
|
|
|
|
short physicsEngine;
|
2013-07-30 00:36:51 +02:00
|
|
|
short exitkey;
|
|
|
|
short vsync; /* Controls vsync: off, on, or adaptive (if supported) */
|
2009-09-19 00:25:49 +02:00
|
|
|
short ticrate, maxlogicstep, physubstep, maxphystep;
|
2012-12-18 21:56:25 +01:00
|
|
|
short obstacleSimulation;
|
|
|
|
short raster_storage;
|
2010-06-19 01:48:52 +02:00
|
|
|
float levelHeight;
|
2015-03-22 18:13:53 +01:00
|
|
|
float deactivationtime, lineardeactthreshold, angulardeactthreshold;
|
|
|
|
|
|
|
|
/* Scene LoD */
|
|
|
|
short lodflag, pad2;
|
|
|
|
int scehysteresis, pad5;
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
} GameData;
|
|
|
|
|
|
|
|
#define STEREO_NOSTEREO 1
|
2011-09-25 14:31:21 +02:00
|
|
|
#define STEREO_ENABLED 2
|
|
|
|
#define STEREO_DOME 3
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
//#define STEREO_NOSTEREO 1
|
|
|
|
#define STEREO_QUADBUFFERED 2
|
|
|
|
#define STEREO_ABOVEBELOW 3
|
|
|
|
#define STEREO_INTERLACED 4
|
|
|
|
#define STEREO_ANAGLYPH 5
|
|
|
|
#define STEREO_SIDEBYSIDE 6
|
|
|
|
#define STEREO_VINTERLACE 7
|
|
|
|
//#define STEREO_DOME 8
|
2014-01-02 00:26:15 +01:00
|
|
|
#define STEREO_3DTVTOPBOTTOM 9
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* physicsEngine */
|
|
|
|
#define WOPHY_NONE 0
|
|
|
|
#define WOPHY_BULLET 5
|
|
|
|
|
2010-06-10 02:19:06 +02:00
|
|
|
/* obstacleSimulation */
|
|
|
|
#define OBSTSIMULATION_NONE 0
|
2010-08-10 22:48:28 +02:00
|
|
|
#define OBSTSIMULATION_TOI_rays 1
|
|
|
|
#define OBSTSIMULATION_TOI_cells 2
|
2010-06-10 02:19:06 +02:00
|
|
|
|
2012-12-18 21:56:25 +01:00
|
|
|
/* Raster storage */
|
|
|
|
#define RAS_STORE_AUTO 0
|
|
|
|
#define RAS_STORE_IMMEDIATE 1
|
|
|
|
#define RAS_STORE_VA 2
|
|
|
|
#define RAS_STORE_VBO 3
|
|
|
|
|
2013-07-30 00:36:51 +02:00
|
|
|
/* vsync */
|
2013-08-17 04:06:45 +02:00
|
|
|
#define VSYNC_ON 0
|
|
|
|
#define VSYNC_OFF 1
|
2013-07-30 00:36:51 +02:00
|
|
|
#define VSYNC_ADAPTIVE 2
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* GameData.flag */
|
2011-08-12 22:53:29 +02:00
|
|
|
#define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
|
2009-09-19 00:25:49 +02:00
|
|
|
#define GAME_ENABLE_ALL_FRAMES (1 << 1)
|
|
|
|
#define GAME_SHOW_DEBUG_PROPS (1 << 2)
|
|
|
|
#define GAME_SHOW_FRAMERATE (1 << 3)
|
|
|
|
#define GAME_SHOW_PHYSICS (1 << 4)
|
|
|
|
#define GAME_DISPLAY_LISTS (1 << 5)
|
|
|
|
#define GAME_GLSL_NO_LIGHTS (1 << 6)
|
|
|
|
#define GAME_GLSL_NO_SHADERS (1 << 7)
|
|
|
|
#define GAME_GLSL_NO_SHADOWS (1 << 8)
|
|
|
|
#define GAME_GLSL_NO_RAMPS (1 << 9)
|
|
|
|
#define GAME_GLSL_NO_NODES (1 << 10)
|
|
|
|
#define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
|
|
|
|
#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
|
2010-02-22 13:25:58 +01:00
|
|
|
#define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
|
2011-01-23 18:25:27 +01:00
|
|
|
#define GAME_SHOW_MOUSE (1 << 14)
|
2011-05-02 11:08:43 +02:00
|
|
|
#define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
|
2011-10-04 20:15:28 +02:00
|
|
|
#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 16)
|
2012-12-24 04:13:53 +01:00
|
|
|
#define GAME_NO_MATERIAL_CACHING (1 << 17)
|
Environment lighting for the GLSL mode
Environment lighting (aka ambient) is a key component of any renderer.
It's implemented like the Environment lighting of BI render for Approximate Gather mode. It support "Sky Color" and "White" Environment lighting modes.
It would be great if the user could see actual lighting conditions right in the Blender viewport instead of waiting for the renderer to complete the final image, exporting for external renderer or for a game engine.
Before:
{F113921}
After:
{F113922}
Example file: {F319013}
Original author: valentin_b4w
Alexander (Blend4Web Team)
Reviewers: valentin_b4w, campbellbarton, merwin, brecht
Reviewed By: brecht
Subscribers: panzergame, youle, duarteframos, AlexKowel, yurikovelenov, dingto, Evgeny_Rodygin
Projects: #rendering, #opengl_gfx
Differential Revision: https://developer.blender.org/D810
2016-07-04 10:01:32 +02:00
|
|
|
#define GAME_GLSL_NO_ENV_LIGHTING (1 << 18)
|
2011-10-04 20:15:28 +02:00
|
|
|
/* Note: GameData.flag is now an int (max 32 flags). A short could only take 16 flags */
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2012-01-11 21:53:22 +01:00
|
|
|
/* GameData.playerflag */
|
|
|
|
#define GAME_PLAYER_FULLSCREEN (1 << 0)
|
|
|
|
#define GAME_PLAYER_DESKTOP_RESOLUTION (1 << 1)
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* GameData.matmode */
|
2013-12-10 02:59:04 +01:00
|
|
|
enum {
|
2015-07-10 07:58:08 +02:00
|
|
|
#ifdef DNA_DEPRECATED
|
2013-12-10 02:59:04 +01:00
|
|
|
GAME_MAT_TEXFACE = 0, /* deprecated */
|
2015-07-10 07:58:08 +02:00
|
|
|
#endif
|
2013-12-10 02:59:04 +01:00
|
|
|
GAME_MAT_MULTITEX = 1,
|
|
|
|
GAME_MAT_GLSL = 2,
|
|
|
|
};
|
|
|
|
|
2015-03-22 18:13:53 +01:00
|
|
|
/* GameData.lodflag */
|
|
|
|
#define SCE_LOD_USE_HYST (1 << 0)
|
|
|
|
|
2012-01-17 17:31:13 +01:00
|
|
|
/* UV Paint */
|
|
|
|
#define UV_SCULPT_LOCK_BORDERS 1
|
|
|
|
#define UV_SCULPT_ALL_ISLANDS 2
|
|
|
|
|
|
|
|
#define UV_SCULPT_TOOL_PINCH 1
|
|
|
|
#define UV_SCULPT_TOOL_RELAX 2
|
|
|
|
#define UV_SCULPT_TOOL_GRAB 3
|
|
|
|
|
|
|
|
#define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1
|
|
|
|
#define UV_SCULPT_TOOL_RELAX_HC 2
|
|
|
|
|
2015-04-06 15:40:12 +02:00
|
|
|
/* Stereo Flags */
|
|
|
|
#define STEREO_RIGHT_NAME "right"
|
|
|
|
#define STEREO_LEFT_NAME "left"
|
|
|
|
#define STEREO_RIGHT_SUFFIX "_R"
|
|
|
|
#define STEREO_LEFT_SUFFIX "_L"
|
|
|
|
|
|
|
|
typedef enum StereoViews {
|
|
|
|
STEREO_LEFT_ID = 0,
|
|
|
|
STEREO_RIGHT_ID = 1,
|
|
|
|
STEREO_3D_ID = 2,
|
|
|
|
STEREO_MONO_ID = 3,
|
|
|
|
} StereoViews;
|
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
/* *************************************************************** */
|
2012-01-11 00:14:20 +01:00
|
|
|
/* Markers */
|
|
|
|
|
2012-01-17 17:31:13 +01:00
|
|
|
typedef struct TimeMarker {
|
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
|
|
|
struct TimeMarker *next, *prev;
|
|
|
|
int frame;
|
|
|
|
char name[64];
|
|
|
|
unsigned int flag;
|
2009-12-16 20:49:33 +01:00
|
|
|
struct Object *camera;
|
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
|
|
|
} TimeMarker;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Paint Mode/Tool Data */
|
|
|
|
|
2012-05-22 01:32:46 +02:00
|
|
|
#define PAINT_MAX_INPUT_SAMPLES 64
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* Paint Tool Base */
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct Paint {
|
2010-08-04 14:18:07 +02:00
|
|
|
struct Brush *brush;
|
2014-07-21 12:02:05 +02:00
|
|
|
struct Palette *palette;
|
2015-02-11 15:07:04 +01:00
|
|
|
struct CurveMapping *cavity_curve; /* cavity curve */
|
2014-07-21 12:02:05 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* WM Paint cursor */
|
|
|
|
void *paint_cursor;
|
|
|
|
unsigned char paint_cursor_col[4];
|
|
|
|
|
2012-05-22 01:32:46 +02:00
|
|
|
/* enum PaintFlags */
|
2009-11-03 23:50:09 +01:00
|
|
|
int flags;
|
2012-05-22 01:32:46 +02:00
|
|
|
|
|
|
|
/* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES inputs to
|
|
|
|
* smooth the stroke */
|
|
|
|
int num_input_samples;
|
|
|
|
|
2013-12-09 21:36:33 +01:00
|
|
|
/* flags used for symmetry */
|
|
|
|
int symmetry_flags;
|
2015-07-23 22:52:03 +02:00
|
|
|
|
|
|
|
float tile_offset[3];
|
|
|
|
int pad2;
|
2009-09-19 00:25:49 +02:00
|
|
|
} Paint;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Image Paint */
|
|
|
|
|
|
|
|
/* Texture/Image Editor */
|
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 {
|
2009-09-19 00:25:49 +02:00
|
|
|
Paint paint;
|
|
|
|
|
2014-10-06 15:12:06 +02:00
|
|
|
short flag, missing_data;
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* for projection painting only */
|
|
|
|
short seam_bleed, normal_angle;
|
2010-03-08 21:08:04 +01:00
|
|
|
short screen_grab_size[2]; /* capture size for re-projection */
|
|
|
|
|
2014-08-28 16:40:38 +02:00
|
|
|
int mode; /* mode used for texture painting */
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2014-08-28 16:40:38 +02:00
|
|
|
void *paintcursor; /* wm handle */
|
|
|
|
struct Image *stencil; /* workaround until we support true layer masks */
|
|
|
|
struct Image *clone; /* clone layer for image mode for projective texture painting */
|
|
|
|
struct Image *canvas; /* canvas when the explicit system is used for painting */
|
2014-07-21 12:02:05 +02:00
|
|
|
float stencil_col[3];
|
2015-01-29 19:23:45 +01:00
|
|
|
float dither; /* dither amount used when painting on byte images */
|
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;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Particle Edit */
|
|
|
|
|
|
|
|
/* Settings for a Particle Editing Brush */
|
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 ParticleBrushData {
|
2010-03-22 18:12:08 +01:00
|
|
|
short size; /* common setting */
|
|
|
|
short step, invert, count; /* for specific brushes only */
|
|
|
|
int flag;
|
|
|
|
float strength;
|
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
|
|
|
} ParticleBrushData;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* Particle Edit Mode 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
|
|
|
typedef struct ParticleEditSettings {
|
|
|
|
short flag;
|
|
|
|
short totrekey;
|
|
|
|
short totaddkey;
|
|
|
|
short brushtype;
|
|
|
|
|
|
|
|
ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
|
2009-09-19 00:25:49 +02:00
|
|
|
void *paintcursor; /* runtime */
|
|
|
|
|
|
|
|
float emitterdist, rt;
|
|
|
|
|
|
|
|
int selectmode;
|
|
|
|
int edittype;
|
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
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
int draw_step, fade_frames;
|
|
|
|
|
|
|
|
struct Scene *scene;
|
|
|
|
struct Object *object;
|
2014-10-22 16:36:23 +02:00
|
|
|
struct Object *shape_object;
|
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
|
|
|
} ParticleEditSettings;
|
2006-08-30 12:43:51 +02:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Sculpt */
|
=== 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
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* Sculpt */
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct Sculpt {
|
|
|
|
Paint paint;
|
|
|
|
|
|
|
|
/* For rotating around a pivot point */
|
2010-07-14 16:11:03 +02:00
|
|
|
//float pivot[3]; XXX not used?
|
2009-09-19 00:25:49 +02:00
|
|
|
int flags;
|
|
|
|
|
|
|
|
/* Control tablet input */
|
2010-07-14 16:11:03 +02:00
|
|
|
//char tablet_size, tablet_strength; XXX not used?
|
|
|
|
int radial_symm[3];
|
|
|
|
|
2012-12-30 19:27:33 +01:00
|
|
|
/* Maximum edge length for dynamic topology sculpting (in pixels) */
|
2014-03-31 18:30:51 +02:00
|
|
|
float detail_size;
|
2012-12-30 19:31:01 +01:00
|
|
|
|
|
|
|
/* Direction used for SCULPT_OT_symmetrize operator */
|
|
|
|
int symmetrize_direction;
|
2013-12-12 18:01:11 +01:00
|
|
|
|
|
|
|
/* gravity factor for sculpting */
|
|
|
|
float gravity_factor;
|
2014-03-22 16:47:18 +01:00
|
|
|
|
|
|
|
/* scale for constant detail size */
|
2014-03-22 22:35:07 +01:00
|
|
|
float constant_detail;
|
2015-05-06 22:51:49 +02:00
|
|
|
float detail_percent;
|
|
|
|
float pad;
|
2013-12-12 18:01:11 +01:00
|
|
|
|
|
|
|
struct Object *gravity_object;
|
2009-09-19 00:25:49 +02:00
|
|
|
} Sculpt;
|
|
|
|
|
2012-01-17 17:31:13 +01:00
|
|
|
typedef struct UvSculpt {
|
|
|
|
Paint paint;
|
|
|
|
} UvSculpt;
|
2015-12-13 09:03:13 +01:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Vertex Paint */
|
|
|
|
|
|
|
|
/* Vertex Paint */
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct VPaint {
|
|
|
|
Paint paint;
|
|
|
|
|
2010-01-20 09:30:40 +01:00
|
|
|
short flag, pad;
|
2009-09-19 00:25:49 +02:00
|
|
|
int tot; /* allocation size of prev buffers */
|
|
|
|
unsigned int *vpaint_prev; /* previous mesh colors */
|
|
|
|
struct MDeformVert *wpaint_prev; /* previous vertex weights */
|
|
|
|
|
|
|
|
void *paintcursor; /* wm handle */
|
|
|
|
} VPaint;
|
|
|
|
|
2012-09-23 20:50:56 +02:00
|
|
|
/* VPaint.flag */
|
|
|
|
enum {
|
|
|
|
// VP_COLINDEX = (1 << 0), /* only paint onto active material*/ /* deprecated since before 2.49 */
|
2013-12-18 17:49:01 +01:00
|
|
|
// VP_AREA = (1 << 1), /* deprecated since 2.70 */
|
2012-09-23 20:50:56 +02:00
|
|
|
VP_NORMALS = (1 << 3),
|
|
|
|
VP_SPRAY = (1 << 4),
|
|
|
|
// VP_MIRROR_X = (1 << 5), /* deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X) */
|
|
|
|
VP_ONLYVGROUP = (1 << 7) /* weight paint only */
|
|
|
|
};
|
2009-01-10 15:19:14 +01:00
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* GPencil Stroke Sculpting */
|
|
|
|
|
|
|
|
/* Brush types */
|
|
|
|
typedef enum eGP_EditBrush_Types {
|
|
|
|
GP_EDITBRUSH_TYPE_SMOOTH = 0,
|
|
|
|
GP_EDITBRUSH_TYPE_THICKNESS = 1,
|
|
|
|
GP_EDITBRUSH_TYPE_GRAB = 2,
|
|
|
|
GP_EDITBRUSH_TYPE_PUSH = 3,
|
|
|
|
GP_EDITBRUSH_TYPE_TWIST = 4,
|
|
|
|
GP_EDITBRUSH_TYPE_PINCH = 5,
|
2015-12-14 19:20:31 +01:00
|
|
|
GP_EDITBRUSH_TYPE_RANDOMIZE = 6,
|
2015-12-13 09:03:13 +01:00
|
|
|
GP_EDITBRUSH_TYPE_SUBDIVIDE = 7,
|
|
|
|
GP_EDITBRUSH_TYPE_SIMPLIFY = 8,
|
|
|
|
GP_EDITBRUSH_TYPE_CLONE = 9,
|
2016-08-03 23:31:48 +02:00
|
|
|
GP_EDITBRUSH_TYPE_STRENGTH = 10,
|
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
/* !!! Update GP_EditBrush_Data brush[###]; below !!! */
|
|
|
|
TOT_GP_EDITBRUSH_TYPES
|
|
|
|
} eGP_EditBrush_Types;
|
|
|
|
|
|
|
|
/* Settings for a GPencil Stroke Sculpting Brush */
|
|
|
|
typedef struct GP_EditBrush_Data {
|
|
|
|
short size; /* radius of brush */
|
|
|
|
short flag; /* eGP_EditBrush_Flag */
|
|
|
|
float strength; /* strength of effect */
|
|
|
|
} GP_EditBrush_Data;
|
|
|
|
|
|
|
|
/* GP_EditBrush_Data.flag */
|
|
|
|
typedef enum eGP_EditBrush_Flag {
|
|
|
|
/* invert the effect of the brush */
|
|
|
|
GP_EDITBRUSH_FLAG_INVERT = (1 << 0),
|
|
|
|
/* adjust strength using pen pressure */
|
|
|
|
GP_EDITBRUSH_FLAG_USE_PRESSURE = (1 << 1),
|
|
|
|
|
|
|
|
/* strength of brush falls off with distance from cursor */
|
|
|
|
GP_EDITBRUSH_FLAG_USE_FALLOFF = (1 << 2),
|
|
|
|
|
|
|
|
/* smooth brush affects pressure values as well */
|
|
|
|
GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE = (1 << 3)
|
|
|
|
} eGP_EditBrush_Flag;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* GPencil Stroke Sculpting Settings */
|
|
|
|
typedef struct GP_BrushEdit_Settings {
|
2016-08-03 23:31:48 +02:00
|
|
|
GP_EditBrush_Data brush[11]; /* TOT_GP_EDITBRUSH_TYPES */
|
2015-12-13 09:03:13 +01:00
|
|
|
void *paintcursor; /* runtime */
|
|
|
|
|
|
|
|
int brushtype; /* eGP_EditBrush_Types */
|
|
|
|
int flag; /* eGP_BrushEdit_SettingsFlag */
|
2016-08-03 23:31:48 +02:00
|
|
|
char pad[4];
|
|
|
|
float alpha; /* alpha factor for selection color */
|
2015-12-13 09:03:13 +01:00
|
|
|
} GP_BrushEdit_Settings;
|
|
|
|
|
|
|
|
/* GP_BrushEdit_Settings.flag */
|
|
|
|
typedef enum eGP_BrushEdit_SettingsFlag {
|
|
|
|
/* only affect selected points */
|
2016-08-03 23:31:48 +02:00
|
|
|
GP_BRUSHEDIT_FLAG_SELECT_MASK = (1 << 0),
|
|
|
|
/* apply brush to position */
|
|
|
|
GP_BRUSHEDIT_FLAG_APPLY_POSITION = (1 << 1),
|
|
|
|
/* apply brush to strength */
|
|
|
|
GP_BRUSHEDIT_FLAG_APPLY_STRENGTH = (1 << 2),
|
|
|
|
/* apply brush to thickness */
|
2016-09-07 09:54:50 +02:00
|
|
|
GP_BRUSHEDIT_FLAG_APPLY_THICKNESS = (1 << 3),
|
|
|
|
/* apply interpolation to all layers */
|
|
|
|
GP_BRUSHEDIT_FLAG_INTERPOLATE_ALL_LAYERS = (1 << 4),
|
|
|
|
/* apply interpolation to only selected */
|
|
|
|
GP_BRUSHEDIT_FLAG_INTERPOLATE_ONLY_SELECTED = (1 << 5)
|
2016-08-03 23:31:48 +02:00
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
} eGP_BrushEdit_SettingsFlag;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Transform Orientations */
|
|
|
|
|
|
|
|
typedef struct TransformOrientation {
|
|
|
|
struct TransformOrientation *next, *prev;
|
2012-01-11 09:51:06 +01:00
|
|
|
char name[64]; /* MAX_NAME */
|
2012-01-11 00:14:20 +01:00
|
|
|
float mat[3][3];
|
2012-01-11 09:51:06 +01:00
|
|
|
int pad;
|
2012-01-11 00:14:20 +01:00
|
|
|
} TransformOrientation;
|
|
|
|
|
2012-01-12 18:22:32 +01:00
|
|
|
/* *************************************************************** */
|
2012-03-09 19:28:30 +01:00
|
|
|
/* Unified Paint Settings
|
|
|
|
*/
|
2012-01-12 18:22:32 +01:00
|
|
|
|
|
|
|
/* These settings can override the equivalent fields in the active
|
2012-03-09 19:28:30 +01:00
|
|
|
* Brush for any paint mode; the flag field controls whether these
|
|
|
|
* values are used */
|
2012-01-12 18:22:32 +01:00
|
|
|
typedef struct UnifiedPaintSettings {
|
|
|
|
/* unified radius of brush in pixels */
|
|
|
|
int size;
|
|
|
|
|
|
|
|
/* unified radius of brush in Blender units */
|
|
|
|
float unprojected_radius;
|
|
|
|
|
|
|
|
/* unified strength of brush */
|
|
|
|
float alpha;
|
|
|
|
|
2012-04-29 22:04:25 +02:00
|
|
|
/* unified brush weight, [0, 1] */
|
|
|
|
float weight;
|
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
/* unified brush color */
|
|
|
|
float rgb[3];
|
|
|
|
/* unified brush secondary color */
|
|
|
|
float secondary_rgb[3];
|
|
|
|
|
2012-01-12 18:22:32 +01:00
|
|
|
/* user preferences for sculpt and paint */
|
|
|
|
int flag;
|
2013-01-16 04:20:36 +01:00
|
|
|
|
|
|
|
/* rake rotation */
|
|
|
|
|
|
|
|
/* record movement of mouse so that rake can start at an intuitive angle */
|
2013-03-13 04:46:22 +01:00
|
|
|
float last_rake[2];
|
2014-12-29 11:35:22 +01:00
|
|
|
float last_rake_angle;
|
|
|
|
|
|
|
|
int last_stroke_valid;
|
|
|
|
float average_stroke_accum[3];
|
|
|
|
int average_stroke_counter;
|
|
|
|
|
2013-01-16 04:20:36 +01:00
|
|
|
|
2013-03-13 04:46:22 +01:00
|
|
|
float brush_rotation;
|
2014-12-26 23:51:27 +01:00
|
|
|
float brush_rotation_sec;
|
2013-01-16 04:20:36 +01:00
|
|
|
|
2014-04-13 18:03:14 +02:00
|
|
|
/*********************************************************************************
|
|
|
|
* all data below are used to communicate with cursor drawing and tex sampling *
|
|
|
|
*********************************************************************************/
|
2014-07-21 12:02:05 +02:00
|
|
|
int anchored_size;
|
|
|
|
|
|
|
|
float overlap_factor; /* normalization factor due to accumulated value of curve along spacing.
|
|
|
|
* Calculated when brush spacing changes to dampen strength of stroke
|
|
|
|
* if space attenuation is used*/
|
2014-12-26 23:51:27 +01:00
|
|
|
char draw_inverted;
|
|
|
|
/* check is there an ongoing stroke right now */
|
|
|
|
char stroke_active;
|
|
|
|
|
|
|
|
char draw_anchored;
|
|
|
|
char do_linear_conversion;
|
|
|
|
|
2015-11-24 21:40:18 +01:00
|
|
|
/* store last location of stroke or whether the mesh was hit. Valid only while stroke is active */
|
|
|
|
float last_location[3];
|
|
|
|
int last_hit;
|
|
|
|
|
2013-01-16 04:20:36 +01:00
|
|
|
float anchored_initial_mouse[2];
|
|
|
|
|
2014-12-26 23:51:27 +01:00
|
|
|
/* radius of brush, premultiplied with pressure.
|
|
|
|
* In case of anchored brushes contains the anchored radius */
|
|
|
|
float pixel_radius;
|
2013-12-09 21:36:33 +01:00
|
|
|
|
2013-01-16 04:20:36 +01:00
|
|
|
/* drawing pressure */
|
2014-04-13 17:14:45 +02:00
|
|
|
float size_pressure_value;
|
2013-03-13 04:46:22 +01:00
|
|
|
|
|
|
|
/* position of mouse, used to sample the texture */
|
|
|
|
float tex_mouse[2];
|
2013-04-22 12:46:01 +02:00
|
|
|
|
|
|
|
/* position of mouse, used to sample the mask texture */
|
|
|
|
float mask_tex_mouse[2];
|
|
|
|
|
2014-04-13 18:03:14 +02:00
|
|
|
/* ColorSpace cache to avoid locking up during sampling */
|
|
|
|
struct ColorSpace *colorspace;
|
2012-01-12 18:22:32 +01:00
|
|
|
} UnifiedPaintSettings;
|
|
|
|
|
|
|
|
typedef enum {
|
2013-04-13 02:43:49 +02:00
|
|
|
UNIFIED_PAINT_SIZE = (1 << 0),
|
|
|
|
UNIFIED_PAINT_ALPHA = (1 << 1),
|
|
|
|
UNIFIED_PAINT_WEIGHT = (1 << 5),
|
2014-07-21 12:02:05 +02:00
|
|
|
UNIFIED_PAINT_COLOR = (1 << 6),
|
2012-01-12 18:22:32 +01:00
|
|
|
|
2014-01-17 07:35:03 +01:00
|
|
|
/* only used if unified size is enabled, mirrors the brush flags
|
2012-03-09 19:28:30 +01:00
|
|
|
* BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */
|
2013-04-13 02:43:49 +02:00
|
|
|
UNIFIED_PAINT_BRUSH_LOCK_SIZE = (1 << 2),
|
|
|
|
UNIFIED_PAINT_BRUSH_SIZE_PRESSURE = (1 << 3),
|
2012-01-12 18:22:32 +01:00
|
|
|
|
2012-01-12 19:08:07 +01:00
|
|
|
/* only used if unified alpha is enabled, mirrors the brush flag
|
2012-03-09 19:28:30 +01:00
|
|
|
* BRUSH_ALPHA_PRESSURE */
|
2013-04-13 02:43:49 +02:00
|
|
|
UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE = (1 << 4)
|
2012-01-12 18:22:32 +01:00
|
|
|
} UnifiedPaintSettingsFlags;
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2016-04-15 10:10:05 +02:00
|
|
|
|
|
|
|
typedef struct CurvePaintSettings {
|
|
|
|
char curve_type;
|
|
|
|
char flag;
|
|
|
|
char depth_mode;
|
|
|
|
char surface_plane;
|
2016-07-25 06:14:31 +02:00
|
|
|
char fit_method;
|
|
|
|
char pad;
|
|
|
|
short error_threshold;
|
2016-04-15 10:10:05 +02:00
|
|
|
float radius_min, radius_max;
|
|
|
|
float radius_taper_start, radius_taper_end;
|
2016-05-04 07:45:55 +02:00
|
|
|
float surface_offset;
|
2016-04-15 10:10:05 +02:00
|
|
|
float corner_angle;
|
|
|
|
} CurvePaintSettings;
|
|
|
|
|
|
|
|
/* CurvePaintSettings.flag */
|
|
|
|
enum {
|
|
|
|
CURVE_PAINT_FLAG_CORNERS_DETECT = (1 << 0),
|
|
|
|
CURVE_PAINT_FLAG_PRESSURE_RADIUS = (1 << 1),
|
|
|
|
CURVE_PAINT_FLAG_DEPTH_STROKE_ENDPOINTS = (1 << 2),
|
2016-05-04 07:45:55 +02:00
|
|
|
CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS = (1 << 3),
|
2016-04-15 10:10:05 +02:00
|
|
|
};
|
|
|
|
|
2016-07-25 06:14:31 +02:00
|
|
|
/* CurvePaintSettings.fit_method */
|
|
|
|
enum {
|
|
|
|
CURVE_PAINT_FIT_METHOD_REFIT = 0,
|
|
|
|
CURVE_PAINT_FIT_METHOD_SPLIT = 1,
|
|
|
|
};
|
|
|
|
|
2016-04-15 10:10:05 +02:00
|
|
|
/* CurvePaintSettings.depth_mode */
|
|
|
|
enum {
|
|
|
|
CURVE_PAINT_PROJECT_CURSOR = 0,
|
|
|
|
CURVE_PAINT_PROJECT_SURFACE = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* CurvePaintSettings.surface_plane */
|
|
|
|
enum {
|
|
|
|
CURVE_PAINT_SURFACE_PLANE_NORMAL_VIEW = 0,
|
|
|
|
CURVE_PAINT_SURFACE_PLANE_NORMAL_SURFACE = 1,
|
|
|
|
CURVE_PAINT_SURFACE_PLANE_VIEW = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Stats */
|
|
|
|
|
|
|
|
/* Stats for Meshes */
|
2013-04-17 11:27:23 +02:00
|
|
|
typedef struct MeshStatVis {
|
|
|
|
char type;
|
|
|
|
char _pad1[2];
|
|
|
|
|
|
|
|
/* overhang */
|
|
|
|
char overhang_axis;
|
|
|
|
float overhang_min, overhang_max;
|
|
|
|
|
|
|
|
/* thickness */
|
|
|
|
float thickness_min, thickness_max;
|
|
|
|
char thickness_samples;
|
|
|
|
char _pad2[3];
|
2013-04-18 06:24:18 +02:00
|
|
|
|
|
|
|
/* distort */
|
|
|
|
float distort_min, distort_max;
|
2013-04-18 19:09:56 +02:00
|
|
|
|
|
|
|
/* sharp */
|
|
|
|
float sharp_min, sharp_max;
|
2013-04-17 11:27:23 +02:00
|
|
|
} MeshStatVis;
|
|
|
|
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Tool Settings */
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2005-08-24 22:37:25 +02:00
|
|
|
typedef struct ToolSettings {
|
2009-09-19 00:25:49 +02:00
|
|
|
VPaint *vpaint; /* vertex paint */
|
|
|
|
VPaint *wpaint; /* weight paint */
|
|
|
|
Sculpt *sculpt;
|
2012-01-17 17:31:13 +01:00
|
|
|
UvSculpt *uvsculpt; /* uv smooth */
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2012-04-29 22:04:25 +02:00
|
|
|
/* Vertex group weight - used only for editmode, not weight
|
2012-05-17 01:37:23 +02:00
|
|
|
* paint */
|
2009-09-19 00:25:49 +02:00
|
|
|
float vgroup_weight;
|
|
|
|
|
|
|
|
float doublimit; /* remove doubles limit */
|
|
|
|
float normalsize; /* size of normals */
|
|
|
|
short automerge;
|
|
|
|
|
|
|
|
/* Selection Mode for Mesh */
|
|
|
|
short selectmode;
|
|
|
|
|
2006-05-21 19:12:10 +02:00
|
|
|
/* UV Calculation */
|
2013-10-08 15:07:09 +02:00
|
|
|
char unwrapper;
|
|
|
|
char uvcalc_flag;
|
|
|
|
char uv_flag;
|
|
|
|
char uv_selectmode;
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
float uvcalc_margin;
|
2013-10-08 15:07:09 +02:00
|
|
|
|
2007-12-15 08:35:16 +01:00
|
|
|
/* Auto-IK */
|
2013-10-08 15:07:09 +02:00
|
|
|
short autoik_chainlen; /* runtime only */
|
|
|
|
|
|
|
|
/* Grease Pencil */
|
2014-12-07 14:42:10 +01:00
|
|
|
char gpencil_flags; /* flags/options for how the tool works */
|
|
|
|
char gpencil_src; /* for main 3D view Grease Pencil, where data comes from */
|
2013-10-08 15:07:09 +02:00
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
char gpencil_v3d_align; /* stroke placement settings: 3D View */
|
|
|
|
char gpencil_v2d_align; /* : General 2D Editor */
|
|
|
|
char gpencil_seq_align; /* : Sequencer Preview */
|
|
|
|
char gpencil_ima_align; /* : Image Editor */
|
|
|
|
|
|
|
|
/* Grease Pencil Sculpt */
|
|
|
|
struct GP_BrushEdit_Settings gp_sculpt;
|
2007-11-07 01:28:45 +01:00
|
|
|
|
2016-08-03 23:31:48 +02:00
|
|
|
/* Grease Pencil Drawing Brushes (bGPDbrush) */
|
|
|
|
ListBase gp_brushes;
|
|
|
|
|
=== 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
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* Transform Proportional Area of Effect */
|
|
|
|
float proportional_size;
|
|
|
|
|
2006-05-21 19:12:10 +02:00
|
|
|
/* Select Group Threshold */
|
|
|
|
float select_thresh;
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* Auto-Keying Mode */
|
|
|
|
short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
|
2016-03-12 15:49:26 +01:00
|
|
|
char keyframe_type; /* keyframe type (see DNA_curve_types.h) */
|
2012-04-23 04:48:05 +02:00
|
|
|
|
2007-03-21 07:33:04 +01:00
|
|
|
/* Multires */
|
|
|
|
char multires_subdiv_type;
|
2012-04-23 04:48:05 +02: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;
|
2008-05-27 15:33:24 +02:00
|
|
|
float skgen_retarget_angle_weight;
|
|
|
|
float skgen_retarget_length_weight;
|
2008-06-17 23:00:06 +02:00
|
|
|
float skgen_retarget_distance_weight;
|
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];
|
2008-07-07 19:27:22 +02:00
|
|
|
char skgen_multi_level;
|
2012-04-23 04:48:05 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* Skeleton Sketching */
|
|
|
|
struct Object *skgen_template;
|
|
|
|
char bone_sketching;
|
|
|
|
char bone_sketching_convert;
|
|
|
|
char skgen_subdivision_number;
|
|
|
|
char skgen_retarget_options;
|
|
|
|
char skgen_retarget_roll;
|
|
|
|
char skgen_side_string[8];
|
|
|
|
char skgen_num_string[8];
|
2007-11-07 01:28:45 +01:00
|
|
|
|
2008-05-08 18:33:55 +02:00
|
|
|
/* Alt+RMB option */
|
|
|
|
char edge_mode;
|
2011-03-10 06:52:16 +01:00
|
|
|
char edge_mode_live_unwrap;
|
2005-08-24 22:37:25 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* Transform */
|
2012-06-29 16:34:46 +02:00
|
|
|
char snap_mode, snap_node_mode;
|
2012-12-03 13:03:16 +01:00
|
|
|
char snap_uv_mode;
|
2011-03-10 06:52:16 +01:00
|
|
|
short snap_flag, snap_target;
|
2009-09-19 00:25:49 +02:00
|
|
|
short proportional, prop_mode;
|
2010-07-31 21:26:21 +02:00
|
|
|
char proportional_objects; /* proportional edit, object mode */
|
2015-04-09 18:29:58 +02:00
|
|
|
char proportional_mask; /* proportional edit, mask editing */
|
|
|
|
char proportional_action; /* proportional edit, action editor */
|
2015-04-10 05:41:57 +02:00
|
|
|
char proportional_fcurve; /* proportional edit, graph editor */
|
2015-04-15 06:51:17 +02:00
|
|
|
char lock_markers; /* lock marker editing */
|
2015-04-14 12:11:24 +02:00
|
|
|
char pad4[5];
|
2009-10-30 03:09:52 +01:00
|
|
|
|
2011-09-14 10:21:21 +02:00
|
|
|
char auto_normalize; /*auto normalizing mode in wpaint*/
|
|
|
|
char multipaint; /* paint multiple bones in wpaint */
|
2013-02-22 05:09:04 +01:00
|
|
|
char weightuser;
|
2013-06-23 17:37:08 +02:00
|
|
|
char vgroupsubset; /* subset selection filter in wpaint */
|
2010-07-22 20:56:46 +02:00
|
|
|
|
2012-01-17 17:31:13 +01:00
|
|
|
/* UV painting */
|
|
|
|
int use_uv_sculpt;
|
|
|
|
int uv_sculpt_settings;
|
|
|
|
int uv_sculpt_tool;
|
|
|
|
int uv_relax_method;
|
2012-01-12 18:22:32 +01:00
|
|
|
/* XXX: these sculpt_paint_* fields are deprecated, use the
|
2012-03-09 19:28:30 +01:00
|
|
|
* unified_paint_settings field instead! */
|
2012-06-29 16:34:46 +02:00
|
|
|
short sculpt_paint_settings DNA_DEPRECATED; short pad5;
|
2012-01-12 18:22:32 +01:00
|
|
|
int sculpt_paint_unified_size DNA_DEPRECATED;
|
|
|
|
float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED;
|
|
|
|
float sculpt_paint_unified_alpha DNA_DEPRECATED;
|
|
|
|
|
|
|
|
/* Unified Paint Settings */
|
|
|
|
struct UnifiedPaintSettings unified_paint_settings;
|
2013-04-17 11:27:23 +02:00
|
|
|
|
2016-04-15 10:10:05 +02:00
|
|
|
struct CurvePaintSettings curve_paint_settings;
|
|
|
|
|
2013-04-17 11:27:23 +02:00
|
|
|
struct MeshStatVis statvis;
|
2009-09-19 00:25:49 +02:00
|
|
|
} ToolSettings;
|
2008-03-21 02:10:32 +01:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Assorted Scene Data */
|
|
|
|
|
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Stats (show in Info header) */
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct bStats {
|
|
|
|
/* scene totals for visible layers */
|
|
|
|
int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
|
|
|
|
int totvert, totface;
|
|
|
|
} bStats;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Unit Settings */
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef struct UnitSettings {
|
|
|
|
/* Display/Editing unit options for each scene */
|
|
|
|
float scale_length; /* maybe have other unit conversions? */
|
2010-11-18 15:10:09 +01:00
|
|
|
char system; /* imperial, metric etc */
|
2012-09-26 22:05:38 +02:00
|
|
|
char system_rotation; /* not implemented as a proper unit system yet */
|
2010-11-18 15:10:09 +01:00
|
|
|
short flag;
|
2009-09-19 00:25:49 +02:00
|
|
|
} UnitSettings;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Global/Common Physics Settings */
|
|
|
|
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-10-01 00:10:14 +02:00
|
|
|
typedef struct PhysicsSettings {
|
|
|
|
float gravity[3];
|
2010-04-13 22:06:55 +02:00
|
|
|
int flag, quick_cache_step, rt;
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-10-01 00:10:14 +02:00
|
|
|
} PhysicsSettings;
|
|
|
|
|
2015-01-19 06:30:35 +01:00
|
|
|
/* ------------------------------------------- */
|
|
|
|
/* Safe Area options used in Camera View & VSE
|
|
|
|
*/
|
|
|
|
typedef struct DisplaySafeAreas {
|
|
|
|
/* each value represents the (x,y) margins as a multiplier.
|
|
|
|
* 'center' in this context is just the name for a different kind of safe-area */
|
|
|
|
|
|
|
|
float title[2]; /* Title Safe */
|
|
|
|
float action[2]; /* Image/Graphics Safe */
|
|
|
|
|
|
|
|
/* use for alternate aspect ratio */
|
|
|
|
float title_center[2];
|
|
|
|
float action_center[2];
|
|
|
|
} DisplaySafeAreas;
|
|
|
|
|
2012-01-11 00:14:20 +01:00
|
|
|
/* *************************************************************** */
|
|
|
|
/* Scene ID-Block */
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
typedef struct Scene {
|
|
|
|
ID id;
|
2009-09-19 00:25:49 +02:00
|
|
|
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
struct Object *camera;
|
|
|
|
struct World *world;
|
|
|
|
|
|
|
|
struct Scene *set;
|
|
|
|
|
|
|
|
ListBase base;
|
2009-09-19 00:25:49 +02:00
|
|
|
struct Base *basact; /* active base */
|
|
|
|
struct Object *obedit; /* name replaces old G.obedit */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
float cursor[3]; /* 3d cursor location */
|
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 */
|
2005-05-03 12:54:42 +02:00
|
|
|
|
2010-06-04 03:39:34 +02:00
|
|
|
unsigned int lay; /* bitflags for layer visibility */
|
|
|
|
int layact; /* active layer */
|
2011-03-28 01:11:22 +02:00
|
|
|
unsigned int lay_updated; /* runtime flag, has layer ever been updated since load? */
|
2010-06-04 03:39:34 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
short flag; /* various settings */
|
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
|
|
|
|
2014-03-31 23:30:24 +02:00
|
|
|
char use_nodes;
|
2014-04-27 18:38:53 +02:00
|
|
|
char pad[1];
|
|
|
|
|
2012-10-21 07:46:41 +02: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
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
struct Editing *ed; /* sequence editor data is allocated here */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
struct ToolSettings *toolsettings; /* default allocated now */
|
|
|
|
struct SceneStats *stats; /* default allocated now */
|
2015-01-19 06:30:35 +01:00
|
|
|
struct DisplaySafeAreas safe_areas;
|
2005-08-24 22:37:25 +02:00
|
|
|
|
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;
|
2009-09-20 16:00:00 +02:00
|
|
|
struct AudioData audio;
|
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
|
|
|
|
2010-02-08 00:41:17 +01:00
|
|
|
void *sound_scene;
|
2015-05-15 16:51:17 +02:00
|
|
|
void *playback_handle;
|
2010-08-02 20:22:34 +02:00
|
|
|
void *sound_scrub_handle;
|
2011-08-03 11:25:40 +02:00
|
|
|
void *speaker_handles;
|
2006-04-16 18:50:26 +02:00
|
|
|
|
2011-09-25 14:31:21 +02:00
|
|
|
void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */
|
2010-02-12 01:44:26 +01:00
|
|
|
|
2012-03-01 13:20:18 +01:00
|
|
|
/* none of the dependency graph vars is mean to be saved */
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 12:05:57 +02:00
|
|
|
struct Depsgraph *depsgraph;
|
2015-05-12 13:36:34 +02:00
|
|
|
void *pad1;
|
2005-04-30 23:27:05 +02:00
|
|
|
struct DagForest *theDag;
|
2013-02-21 20:33:04 +01:00
|
|
|
short dagflags;
|
2015-11-01 02:45:15 +01:00
|
|
|
short pad3;
|
2006-11-06 02:08:26 +01:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* User-Defined KeyingSets */
|
|
|
|
int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
|
2012-01-11 00:14:20 +01:00
|
|
|
ListBase keyingsets; /* KeyingSets for this scene */
|
2009-08-04 02:40:36 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* Game Settings */
|
2011-12-04 07:05:48 +01:00
|
|
|
struct GameFraming framing DNA_DEPRECATED; // XXX deprecated since 2.5
|
2009-09-19 00:25:49 +02:00
|
|
|
struct GameData gm;
|
|
|
|
|
|
|
|
/* Units */
|
|
|
|
struct UnitSettings unit;
|
|
|
|
|
|
|
|
/* Grease Pencil */
|
|
|
|
struct bGPdata *gpd;
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-10-01 00:10:14 +02:00
|
|
|
|
|
|
|
/* Physics simulation settings */
|
|
|
|
struct PhysicsSettings physics_settings;
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
/* Movie Tracking */
|
|
|
|
struct MovieClip *clip; /* active movie clip */
|
2011-12-23 21:30:23 +01:00
|
|
|
|
2012-05-05 16:03:12 +02:00
|
|
|
uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by BKE_object_handle_update() */
|
2011-12-24 04:03:42 +01:00
|
|
|
uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 12:05:07 +02:00
|
|
|
|
|
|
|
/* Color Management */
|
|
|
|
ColorManagedViewSettings view_settings;
|
|
|
|
ColorManagedDisplaySettings display_settings;
|
|
|
|
ColorManagedColorspaceSettings sequencer_colorspace_settings;
|
2013-01-23 06:56:22 +01:00
|
|
|
|
|
|
|
/* RigidBody simulation world+settings */
|
|
|
|
struct RigidBodyWorld *rigidbody_world;
|
2015-08-10 15:41:28 +02:00
|
|
|
|
|
|
|
struct PreviewImage *preview;
|
2002-10-12 13:37:38 +02:00
|
|
|
} Scene;
|
|
|
|
|
|
|
|
/* **************** RENDERDATA ********************* */
|
|
|
|
|
2010-01-19 21:30:04 +01:00
|
|
|
/* flag */
|
|
|
|
/* use preview range */
|
|
|
|
#define SCER_PRV_RANGE (1<<0)
|
2013-10-13 22:46:02 +02:00
|
|
|
#define SCER_LOCK_FRAME_SELECTION (1<<1)
|
2014-04-25 17:36:34 +02:00
|
|
|
/* timeline/keyframe jumping - only selected items (on by default) */
|
|
|
|
#define SCE_KEYS_NO_SELONLY (1<<2)
|
2010-01-19 21:30:04 +01:00
|
|
|
|
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
|
2014-01-27 19:58:54 +01:00
|
|
|
#define R_EDGE 0x0020
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_FIELDS 0x0040
|
|
|
|
#define R_FIELDSTILL 0x0080
|
2012-09-06 02:33:59 +02:00
|
|
|
/*#define R_RADIO 0x0100 */ /* deprecated */
|
2002-10-12 13:37:38 +02:00
|
|
|
#define R_BORDER 0x0200
|
2009-09-19 00:25:49 +02:00
|
|
|
#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
|
2006-05-27 15:35:03 +02:00
|
|
|
#define R_CROP 0x0800
|
2011-01-15 17:14:57 +01:00
|
|
|
/*#define R_COSMO 0x1000 deprecated */
|
2002-10-12 13:37:38 +02:00
|
|
|
#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... */
|
2011-01-15 17:14:57 +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
|
|
|
|
2012-11-10 00:54:58 +01:00
|
|
|
#define R_SPEED 0x100000
|
|
|
|
#define R_SSS 0x200000
|
|
|
|
#define R_NO_OVERWRITE 0x400000 /* skip existing files */
|
|
|
|
#define R_TOUCH 0x800000 /* touch files before rendering */
|
|
|
|
#define R_SIMPLIFY 0x1000000
|
2012-11-12 15:25:29 +01:00
|
|
|
#define R_EDGE_FRS 0x2000000 /* R_EDGE reserved for Freestyle */
|
2012-11-12 15:25:46 +01:00
|
|
|
#define R_PERSISTENT_DATA 0x4000000 /* keep data around for re-render */
|
2016-06-07 09:33:32 +02:00
|
|
|
#define R_USE_WS_SHADING 0x8000000 /* use world space interpretation of lighting data */
|
2008-01-20 18:53:58 +01:00
|
|
|
|
2010-03-16 18:37:34 +01:00
|
|
|
/* seq_flag */
|
|
|
|
#define R_SEQ_GL_PREV 1
|
2012-10-24 05:37:32 +02:00
|
|
|
// #define R_SEQ_GL_REND 2 // UNUSED, opengl render has its own operator now.
|
2012-12-12 13:42:12 +01:00
|
|
|
#define R_SEQ_SOLID_TEX 4
|
2010-03-16 18:37:34 +01:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* displaymode */
|
|
|
|
|
|
|
|
#define R_OUTPUT_SCREEN 0
|
|
|
|
#define R_OUTPUT_AREA 1
|
|
|
|
#define R_OUTPUT_WINDOW 2
|
2011-02-19 17:55:01 +01:00
|
|
|
#define R_OUTPUT_NONE 3
|
|
|
|
/*#define R_OUTPUT_FORKED 4*/
|
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
|
|
|
|
2009-06-29 22:15:59 +02:00
|
|
|
/* raytrace structure */
|
2009-09-06 21:14:06 +02:00
|
|
|
#define R_RAYSTRUCTURE_AUTO 0
|
|
|
|
#define R_RAYSTRUCTURE_OCTREE 1
|
2014-04-11 13:08:57 +02:00
|
|
|
#define R_RAYSTRUCTURE_BLIBVH 2 /* removed */
|
2009-09-06 21:14:06 +02:00
|
|
|
#define R_RAYSTRUCTURE_VBVH 3
|
|
|
|
#define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
|
|
|
|
#define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
|
2009-10-01 20:30:59 +02:00
|
|
|
|
|
|
|
/* raytrace_options */
|
|
|
|
#define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
|
|
|
|
#define R_RAYTRACE_USE_INSTANCES 0x0002
|
2009-07-06 15:27:40 +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
|
2013-05-15 19:09:45 +02:00
|
|
|
#define R_BUTS_PREVIEW 0x0008
|
2006-02-14 12:28:13 +01:00
|
|
|
#define R_EXTENSION 0x0010
|
2009-10-07 16:48:29 +02:00
|
|
|
#define R_MATNODE_PREVIEW 0x0020
|
2006-02-14 12:28:13 +01:00
|
|
|
#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
|
2016-02-23 14:32:28 +01: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
|
2011-02-07 19:09:27 +01:00
|
|
|
#define R_NO_FRAME_UPDATE 0x4000
|
2008-01-28 17:33:59 +01:00
|
|
|
#define R_FULL_SAMPLE 0x8000
|
2011-01-15 17:14:57 +01:00
|
|
|
/* #define R_DEPRECATED 0x10000 */
|
|
|
|
/* #define R_RECURS_PROTECTION 0x20000 */
|
2009-10-07 16:48:29 +02:00
|
|
|
#define R_TEXNODE_PREVIEW 0x40000
|
2013-05-15 19:09:45 +02:00
|
|
|
#define R_VIEWPORT_PREVIEW 0x80000
|
2014-06-28 19:13:54 +02:00
|
|
|
#define R_EXR_CACHE_FILE 0x100000
|
2015-04-06 15:40:12 +02:00
|
|
|
#define R_MULTIVIEW 0x200000
|
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
|
2009-10-15 21:18:40 +02:00
|
|
|
#define R_STAMP_RENDERTIME 0x0400
|
2011-01-13 20:16:35 +01:00
|
|
|
#define R_STAMP_CAMERALENS 0x0800
|
2015-07-01 15:23:09 +02:00
|
|
|
#define R_STAMP_STRIPMETA 0x1000
|
2016-05-19 21:39:22 +02:00
|
|
|
#define R_STAMP_MEMORY 0x2000
|
2016-08-31 18:51:32 +02:00
|
|
|
#define R_STAMP_HIDE_LABELS 0x4000
|
2011-12-30 08:25:49 +01:00
|
|
|
#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE| \
|
|
|
|
R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP| \
|
2016-08-31 18:51:32 +02:00
|
|
|
R_STAMP_RENDERTIME|R_STAMP_CAMERALENS|R_STAMP_MEMORY| \
|
|
|
|
R_STAMP_HIDE_LABELS)
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
/* alphamode */
|
|
|
|
#define R_ADDSKY 0
|
|
|
|
#define R_ALPHAPREMUL 1
|
2012-12-31 14:52:13 +01:00
|
|
|
/*#define R_ALPHAKEY 2*/ /* deprecated, shouldn't be used */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* color_mgt_flag */
|
2013-12-10 02:59:04 +01:00
|
|
|
enum {
|
|
|
|
R_COLOR_MANAGEMENT = (1 << 0), /* deprecated, should only be used in versioning code only */
|
|
|
|
/*R_COLOR_MANAGEMENT_PREDIVIDE = (1 << 1)*/ /* deprecated, shouldn't be used */
|
|
|
|
};
|
|
|
|
|
2015-07-10 07:58:08 +02:00
|
|
|
#ifdef DNA_DEPRECATED
|
2006-01-09 11:55:41 +01:00
|
|
|
/* subimtype, flag options for imtype */
|
2013-12-10 02:59:04 +01:00
|
|
|
enum {
|
|
|
|
R_OPENEXR_HALF = 1, /*deprecated*/
|
|
|
|
R_OPENEXR_ZBUF = 2, /*deprecated*/
|
|
|
|
R_PREVIEW_JPG = 4, /*deprecated*/
|
|
|
|
R_CINEON_LOG = 8, /*deprecated*/
|
|
|
|
R_TIFF_16BIT = 16, /*deprecated*/
|
|
|
|
|
|
|
|
R_JPEG2K_12BIT = 32, /* Jpeg2000 */ /*deprecated*/
|
|
|
|
R_JPEG2K_16BIT = 64, /*deprecated*/
|
|
|
|
R_JPEG2K_YCC = 128, /* when disabled use RGB */ /*deprecated*/
|
|
|
|
R_JPEG2K_CINE_PRESET = 256, /*deprecated*/
|
|
|
|
R_JPEG2K_CINE_48FPS = 512, /*deprecated*/
|
|
|
|
};
|
|
|
|
#endif
|
2009-09-19 00:25:49 +02: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
|
2011-06-05 22:54:04 +02:00
|
|
|
#define R_BAKE_MULTIRES 16
|
|
|
|
#define R_BAKE_LORES_MESH 32
|
2013-01-02 01:05:30 +01:00
|
|
|
#define R_BAKE_VCOL 64
|
2013-10-09 17:51:14 +02:00
|
|
|
#define R_BAKE_USERSCALE 128
|
2014-06-11 07:39:35 +02:00
|
|
|
#define R_BAKE_CAGE 256
|
|
|
|
#define R_BAKE_SPLIT_MAT 512
|
|
|
|
#define R_BAKE_AUTO_NAME 1024
|
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
|
|
|
|
2010-02-02 16:51:44 +01:00
|
|
|
/* simplify_flag */
|
|
|
|
#define R_SIMPLE_NO_TRIANGULATE 1
|
|
|
|
|
2012-04-11 01:53:46 +02:00
|
|
|
/* line_thickness_mode */
|
|
|
|
#define R_LINE_THICKNESS_ABSOLUTE 1
|
|
|
|
#define R_LINE_THICKNESS_RELATIVE 2
|
|
|
|
|
2010-03-16 18:37:34 +01:00
|
|
|
/* sequencer seq_prev_type seq_rend_type */
|
|
|
|
|
2014-10-28 12:49:04 +01:00
|
|
|
/* scene->r.engine (scene.c) */
|
|
|
|
extern const char *RE_engine_id_BLENDER_RENDER;
|
|
|
|
extern const char *RE_engine_id_BLENDER_GAME;
|
|
|
|
extern const char *RE_engine_id_CYCLES;
|
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 14:49:00 +02:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
/* **************** SCENE ********************* */
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2016-03-02 22:43:22 +01:00
|
|
|
/* note that much higher maxframes give imprecise sub-frames, see: T46859 */
|
2009-09-19 00:25:49 +02:00
|
|
|
/* for general use */
|
2016-03-02 22:43:22 +01:00
|
|
|
#define MAXFRAME 500000
|
|
|
|
#define MAXFRAMEF 500000.0f
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2010-02-18 01:29:08 +01:00
|
|
|
#define MINFRAME 0
|
|
|
|
#define MINFRAMEF 0.0f
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* (minimum frame number for current-frame) */
|
2016-03-02 22:43:22 +01:00
|
|
|
#define MINAFRAME -500000
|
|
|
|
#define MINAFRAMEF -500000.0f
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
/* depricate this! */
|
2011-12-30 08:25:49 +01:00
|
|
|
#define TESTBASE(v3d, base) ( \
|
|
|
|
((base)->flag & SELECT) && \
|
|
|
|
((base)->lay & v3d->lay) && \
|
2012-12-09 06:15:21 +01:00
|
|
|
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
|
2011-12-30 08:25:49 +01:00
|
|
|
#define TESTBASELIB(v3d, base) ( \
|
|
|
|
((base)->flag & SELECT) && \
|
|
|
|
((base)->lay & v3d->lay) && \
|
2012-12-09 06:15:21 +01:00
|
|
|
((base)->object->id.lib == NULL) && \
|
|
|
|
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
|
2011-12-30 08:25:49 +01:00
|
|
|
#define TESTBASELIB_BGMODE(v3d, scene, base) ( \
|
|
|
|
((base)->flag & SELECT) && \
|
|
|
|
((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
|
2012-12-09 06:15:21 +01:00
|
|
|
((base)->object->id.lib == NULL) && \
|
|
|
|
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
|
2011-12-30 08:25:49 +01:00
|
|
|
#define BASE_EDITABLE_BGMODE(v3d, scene, base) ( \
|
|
|
|
((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
|
2012-12-09 06:15:21 +01:00
|
|
|
((base)->object->id.lib == NULL) && \
|
|
|
|
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
|
2011-12-30 08:25:49 +01:00
|
|
|
#define BASE_SELECTABLE(v3d, base) ( \
|
|
|
|
(base->lay & v3d->lay) && \
|
2012-12-09 06:15:21 +01:00
|
|
|
(base->object->restrictflag & (OB_RESTRICT_SELECT | OB_RESTRICT_VIEW)) == 0)
|
2011-12-30 08:25:49 +01:00
|
|
|
#define BASE_VISIBLE(v3d, base) ( \
|
|
|
|
(base->lay & v3d->lay) && \
|
2012-12-09 06:15:21 +01:00
|
|
|
(base->object->restrictflag & OB_RESTRICT_VIEW) == 0)
|
2013-04-11 11:57:26 +02:00
|
|
|
#define BASE_VISIBLE_BGMODE(v3d, scene, base) ( \
|
|
|
|
(base->lay & (v3d ? v3d->lay : scene->lay)) && \
|
|
|
|
(base->object->restrictflag & OB_RESTRICT_VIEW) == 0)
|
2011-12-30 08:25:49 +01:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
#define FIRSTBASE scene->base.first
|
|
|
|
#define LASTBASE scene->base.last
|
|
|
|
#define BASACT (scene->basact)
|
2012-12-09 06:15:21 +01:00
|
|
|
#define OBACT (BASACT ? BASACT->object: NULL)
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2011-04-30 05:36:59 +02:00
|
|
|
#define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL)
|
|
|
|
#define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera)
|
|
|
|
|
2012-12-09 06:15:21 +01:00
|
|
|
#define CFRA (scene->r.cfra)
|
|
|
|
#define SUBFRA (scene->r.subframe)
|
|
|
|
#define SFRA (scene->r.sfra)
|
|
|
|
#define EFRA (scene->r.efra)
|
|
|
|
#define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
|
|
|
|
#define PSFRA ((PRVRANGEON) ? (scene->r.psfra) : (scene->r.sfra))
|
|
|
|
#define PEFRA ((PRVRANGEON) ? (scene->r.pefra) : (scene->r.efra))
|
|
|
|
#define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (double)(a)) / (double)scene->r.frs_sec)
|
|
|
|
#define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
|
|
|
|
#define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base)
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2004-05-29 18:17:46 +02:00
|
|
|
/* base->flag is in DNA_object_types.h */
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->snap_flag */
|
2007-09-25 06:11:57 +02:00
|
|
|
#define SCE_SNAP 1
|
Merge from Apricot Revisions 14897, 14913, 14914, 14915, 14929, 15009, 15046
---------------------------------------------------
Snappy stuff
* Align rotation with snapping target: rotate the object, aligning it with the target (object mode only - temporarily) (New icon in the header when snap is turned on)
* Snap to different mesh elements (face, edge, vertice): snapping target slide on faces and edge or use exact position of vertice. When using Align rotation with edge snapping, the normal is interpolated as you slide along.
Snaps correctly to derived mesh (sculpt, modifiers, ...) and duplis. In object and edit mode.
NOTE: The snapping code is now based on faces, so even if you're snapping to vertices or edges, it will not work on meshes without faces. This might change if needed.
2008-06-09 20:41:16 +02:00
|
|
|
#define SCE_SNAP_ROTATE 2
|
2009-09-19 00:25:49 +02:00
|
|
|
#define SCE_SNAP_PEEL_OBJECT 4
|
2009-10-13 00:33:32 +02:00
|
|
|
#define SCE_SNAP_PROJECT 8
|
2011-07-27 09:22:31 +02:00
|
|
|
#define SCE_SNAP_NO_SELF 16
|
2015-06-30 10:57:17 +02:00
|
|
|
#define SCE_SNAP_ABS_GRID 32
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->snap_target */
|
2007-09-25 06:11:57 +02:00
|
|
|
#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
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->snap_mode */
|
2009-11-26 20:29:57 +01:00
|
|
|
#define SCE_SNAP_MODE_INCREMENT 0
|
|
|
|
#define SCE_SNAP_MODE_VERTEX 1
|
|
|
|
#define SCE_SNAP_MODE_EDGE 2
|
|
|
|
#define SCE_SNAP_MODE_FACE 3
|
|
|
|
#define SCE_SNAP_MODE_VOLUME 4
|
2012-06-29 16:34:46 +02:00
|
|
|
#define SCE_SNAP_MODE_NODE_X 5
|
|
|
|
#define SCE_SNAP_MODE_NODE_Y 6
|
|
|
|
#define SCE_SNAP_MODE_NODE_XY 7
|
2013-11-06 18:46:32 +01:00
|
|
|
#define SCE_SNAP_MODE_GRID 8
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->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
|
|
|
|
|
2013-04-17 11:27:23 +02:00
|
|
|
/* toolsettings->statvis->type */
|
|
|
|
#define SCE_STATVIS_OVERHANG 0
|
|
|
|
#define SCE_STATVIS_THICKNESS 1
|
|
|
|
#define SCE_STATVIS_INTERSECT 2
|
2013-04-18 06:24:18 +02:00
|
|
|
#define SCE_STATVIS_DISTORT 3
|
2013-04-18 19:09:56 +02:00
|
|
|
#define SCE_STATVIS_SHARP 4
|
2013-04-17 11:27:23 +02:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->particle.selectmode for particles */
|
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
|
|
|
#define SCE_SELECT_PATH 1
|
|
|
|
#define SCE_SELECT_POINT 2
|
|
|
|
#define SCE_SELECT_END 4
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->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
|
2011-07-22 01:36:17 +02:00
|
|
|
#define PROP_RANDOM 6
|
2015-02-03 19:35:09 +01:00
|
|
|
#define PROP_INVSQUARE 7
|
|
|
|
#define PROP_MODE_MAX 8
|
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
|
|
|
|
2009-10-13 17:30:19 +02:00
|
|
|
/* toolsettings->proportional */
|
|
|
|
#define PROP_EDIT_OFF 0
|
|
|
|
#define PROP_EDIT_ON 1
|
2013-06-20 15:24:07 +02:00
|
|
|
#define PROP_EDIT_CONNECTED 2
|
|
|
|
#define PROP_EDIT_PROJECTED 3
|
2009-10-13 17:30:19 +02:00
|
|
|
|
2013-02-22 05:09:04 +01:00
|
|
|
/* toolsettings->weightuser */
|
|
|
|
enum {
|
|
|
|
OB_DRAW_GROUPUSER_NONE = 0,
|
|
|
|
OB_DRAW_GROUPUSER_ACTIVE = 1,
|
|
|
|
OB_DRAW_GROUPUSER_ALL = 2
|
|
|
|
};
|
|
|
|
|
2013-06-23 17:37:08 +02:00
|
|
|
/* toolsettings->vgroupsubset */
|
|
|
|
/* object_vgroup.c */
|
|
|
|
typedef enum eVGroupSelect {
|
|
|
|
WT_VGROUP_ALL = 0,
|
|
|
|
WT_VGROUP_ACTIVE = 1,
|
|
|
|
WT_VGROUP_BONE_SELECT = 2,
|
|
|
|
WT_VGROUP_BONE_DEFORM = 3,
|
|
|
|
WT_VGROUP_BONE_DEFORM_OFF = 4
|
|
|
|
} eVGroupSelect;
|
|
|
|
|
|
|
|
#define WT_VGROUP_MASK_ALL \
|
|
|
|
((1 << WT_VGROUP_ACTIVE) | \
|
|
|
|
(1 << WT_VGROUP_BONE_SELECT) | \
|
|
|
|
(1 << WT_VGROUP_BONE_DEFORM) | \
|
|
|
|
(1 << WT_VGROUP_BONE_DEFORM_OFF) | \
|
|
|
|
(1 << WT_VGROUP_ALL))
|
|
|
|
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* sce->flag */
|
|
|
|
#define SCE_DS_SELECTED (1<<0)
|
|
|
|
#define SCE_DS_COLLAPSED (1<<1)
|
|
|
|
#define SCE_NLA_EDIT_ON (1<<2)
|
2010-02-19 13:20:29 +01:00
|
|
|
#define SCE_FRAME_DROP (1<<3)
|
2009-09-19 00:25:49 +02:00
|
|
|
|
|
|
|
|
2014-07-18 21:35:50 +02:00
|
|
|
/* return flag BKE_scene_base_iter_next functions */
|
|
|
|
/* #define F_ERROR -1 */ /* UNUSED */
|
2002-10-12 13:37:38 +02:00
|
|
|
#define F_START 0
|
|
|
|
#define F_SCENE 1
|
|
|
|
#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 */
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 15:58:59 +02:00
|
|
|
#define AUDIO_MUTE (1<<0)
|
|
|
|
#define AUDIO_SYNC (1<<1)
|
|
|
|
#define AUDIO_SCRUB (1<<2)
|
|
|
|
#define AUDIO_VOLUME_ANIMATED (1<<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
|
|
|
|
2013-12-10 02:59:04 +01:00
|
|
|
enum {
|
2015-07-10 07:58:08 +02:00
|
|
|
#ifdef DNA_DEPRECATED
|
2013-12-10 02:59:04 +01:00
|
|
|
FFMPEG_MULTIPLEX_AUDIO = 1, /* deprecated, you can choose none as audiocodec now */
|
2015-07-10 07:58:08 +02:00
|
|
|
#endif
|
2013-12-10 02:59:04 +01:00
|
|
|
FFMPEG_AUTOSPLIT_OUTPUT = 2,
|
|
|
|
FFMPEG_LOSSLESS_OUTPUT = 4,
|
|
|
|
};
|
|
|
|
|
2009-11-03 23:50:09 +01:00
|
|
|
/* Paint.flags */
|
|
|
|
typedef enum {
|
2012-12-11 23:00:22 +01:00
|
|
|
PAINT_SHOW_BRUSH = (1 << 0),
|
|
|
|
PAINT_FAST_NAVIGATE = (1 << 1),
|
2015-02-11 15:07:04 +01:00
|
|
|
PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2),
|
|
|
|
PAINT_USE_CAVITY_MASK = (1 << 3)
|
2009-11-03 23:50:09 +01:00
|
|
|
} PaintFlags;
|
|
|
|
|
2013-12-09 21:36:33 +01:00
|
|
|
/* Paint.symmetry_flags
|
|
|
|
* (for now just a duplicate of sculpt symmetry flags) */
|
|
|
|
typedef enum SymmetryFlags {
|
|
|
|
PAINT_SYMM_X = (1 << 0),
|
|
|
|
PAINT_SYMM_Y = (1 << 1),
|
|
|
|
PAINT_SYMM_Z = (1 << 2),
|
2015-07-23 22:52:03 +02:00
|
|
|
PAINT_SYMMETRY_FEATHER = (1 << 3),
|
|
|
|
PAINT_TILE_X = (1 << 4),
|
|
|
|
PAINT_TILE_Y = (1 << 5),
|
|
|
|
PAINT_TILE_Z = (1 << 6),
|
2013-12-09 21:36:33 +01:00
|
|
|
} SymmetryFlags;
|
|
|
|
|
2013-12-10 03:27:53 +01:00
|
|
|
#define PAINT_SYMM_AXIS_ALL (PAINT_SYMM_X | PAINT_SYMM_Y | PAINT_SYMM_Z)
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* Sculpt.flags */
|
2009-11-03 23:50:09 +01:00
|
|
|
/* These can eventually be moved to paint flags? */
|
2009-09-19 00:25:49 +02:00
|
|
|
typedef enum SculptFlags {
|
2015-07-10 07:58:08 +02:00
|
|
|
#ifdef DNA_DEPRECATED
|
2013-12-09 21:36:33 +01:00
|
|
|
/* deprecated, part of paint struct symmetry_flags now */
|
2013-04-13 02:43:49 +02:00
|
|
|
SCULPT_SYMM_X = (1 << 0),
|
|
|
|
SCULPT_SYMM_Y = (1 << 1),
|
|
|
|
SCULPT_SYMM_Z = (1 << 2),
|
2015-07-10 07:58:08 +02:00
|
|
|
#endif
|
2013-12-09 21:36:33 +01:00
|
|
|
|
2013-04-13 02:43:49 +02:00
|
|
|
SCULPT_LOCK_X = (1 << 3),
|
|
|
|
SCULPT_LOCK_Y = (1 << 4),
|
|
|
|
SCULPT_LOCK_Z = (1 << 5),
|
2013-12-09 21:36:33 +01:00
|
|
|
/* deprecated, part of paint struct symmetry_flags now */
|
2013-04-13 02:43:49 +02:00
|
|
|
SCULPT_SYMMETRY_FEATHER = (1 << 6),
|
2013-12-09 21:36:33 +01:00
|
|
|
|
2013-04-13 02:43:49 +02:00
|
|
|
SCULPT_USE_OPENMP = (1 << 7),
|
|
|
|
SCULPT_ONLY_DEFORM = (1 << 8),
|
|
|
|
SCULPT_SHOW_DIFFUSE = (1 << 9),
|
2012-12-30 19:27:33 +01:00
|
|
|
|
|
|
|
/* If set, the mesh will be drawn with smooth-shading in
|
2012-12-31 03:37:28 +01:00
|
|
|
* dynamic-topology mode */
|
2013-04-13 02:43:49 +02:00
|
|
|
SCULPT_DYNTOPO_SMOOTH_SHADING = (1 << 10),
|
2012-12-30 19:27:33 +01:00
|
|
|
|
2013-11-19 21:55:46 +01:00
|
|
|
/* If set, dynamic-topology brushes will subdivide short edges */
|
|
|
|
SCULPT_DYNTOPO_SUBDIVIDE = (1 << 12),
|
|
|
|
/* If set, dynamic-topology brushes will collapse short edges */
|
2014-03-06 19:04:57 +01:00
|
|
|
SCULPT_DYNTOPO_COLLAPSE = (1 << 11),
|
|
|
|
|
|
|
|
/* If set, dynamic-topology detail size will be constant in object space */
|
2015-05-06 22:51:49 +02:00
|
|
|
SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13),
|
|
|
|
SCULPT_DYNTOPO_DETAIL_BRUSH = (1 << 14),
|
2009-09-19 00:25:49 +02:00
|
|
|
} SculptFlags;
|
|
|
|
|
2014-08-28 16:40:38 +02:00
|
|
|
typedef enum ImagePaintMode {
|
|
|
|
IMAGEPAINT_MODE_MATERIAL, /* detect texture paint slots from the material */
|
|
|
|
IMAGEPAINT_MODE_IMAGE, /* select texture paint image directly */
|
|
|
|
} ImagePaintMode;
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* ImagePaintSettings.flag */
|
2006-07-28 02:56:35 +02:00
|
|
|
#define IMAGEPAINT_DRAWING 1
|
2010-12-12 15:28:23 +01:00
|
|
|
// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
|
|
|
|
// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* projection painting only */
|
2015-02-10 20:22:25 +01:00
|
|
|
#define IMAGEPAINT_PROJECT_XRAY (1 << 4)
|
|
|
|
#define IMAGEPAINT_PROJECT_BACKFACE (1 << 5)
|
|
|
|
#define IMAGEPAINT_PROJECT_FLAT (1 << 6)
|
|
|
|
#define IMAGEPAINT_PROJECT_LAYER_CLONE (1 << 7)
|
|
|
|
#define IMAGEPAINT_PROJECT_LAYER_STENCIL (1 << 8)
|
|
|
|
#define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV (1 << 9)
|
|
|
|
|
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
|
|
|
|
2014-10-06 15:12:06 +02:00
|
|
|
#define IMAGEPAINT_MISSING_UVS (1 << 0)
|
|
|
|
#define IMAGEPAINT_MISSING_MATERIAL (1 << 1)
|
|
|
|
#define IMAGEPAINT_MISSING_TEX (1 << 2)
|
|
|
|
#define IMAGEPAINT_MISSING_STENCIL (1 << 3)
|
|
|
|
|
2008-03-26 15:50:29 +01:00
|
|
|
/* toolsettings->uvcalc_flag */
|
|
|
|
#define UVCALC_FILLHOLES 1
|
2011-03-10 06:52:16 +01:00
|
|
|
#define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
|
2008-09-05 02:28:17 +02:00
|
|
|
#define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
|
2012-01-17 17:31:13 +01:00
|
|
|
#define UVCALC_USESUBSURF 8 /* Use mesh data after subsurf to compute UVs*/
|
2008-03-26 15:50:29 +01:00
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->uv_flag */
|
|
|
|
#define UV_SYNC_SELECTION 1
|
|
|
|
#define UV_SHOW_SAME_IMAGE 2
|
|
|
|
|
|
|
|
/* toolsettings->uv_selectmode */
|
|
|
|
#define UV_SELECT_VERTEX 1
|
|
|
|
#define UV_SELECT_EDGE 2
|
|
|
|
#define UV_SELECT_FACE 4
|
|
|
|
#define UV_SELECT_ISLAND 8
|
|
|
|
|
2008-05-08 18:33:55 +02:00
|
|
|
/* toolsettings->edge_mode */
|
|
|
|
#define EDGE_MODE_SELECT 0
|
|
|
|
#define EDGE_MODE_TAG_SEAM 1
|
|
|
|
#define EDGE_MODE_TAG_SHARP 2
|
|
|
|
#define EDGE_MODE_TAG_CREASE 3
|
|
|
|
#define EDGE_MODE_TAG_BEVEL 4
|
2011-10-06 04:04:43 +02:00
|
|
|
#define EDGE_MODE_TAG_FREESTYLE 5
|
2008-05-08 18:33:55 +02:00
|
|
|
|
Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 04:14:01 +01:00
|
|
|
/* toolsettings->gpencil_flags */
|
2015-12-13 09:03:13 +01:00
|
|
|
typedef enum eGPencil_Flags {
|
|
|
|
/* "Continuous Drawing" - The drawing operator enters a mode where multiple strokes can be drawn */
|
|
|
|
GP_TOOL_FLAG_PAINTSESSIONS_ON = (1 << 0),
|
|
|
|
/* When creating new frames, the last frame gets used as the basis for the new one */
|
|
|
|
GP_TOOL_FLAG_RETAIN_LAST = (1 << 1),
|
2016-08-05 23:03:51 +02:00
|
|
|
/* Add the strokes below all strokes in the layer */
|
|
|
|
GP_TOOL_FLAG_PAINT_ONBACK = (1 << 2)
|
2015-12-13 09:03:13 +01:00
|
|
|
} eGPencil_Flags;
|
Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 04:14:01 +01:00
|
|
|
|
2014-12-07 14:42:10 +01:00
|
|
|
/* toolsettings->gpencil_src */
|
|
|
|
typedef enum eGPencil_Source_3D {
|
|
|
|
GP_TOOL_SOURCE_SCENE = 0,
|
|
|
|
GP_TOOL_SOURCE_OBJECT = 1
|
|
|
|
} eGPencil_Source_3d;
|
|
|
|
|
2015-12-13 09:03:13 +01:00
|
|
|
/* toolsettings->gpencil_*_align - Stroke Placement mode flags */
|
|
|
|
typedef enum eGPencil_Placement_Flags {
|
|
|
|
/* New strokes are added in viewport/data space (i.e. not screen space) */
|
|
|
|
GP_PROJECT_VIEWSPACE = (1 << 0),
|
|
|
|
|
|
|
|
/* Viewport space, but relative to render canvas (Sequencer Preview Only) */
|
|
|
|
GP_PROJECT_CANVAS = (1 << 1),
|
|
|
|
|
|
|
|
/* Project into the screen's Z values */
|
|
|
|
GP_PROJECT_DEPTH_VIEW = (1 << 2),
|
|
|
|
GP_PROJECT_DEPTH_STROKE = (1 << 3),
|
|
|
|
|
|
|
|
/* "Use Endpoints" */
|
|
|
|
GP_PROJECT_DEPTH_STROKE_ENDPOINTS = (1 << 4),
|
|
|
|
} eGPencil_Placement_Flags;
|
|
|
|
|
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
|
2009-09-19 00:25:49 +02:00
|
|
|
#define PE_DRAW_PART 16
|
2011-01-15 17:14:57 +01:00
|
|
|
/* #define PE_X_MIRROR 64 */ /* deprecated */
|
2009-09-19 00:25:49 +02:00
|
|
|
#define PE_FADE_TIME 128
|
|
|
|
#define PE_AUTO_VELOCITY 256
|
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
|
|
|
|
|
|
|
/* 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
|
2009-09-19 00:25:49 +02:00
|
|
|
#define PE_BRUSH_SMOOTH 5
|
2010-01-14 09:53:10 +01:00
|
|
|
#define PE_BRUSH_WEIGHT 6
|
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
|
|
|
|
|
|
|
/* this must equal ParticleEditSettings.brush array size */
|
2009-09-19 00:25:49 +02:00
|
|
|
#define PE_TOT_BRUSH 6
|
|
|
|
|
2010-01-12 17:35:34 +01:00
|
|
|
/* ParticleBrushData->flag */
|
|
|
|
#define PE_BRUSH_DATA_PUFF_VOLUME 1
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* tooksettings->particle edittype */
|
|
|
|
#define PE_TYPE_PARTICLES 0
|
|
|
|
#define PE_TYPE_SOFTBODY 1
|
|
|
|
#define PE_TYPE_CLOTH 2
|
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
|
|
|
|
2007-11-07 01:28:45 +01:00
|
|
|
/* toolsettings->skgen_options */
|
2008-07-04 19:05:06 +02:00
|
|
|
#define SKGEN_FILTER_INTERNAL (1 << 0)
|
|
|
|
#define SKGEN_FILTER_EXTERNAL (1 << 1)
|
|
|
|
#define SKGEN_SYMMETRY (1 << 2)
|
|
|
|
#define SKGEN_CUT_LENGTH (1 << 3)
|
|
|
|
#define SKGEN_CUT_ANGLE (1 << 4)
|
|
|
|
#define SKGEN_CUT_CORRELATION (1 << 5)
|
|
|
|
#define SKGEN_HARMONIC (1 << 6)
|
|
|
|
#define SKGEN_STICK_TO_EMBEDDING (1 << 7)
|
|
|
|
#define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
|
|
|
|
#define SKGEN_FILTER_SMART (1 << 9)
|
|
|
|
#define SKGEN_DISP_LENGTH (1 << 10)
|
|
|
|
#define SKGEN_DISP_WEIGHT (1 << 11)
|
|
|
|
#define SKGEN_DISP_ORIG (1 << 12)
|
2008-08-04 21:12:42 +02:00
|
|
|
#define SKGEN_DISP_EMBED (1 << 13)
|
2008-08-15 22:55:38 +02:00
|
|
|
#define SKGEN_DISP_INDEX (1 << 14)
|
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
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* toolsettings->bone_sketching */
|
|
|
|
#define BONE_SKETCHING 1
|
|
|
|
#define BONE_SKETCHING_QUICK 2
|
|
|
|
#define BONE_SKETCHING_ADJUST 4
|
|
|
|
|
|
|
|
/* toolsettings->bone_sketching_convert */
|
|
|
|
#define SK_CONVERT_CUT_FIXED 0
|
|
|
|
#define SK_CONVERT_CUT_LENGTH 1
|
|
|
|
#define SK_CONVERT_CUT_ADAPTATIVE 2
|
|
|
|
#define SK_CONVERT_RETARGET 3
|
|
|
|
|
|
|
|
/* toolsettings->skgen_retarget_options */
|
|
|
|
#define SK_RETARGET_AUTONAME 1
|
|
|
|
|
|
|
|
/* toolsettings->skgen_retarget_roll */
|
2009-10-20 02:45:51 +02:00
|
|
|
#define SK_RETARGET_ROLL_NONE 0
|
2009-09-19 00:25:49 +02:00
|
|
|
#define SK_RETARGET_ROLL_VIEW 1
|
|
|
|
#define SK_RETARGET_ROLL_JOINT 2
|
|
|
|
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-10-01 00:10:14 +02:00
|
|
|
/* physics_settings->flag */
|
|
|
|
#define PHYS_GLOBAL_GRAVITY 1
|
|
|
|
|
2009-09-19 00:25:49 +02:00
|
|
|
/* UnitSettings */
|
|
|
|
|
|
|
|
/* UnitSettings->system */
|
|
|
|
#define USER_UNIT_NONE 0
|
|
|
|
#define USER_UNIT_METRIC 1
|
|
|
|
#define USER_UNIT_IMPERIAL 2
|
|
|
|
/* UnitSettings->flag */
|
|
|
|
#define USER_UNIT_OPT_SPLIT 1
|
2010-01-25 11:05:17 +01:00
|
|
|
#define USER_UNIT_ROT_RADIANS 2
|
2009-09-19 00:25:49 +02:00
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-12-09 06:15:21 +01:00
|
|
|
#endif /* __DNA_SCENE_TYPES_H__ */
|