Commit Graph

43 Commits

Author SHA1 Message Date
Chris Want
c8b48e70e6 Final merge of HEAD (bf-blender) into the orange branch.
Here are my notes on things to look out for as potential problem
spots:

source/blender/blenkernel/intern/displist.c:
+ is initfastshade(void) supposed to be empty? I had
to make it empty to get the merged tree to compile.

source/blender/python/api2_2x/Armature.c:
+ went with the version that had Armature_getLayers()

source/blender/python/api2_2x/Object.c
+ went with the version of Object_getPose() from bf-blender.
(#ifdef 0-ed the other version)

source/blender/python/api2_2x/Pose.[ch]
+ had problems linking due to no Pose_Init() ... copied these
two files straight from bf-blender.

source/blender/src/drawview.c:
+ view3d_panel_properties() had things shifted a few things shifted
a few pixels, otherwise, things were painless

source/blender/src/splash.jpg.c:
+ went with bf-blender version (orange is dead)

source/gameengine:
+ went with bf-blender version -- does not compile due to IMB_rect* stuff,
Ton should look into this.
2006-01-28 16:35:18 +00:00
39e1043cfe a touch neater and some comments. 2006-01-25 06:28:47 +00:00
d35be5c578 Dont draw blocks what are outside the the view. - massive speedup with complex sequence's 2006-01-25 05:14:03 +00:00
042d612df2 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 22:05:47 +00:00
0665f0d647 Orange;
Until now, the zbuffer was written straight from the internal zbuffer,
which has values that are inverse-proportional (like 1.0/z) which makes
it very hard to use it for postprocess, like zblur or other composit effects
that require Z.

Based on info from ILM, the values stored for Z in exr files is the
actual distance from a camera. I think that's about time to migrate to that
convention!

By default now, after render, the z values are converted to floats. This
saves in exr files now, but not in the Iris Z files. That latter was a
blender-only anyway, so might be not a real hassle to drop. :)

You can see the difference in the image window, but notice the range now
is linear mapped from camera clipstart to clipend.

Note; I just discover that ortho Z values need a different correction...
2006-01-11 22:36:31 +00:00
9df1460777 Christmas coding work!
********* Node editor work:

- To enable Nodes for Materials, you have to set the "Use Nodes"
  button, in the new Material buttons "Nodes" Panel or in header
  of the Node editor. Doing this will disable Material-Layers.

- Nodes now execute materials ("shaders"), but still only using the
  previewrender code.

- Nodes have (optional) previews for rendered images.

- Node headers allow to hide buttons and/or preview image

- Nodes can be dragged larger/smaller (right-bottom corner)

- Nodes can be hidden (minimized) with hotkey H

- CTRL+click on an Input Socket gives a popup with default values.

- Changing Material/Texture or Mix node will adjust Node title.

- Click-drag outside of a Node changes cursor to "Knife' and allows to
  draw a rect where to cut Links.

- Added new node types RGBtoBW, Texture, In/Output, ColorRamp

- Material Nodes have options to ouput diffuse or specular, or to use
  a negative normal. The input socket 'Normal' will force the material
  to use that normal, otherwise it uses the normal from the Material
  that has the node tree.

- When drawing a link between two not-matching sockets, Blender inserts
  a converting node (now only for value/rgb combos)

- When drawing a link to an input socket that's already in use, the
  old link will either disappear or flip to another unused socket.

- A click on a Material Node will activate it, and show all its settings
  in the Material Buttons. Active Material Nodes draw the material icon
  in red.

- A click on any node will show its options in the Node Panel in the
  Material buttons.

- Multiple Output Nodes can be used, to sample contents of a tree, but
  only one Output is the real one, which is indicated in a different
  color and red material icon.

- Added ThemeColors for node types

- ALT+C will convert existing Material-Layers to Node... this currently
  only adds the material/mix nodes and connects them. Dunno if this is
  worth a lot of coding work to make perfect?

- Press C to call another "Solve order", which will show all possible
  cyclic conflicts (if there are).

- Technical: nodes now use "Type" structs which define the
  structure of nodes and in/output sockets. The Type structs store all
  fixed info, callbacks, and allow to reconstruct saved Nodes to match
  what is required by Blender.

- Defining (new) nodes now is as simple as filling in a fixed
  Type struct, plus code some callbacks. A doc will be made!

- Node preview images are by default float

********* Icon drawing:

- Cleanup of how old icons were implemented in new system, making
  them 16x16 too, correctly centered *and* scaled.

- Made drawing Icons use float coordinates

- Moved BIF_calcpreview_image() into interface_icons.c, renamed it
  icon_from_image(). Removed a lot of unneeded Imbuf magic here! :)

- Skipped scaling and imbuf copying when icons are OK size


********* Preview render:

- Huge cleanup of code....

- renaming BIF_xxx calls that only were used internally

- BIF_previewrender() now accepts an argument for rendering method,
  so it supports icons, buttonwindow previewrender and node editor

- Only a single BIF_preview_changed() call now exists, supporting all
  signals as needed for buttos and node editor


********* More stuff:

- glutil.c, glaDrawPixelsSafe() and glaDrawPixelsTex() now accept format
  argument for GL_FLOAT rects

- Made the ColorBand become a built-in button for interface.c
  Was a load of cleanup work in buttons_shading.c...

- removed a load of unneeded glBlendFunc() calls

- Fixed bug in calculating text length for buttons (ancient!)
2005-12-28 15:42:51 +00:00
Alexander Ewering
5b81dcdfc1 Changed my mind and made the "Strobe" value a float - this way you can get
a strobe effect synced exactly to a beat, for example, by using non-integer
values.

Is it just me, or are there recently a lot of crashes in sequencer when
using audio strips?
2005-11-08 00:46:39 +00:00
Alexander Ewering
543f54aa1d New 'feature' for image/movie strips: Strobe
In the NKEY flying panel, you can set "Strobe" to something other than 1
for only displaying each nth picture of the strip. You know the effect
from movies :)

(I put this into the NKEY panel rather than as a effect because effects
only affect single frames (?) while this rather has to do with the
timing... like "Reverse")
2005-11-07 23:13:00 +00:00
Alexander Ewering
f7c955b18e First part of sequencer attack:
Sequencer image preview finally supports zooming out. Yay!
2005-11-07 13:22:23 +00:00
Alexander Ewering
8a1266661e Courtesy of Shaul Kedem:
Option to play sequence strips (Movie, Image, Scene) in reverse.
New toggle in the NKEY buttons for sequence strips.

Thanks Shaul!
2005-09-21 20:28:44 +00:00
b03a20d272 - got rid of silly #define ..._BIT, #define ... (1<<..._BIT) stuff
- switched almost all uiDefBut(..., TOG|BIT|..) to use UiDefButBit and the
   name of the actual bit define instead of just a magic constant, this makes
   searching the code much nicer. most of the credit here goes to LetterRip
   who did almost all of the conversions, I mostly just checked them over.
2005-08-03 18:48:22 +00:00
7b6ec97182 Bug fix #2311
File name (40) and dirname (80) were too short in sequence data. Made it
compliant using defines FILE_MAXFILE and FILE_MAXDIR.
Also replaced all strcpy() and strcat() with strncpy/strncat, with the
defines in it.
Oh, also fixed plugin path length for sequence, was just 80!

Bug fix #2366

Restored old convention that made using SHIFT+CTRL while using button-
sliders go with 0.1 stepsize of CTRL.
(noticed too late that Chris Burt assigned to self... sorry!)
2005-03-24 09:37:06 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
78f133b8a7 Bug found by Bassam; in certain occasions reading a file calls setscreen()
without the (ugly) global curarea being set.
Fixed the crash in his sample by nicely passing on 'current area' as
argument.
2005-01-31 18:37:54 +00:00
341bb20dbd Should have done ages ago!
This commit replaces the glDrawPixels and rectwrite_part with the very
nice (thanks zr!) glaDrawPixelsSafe() call. Result is:
- 3d window background image displays correctly onto the edges when
  zoomed in extreme
- same for UV image window and sequence preview
- preview render now doesnt disappear when left part is outside window
(zr also deserves kick in butt for not doing this himself in NaN days!)

Especially from preview drawing quite some old hacks were deleted. It is
even quite some faster.
Please notify me when it doesnt work on your card... this now is just 100%
according opengl guidelines though :)

Also fixes bug #2100
2005-01-07 21:48:25 +00:00
3e38a951dd Bug fix #2104
When using Sequencer for Alpha-Over images, it was assuming "Key" alpha by
default, and converting images to "Premul" (= multiplying RGB with alpha).
This isn't very nice, also because alpha generated by MBlur in Blender
always is of type Premul already.

Solution; make this an option. In the Nkey panel for strips you can set
or disable Premul now. As extra also added the "Filter" and "Mul" options,
as already there for Movie strips. Can easily be extended to more options
for various postprocess effects.
2005-01-07 18:07:13 +00:00
610cec55c7 Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
  Currently only works with alternating scanlines, but gives excellent
  performance. For both normal render as unified implemented.
  Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
  getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
  OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
  with chars or shorts.
- Made normal render and unified render use same code for sky and halo
  render, giving equal (and better) results for halo render. Old render
  now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
  after render. Using PostProcess menu you will note an immediate re-
  display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options

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

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

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

- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
47230dbf75 Bug fix #1939
Combining panorama scene and Sequencer effect on scene (like glow) crashed.

Found two other issues;

- on click in sequencer, the image output window didn't redraw correct, but
  only when a render window was opened. Caused by missing 'activate' call
- added a pause in dragging-frame loop to make it idle friendly
2004-12-02 18:12:18 +00:00
9393dd08af Fixed showstopper (thnx intrr!) bug in sequencer + global undo.
This was actually a wrong pointer check in fileread that caused no harm
in past, but with UI-less file save it wreaked havoc!

Decided to add undo in sequencer window after all... it also involved
saving Meta strip settings in files. Very nice :)
2004-11-13 12:55:59 +00:00
e10bae596b Bug 1568
Wrong usage of B_NOP code in button events (xxxx | B_NOP), which is useles
since it is defined as -1.

Reminder for all: use a B_NOP if you want a button event not to be passed
on to the event queues.
2004-09-16 17:57:14 +00:00
248404e7a2 This commit changes the sweep effect to be called 'Wipe' in both UI and in backend variable naming. 2004-08-03 19:36:17 +00:00
3d299a5dce Button type error; declaring short button and giving it an int! 2004-07-26 21:23:20 +00:00
df36d4c8e5 More details:
* Added 'Crease SubSurf' to the menus/toolbox

* Language edits in the sequence editor
2004-07-21 01:44:27 +00:00
ab200e3f92 This commit add the clock wipe effect to the sweep menu in the sequence editor 2004-07-12 17:59:42 +00:00
d5272c665f Added B_NOP to events buttons on wipe type effects panel. 2004-07-10 20:19:53 +00:00
9c94728d89 This is the initial commit of a revamp of the sweep effects that goofster committed that was originally a sequence plugin from sirdude.
The changes from the original include the ability to add a blurred edge with a selectable width to the wipe and to rotate the effect.

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

These still need to be coded
-box
-cross
-clock
2004-07-06 19:07:13 +00:00
8a0cd0bc97 Added another Sequence effect: the wellknown Glow effect. 2004-06-23 22:11:57 +00:00
629e526b25 - Added correct Writing/Reading of the new Sweep sequence effect (Thanks Ton, where would I be without you)
- Sweep effect updates after you change the type of sweep now.
2004-06-23 18:22:51 +00:00
a31dec3712 added a new Sequence Effect: Sweep.
this consists of 22 different ways to sweep from 1 strip to another. For you windows lovers: it's like "Blinds" in Powerpoint :)
- in the NKEY menu you can choose which type you want perform, vertical, horizontal, in/out etc. it's too much to decribe.

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

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

more neat effects to come....
2004-06-18 22:53:06 +00:00
401d9ef738 Added the possibillity of naming sequence strips in the sequence editor. previously this was not possible for all types.
- Change the name of a strip in the NKEY menu of the strip.
- If a strip HAS a name, it will be displayed in the strip, instead of all that garbage that was previously there (image locations, lengths, whatever)

Still TODO: while adding new effects to the sequencer I will also add this for effect strips. at the moment it's not clear yet what should go in the NKEY menu.
2004-06-18 15:04:27 +00:00
b106d1b8b6 Added Panel support in Sequence window, and converted old Nkey menu for it. 2004-06-16 20:25:56 +00:00
c0a7891382 Apparently the sequencer has its own audiosystem, so the change I did
for init sound only when needed, was not catched by sequencer.

Somehow, however, the SND_xxx library needs to be set when using the
sequencer... so, here a patch!
2004-05-03 21:21:29 +00:00
4a5ae4a55f Fix for undo... it didn't do the UV coords (tface) nor the vertexpaint
colors. This because of the pretty weird (ab)use of load & make editmesh...

For each added undo step, the load_editmesh was fed with an empty mesh
to assign data to, without knowledge of what was in the original mesh.
That way UV and color data got lost.

Solved it in 2 steps:

1. removing the ->tface pointer from EditVlak, and make TFace a builtin
  struct inside EditVlak. This didnt cost much extra mem, since it already
  stored UV and color. This enabled some pretty cleanup in editmesh.c as
  well, storing tface pointers was cumbersome.
2. for each undo step, it then generates always a tface and mcol block to
  link to the undo Mesh.
  Even when it wasn't in the actual Mesh, at exit editmode the original
  Mesh is used as reference anyway, and undo-meshes are freed correctly.

The enormous commit is because I had to change the BLI_editVert.h file, and
found it was included in about every file unnecessary. I removed it there.
ALso found out that subsurf has code ready (unfinished) to make UV coords for
the displaylist in EditMode as well, nice to know for later...
2003-11-19 22:00:14 +00:00
bc22e2242a - removed temporal patch from myortho2() in mywindow.c, and changed
all calls to ortho2 with correctness offset of 0.375 instead of 0.5.
  this efficiently solves bug in drawing UV lines as reported.

cvS: ----------------------------------------------------------------------
2003-11-18 11:22:17 +00:00
164fa06c11 - themed all window types... phew!
BTW: text colors don't work everywhere yet... but this state should
  be save to store themes in your .B.blend (CTRL+X)

and some fixes:

- leftmouse click now works in NLA and Action window to select a
  strip in the left part
- faceselect+vpaint mode didnt show both panels
2003-10-22 23:20:44 +00:00
842bb449c5 huge commit, sorry!
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...

still a lot of work needed, will all be in next week i hope!

(warn: 2 new c files! butspace.c and buttons_scene.c)
2003-10-04 20:35:50 +00:00
4f27386740 Commit message and the brunt of the code courtesy of intrr, apologies for the
size of this;


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

Stuff that has been done:

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

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

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

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

./source/blender/makesdna/DNA_sound_types.h

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

./source/blender/makesdna/DNA_scene_types.h

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

./source/blender/makesdna/DNA_sequence_types.h

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

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

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

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

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

./source/blender/src/editsound.c

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

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

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

./source/blender/src/editseq.c

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

./source/blender/src/buttons.c

Added Scene-global audio sequencer settings in Sound buttons.

./source/blender/src/sequence.c

Various stuff that deals with handling audio strips differently than
usual strips.
2003-07-13 20:16:56 +00:00
597875cb69 first of the c code comment translation in the mother of all directories! 2003-04-28 14:43:20 +00:00
702880df55 Update things to use blender_test_break() vs MISC_test_break() and
remove use of blendertimer.h
2003-03-24 16:37:08 +00:00
1f3f52f5e4 Update space dispatch:
- drawXXXspace, changeXXXspace, and winqreadXXXspace now receive the area
     and spacedata as explicit arguments, allowing them to access private
     data w/o going through globals.
 - pass the new BWinEvent through to the winqreadXXXspace, allowing future
     access to extended event data.

Removed direct calls to winqreadXXXspace to simulate user actions, replaced
by calls to action functions in edit.c or the appropriate handler.
2003-03-24 01:46:05 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00