Commit Graph

126 Commits

Author SHA1 Message Date
Campbell Barton 46deddcc62 Image Stamping patch by Diego (and peach request)- stamps image info into metadata and optionally
draws into the
frame.

This patch includes some changes I made...   
* use blenders bitmap fonts (rather then own fonts)
* select font size
* user interface layout changes
* Marker as another image stamp option

Also added some new API calls   
BMF_GetFontHeight(font);
BMF_DrawStringBuf(...);  - so we can draw text into an imbuf's image buffer.
get_frame_marker(frame) - get the last marker from the frame.
IMB_rectfill_area(...) - fill in an image buffer with a rectangle area of color.

TODO - draw stamp info in 3d view, at the moment it just displays in the animation.
2007-10-20 16:17:27 +00:00
Campbell Barton 5ea45a1385 Mesh edit option 'AutoMerge' - access from the mesh menu, basically runs remove doubles after transform. but only merges
unselected verts into selected verts, so it wont merge verts your not editing.
2007-10-18 21:47:55 +00:00
Campbell Barton 4ad6ac1cad store snapping in the scene, (theeth's suggestion) 2007-09-25 04:11:57 +00:00
Campbell Barton 848ea23d84 removing unused dna 2007-07-30 13:26:22 +00:00
Campbell Barton 6789b8fd82 added commends to some DNA_*.h files - as well as some TODO's for removal.
header_view3d.c was doign an implicit declaration also.
2007-07-19 00:42:01 +00:00
Kent Mein 613646b33e This commit is a modified version of patch #6860
It adds read only dds support.  (Writing will come later)

Kent
2007-06-25 19:50:25 +00:00
Nicholas Bishop b7c8eb39ed == Sculpt Mode ==
Removed the draw_flag field from SculptData, moved the two draw flags over to SculptData.flags
2007-06-24 23:02:58 +00:00
Nicholas Bishop 8cf2d5ca4a == Sculpt Mode ==
Added a new input control that smooths the brush stroke.

This option controlled by the menu item Sculpt>Input Control>Smooth Stroke. When enabled, the brush has a delayed effect on the model; a green line is drawn to indicate the smoothed path of the stroke. After ~200 pixels, the first half of the stroke will be applied to the model; the process then repeats, with a new segment of the stroke being applied to the model after every 200 pixels. On mouse up, any remaining portion of the stroke will be applied.

Other changes:
* Added a flags field to SculptData; currently only used for smooth stroke but other flags can be moved into it
* Moved the damaged_rects/verts into SculptSession
* Simplified brush application by moving init_editdata into do_symmetrical_brush_actions
* Removed Averaging from sculpt Input menu; smooth stroke should take its place

TODO:
* Fix display of the smooth line in Partial Redraw mode
* Make the smoothing and delay factors adjustable
* Optimize the stroke application (currently using the old 'dot' style of applying the brush)
2007-06-24 22:28:28 +00:00
Brecht Van Lommel 33466557fc Disable SSS better for preview rendering, so it does not slow down
other preview renders at all.

Also added a flag to enable/disable SSS per scene. There is no
button for it yet, the Render panel has no space left .. will find
a place for it later.

The subversion number was also increased to enable the flag for
older .blends.
2007-05-17 16:51:09 +00:00
Ton Roosendaal 46545ac575 64 bits safety:
- makesdna now checks for struct-in-struct alignment (default 8 byte align)
- fixed two occurances of such struct-in-struct align errors
2007-04-24 14:52:35 +00:00
Campbell Barton afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
Nicholas Bishop fa2627aa2c == Multires ==
Added an option to choose between Catmull-Clark and simple subdivision when adding a level. This setting applies only to how the level is created; any changes to lower levels are still propagated to the top level using Catmull-Clark.
2007-03-21 06:33:04 +00:00
Joshua Leung 8b4b8d4dd2 == Preview Range ==
Preview Range is a useful tool for animating (espcially on longer timelines). It allows you to only run through a limited set of frames to quickly preview the timing of a section of movement without going through the whole timeline. It means you don't have to set/reset start/end frame for rendering everytime you wish to only preview a region of frames.

Hi Ton,

Attached is a patch (I know you've already got lots of them in the tracker ;-) ) for a feature that I've sometimes wanted. It seems that this sort of thing is supported in other packages, but I can't be sure.

Note: I may have left in a few bits and pieces I didn't mean to in the patch (this is off a source tree which had quite a few revisions in it, all of which was experimental)



== Preview Range ==
Preview range is useful for animating (espcially on longer timelines). It allows you to only run through a limited set of frames to quickly preview the timing of a section of movement without going through the whole timeline. It means you don't have to set/reset start/end frame for rendering everytime you wish to only preview a region of frames.

* 'Ctrl P' in Action/NLA/Timeline sets preview range. Click+drag to form selection-box defining region of frames to preview
* 'Alt P' in Action/NLA/Timeline to clear preview range
* 'Pre' button beside Start/End fields in timeline toggles whether start/end fields refer to scene or preview
* 'Ctrl Rightarrow' and 'Ctrl Leftarrow' jump to start/end of preview region when it is set
* 'S' and 'E' set the start/end frames of preview region when it is set (just like normally) in Timeline only
* In Action/NLA editors, frames out of preview region are now drawn darkened when preview-region is set


See the following page for more info later:
http://wiki.blender.org/index.php/User:Aligorith/Preview_Range
2007-03-19 07:32:36 +00:00
Nicholas Bishop a567e43628 == Sculpt Mode ==
* Added new brush, "Flatten". This brush pushes vertices along the normal defined by the average normal of each vertex within the brush area. The vertices are pushed towards the plane defined by vertices towards the edge of the brush. Essentially, this means that the direction of flattening is dependent on the surface beneath the brush.

* In order to make space for the flatten brush, the controls inside the Sculpt palette were widened to 268. (Note that the panel width didn't change, so it still fits properly in the vertical layout.)

* Todo: it would probably make sense to make the "View" slider available under the Brush tab available for the Flatten brush (currently it's only used for the Draw brush.)
2007-03-14 20:00:01 +00:00
Ton Roosendaal 15750c82cd Upward compatibility fix:
Redundant variables for postprocess gamma, multiply etc were removed.
Unfortunately that makes new saved .blend files initialize these vars
to 0.0, so renders come out black entirely.

Lets keep them in for at least 1 release cycle. Just 16 bytes per
scene :)
2007-02-07 09:17:57 +00:00
Nicholas Bishop 5d4b81b688 == Retopo ==
Fixed bug #5829, Exiting editmode with TAB key toggles RETOPO

* Moved the retopo_mode setting to ToolSettings.
* Renamed the other retopo_mode to the (more accurate) retopo_paint_tool
2007-01-27 18:11:07 +00:00
Nicholas Bishop 1e785638f9 Usabilility fix for retopo: allow user to disable hotspots on line ends, also only display the controls for each tool (pen, line, and ellipse) when that tool is selected.) 2007-01-16 19:06:58 +00:00
Nicholas Bishop e835a0ea55 Removed draw_mode from SculptData, replaced with draw_flag, which currently controls whether to use partial redraw and whether to draw the brush circle. Added new menu option for display of brush circle. 2007-01-14 04:55:51 +00:00
Ton Roosendaal 2e66b143f3 - Added panel for Bake render (tabbed now in 'anim' panel).
(Empty space will get OSA options, that I add tomorrow or so)

- Removed a lot of old unused variables in renderdata. Also meant I had
  to remove this from python API... please check if this gives valid
  scripts?

- Cleaned up bad formatted code for FFMPG buttons (spaces instead of tabs)
2007-01-09 11:10:12 +00:00
Nicholas Bishop 6a2ad12956 More improvements to the sculpt brush panel. Texture scale can now be set independently on the X/Y/Z axes for 3D textures and the X/Y axes for tiled brushes. The sizes can be locked together for 1:1 scaling. 2006-12-29 21:53:52 +00:00
Nicholas Bishop d9e0e883f2 Sort-of-fix for bug #5382, sculpt - image/texture brush heavily distorted when not sculpting flat relative to screen
Fix for bug #5248, sculpt - mirrored tiled texture odd results

Changed the algorithm used for projecting the brush texture onto the model. The old algorithm was never implemented properly, causing increasingly
wonky distortions of the brush as it got farther away from parallel to the screen. The new system uses the screen coords of vertices, the obvious
advantage being that 2D screen coords can be mapped quite easily to 2D texture coords. The main disadvantage of this method is that there are still
distortions in the brush as the surface beneath it becomes less parallel the screen. These distortions, however, are not as bad as the old ones
because they are predictable from the user's perspective. (It's analogous to a movie being projected onto a sphere; if the viewer is in front of the
sphere there is no apparent distortion, but from the side the movie appears stretched and distorted.)

This may still be worth revisiting after the release.
2006-12-29 08:40:19 +00:00
Geoffrey Bantle 0aebc13199 -> Further work to improve triangle conversion tool:
The improved triangle to quad conversion is now better integrated
into Blender in several respects. First of all the code makes distinctions
between 'simple' pairs and 'complex' pairs. Simple pairs are an island of
exactly two selected triangles that are joined by an edge. These simple pairs
are subject to the old 2.42 rules for joining triangles. Complex pairs are part
of larger islands of selected triangles and their conversion is controlled by
several parameters that can be individually tweaked via new buttons located
in the "Mesh Tools" panel of the editing buttons. Furthermore the tool deals
with any arbitrary combination of simple and complex islands in a consistent and
logcial way.

The code has also been drasitcally cleaned up and should address the open
bugs in the tracker regarding alt-j. However as part of cleanup the tool has
been made somewhat slower to insure a consistent mesh structure. This is a
limitation of the exist_face() function in editmesh and will have to be adressed
at a later date.
2006-12-26 02:00:56 +00:00
Nicholas Bishop dd5077060e Cleanup of the SDNA SculptData struct. Moved a lot of data that isn't saved into a separate SculptSession struct (outside of SDNA.) 2006-12-25 08:52:57 +00:00
Nicholas Bishop 7f6e10ff54 Added two menu items to sculpt mode for controlling how much tablet pressure affects brush strength and brush size. 2006-12-23 05:40:58 +00:00
Ton Roosendaal 253432bfc7 The Big Image refactor!
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html

Or in short:

- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images

Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
2006-12-20 17:57:56 +00:00
Nicholas Bishop 56b79bb66e Modified sculptmode's vertex_users to use one large chunk of memory rather than many small pieces. 2006-12-20 08:33:30 +00:00
Ton Roosendaal 089e87ccea Composite & Pass render goodies:
- New Passes: UV and Rad(iosity)
- New Nodes: UV Map and Index Mask
- Z-combine now is antialiased

As usual, please check the log. Has nice pics!
http://www.blender3d.org/cms/Composite__UV_Map__ID.830.0.html

For devs: the antialias code from Vector Blur is now exported in compo
too. Works pretty good. Even fixed a bug in antialias, so vectorblur
will be better.

Also: found out that OpenGL display list speedup accidentally was still
triggered with the rt button... so it did not work by default.
2006-12-10 20:30:15 +00:00
Nicholas Bishop 3da771fefc Fix for bug #5369, retopology - undo reverts elipse to pen
Moved the retopo tool settings into ToolSettings.
2006-12-08 00:44:44 +00:00
Kent Mein 40c77590f9 Small plumiferos wishlist item.
Adds a button next to the threads button to disable texture processing
in a render.  If anyone doesn't like the button feel free to revert this
one, its pretty simple.

Kent
2006-12-07 16:48:15 +00:00
Ton Roosendaal 17231f83f3 Work on RenderLayer and Pass control:
Full log:
http://www.blender3d.org/cms/Render_Passes.829.0.html

In short:
- Passes now have option to be excluded from "Combined".
- RenderLayers allow to override Light (Lamp groups) or Material.
- RenderLayers and Passes are in Outliner now, (ab)using Matt's nice
  'restriction collumns'. :)
2006-12-07 14:17:38 +00:00
Nicholas Bishop ee0dccbf96 Added slider for the Draw brush that modifies the direction vertices are pulled in relation to the view. 2006-12-06 02:10:27 +00:00
Ton Roosendaal 869eeadeff Damn! Commit for render passes in wrong dir.... 2006-12-05 16:44:57 +00:00
Nicholas Bishop 0cc76d831c Large change to the way sculptmode drawing works. The default is now to draw
using the standard drawing functions. Enabling the "Partial Redraw" item in the
sculpt menu will turn on the optimizations which stores unmodified parts of the
color buffer and only redraws the polygons that are within the modified area(s).

The Partial Redraw option uses the accumulation buffer to store the copy, and
unfortunately this is not accelerated on older cards. There are alternatives,
e.g. drawing to an auxiliary buffer or downloading the data from the graphics
card with glReadPixels, but there's no guarantee that these will run at an
acceptable speed on older graphics cards either. For the cards that do
accelerate the accumulation buffer (for nvidia cards, I would assume that is at
least FX5200 and up, and maybe earlier) it provides a very significant speedup.
2006-12-04 05:36:50 +00:00
Ton Roosendaal 6543d3e220 Render Monster support: (part 1)
Removed all limitations from render code for maximum threads. The only
define for this now is in BLI_threads.h, and currently set to 8.
Note that each thread renders an entire tile, and also allocates the
buffers for the tiles, so; more threads might work better with smaller
tiles.

IMPORTANT: node system won't work yet with more than 2 threads! So, don't
try material nodes or compositing with over 2 threads. That I'll commit
later today.

What does work (should work :) is AO and soft shadow now.
2006-11-29 17:01:09 +00:00
Ton Roosendaal ced3b0fd6f SculptMode fix:
DNA definition of Sculpt structs in Scene were not properly aligned,
causing memory errors on quit ("Memoryblock reconstruct: end corrupt").

More testing reveiled padding errors in two other DNA_ includes, for
sound and gamelogic. Both potentially crashers... and caused by
commenting out struct members with a C++ comment, that seems to not
work...

I've revived the DNA padding test method, which saves out a simple C
file you can compile to see where padding issues are. This now works
as follows:

- change line 991 in makesdna.c to become (1) (true).
- recompile makesdna.c
- you now have a padding.c in the same dir as makesdna.c
- compile it, command line: "gcc -o padding padding.c"
- now run it (./padding), and it will print out errors, if there are.

For me, the DNA files are now 100% padding free. Might be interesting to
check it in 64 bits though!
2006-11-26 12:23:21 +00:00
Nicholas Bishop 204f6066a9 * Replaced the three X/Y/Z sliders that controlled the texture size in sculpt
mode with a single slider. (Doesn't seem likely the user is going to want to
  scale in one axis differently from another.) Additionally, the new slider
  works correctly in Tile mode in addition to 3D mode. In Tile mode, the slider
  value is considered pixel units.

In the process, found and fixed a few sculptmode bugs
* When loading a file that is already in sculptmode, initialize sculptdata
  as soon as the first sculpt/partial-visibility operation occurs
* Bug in the undo_push code; reading from free'd memory
2006-11-19 09:25:17 +00:00
Nicholas Bishop 0d08181c35 Generalized the sculptmode propset (DKEY) to work with strength as well as
brush size. Pressing the key once does brush size (same as before), then
pressing it a second time switches to setting brush strength.
2006-11-18 21:01:25 +00:00
Nicholas Bishop 7c6ffecfff Fixed bug #5174, Crash on sculpt mode undo
The fix adds support for storing edge/face/partial visiblity data to the sculpt
mode undo data. (This may also be useful for multires.)
2006-11-10 01:57:06 +00:00
Ken Hughes 56a12a30c5 Patch #4896, submitted by Juho Vepsäläinen (bebraw):
Allows "Degr" field in Mesh tools accept negative and positive float values
from range [-360, 360].
2006-11-09 14:30:11 +00:00
Joshua Leung 7f0dc54f61 This commit adds two of my recent animation editing related patches:
#5061 - Ipo/Action 'Cleaning'
#5071 - 'Only Needed' Keyframing Option

====================

* IPO/Action 'Cleaning':
It removes un-necessary keyframes from individual ipo curves.
- In both editors, the hotkey is currently the OKEY.  Also accesable from menus of each editor.
- There is currently a 'threshold' popup. This sets the value that the cleaner uses to determine if two keys have same time/value

There are a few improvements that could still be made, such as:
- There are a few cases that it still doesn't handle yet, such as when un-needed keyframes lie on a linear line (and similiar cases). This shall be improved soon.
- Also, for some reason, after running cleaning while in ipo editor editmode, all but the active curve are hidden.

====================

* 'Only Needed' Keyframing Option:
This patch adds a new keyframing option for objects and bones. It only adds keyframes where they are needed, judging from the surrounding points on that curve.

Notes about this keyframing option:
- Works like the existing 'Avail' option, except it checks if the keyframe
is needed.
- Currently uses hardcoded threshold for determining if same value.

[quote]
/* Cases where keyframes should not be added:
*       1. Keyframe to be added bewteen two keyframes with similar values
*       2. Keyframe to be added between two keyframes with similar times
*       3. Keyframe lies at point that intersects the linear line between two
keyframes
*/
[/unquote]
2006-11-09 08:43:27 +00:00
Nicholas Bishop 8e97a2955b Merged Google Summer of Code sculptmode/multires/retopo tools.
From the tracker:
https://projects.blender.org/tracker/index.php?func=detail&aid=5018&group_id=9&atid=127
2006-11-06 01:08:26 +00:00
Matt Ebb 2e7aa1dbf5 * Proportional edit mode 'random' falloff
This is another proportional edit falloff that slightly randomises the
influence. It's not strictly random, it's blended with linear falloff so that
it's a bit smoother. The nice thing is that it works with all transforms, axis
locking etc, including the special ones like to sphere, shrink/fatten/etc. It
can be used for all sorts of things like roughening surfaces. I most recently
used it to add a bit of randomness to the folds of some cloth. I
made a short demo video here: http://mke3.net/blender/etc/prop_random-h264.mov

Also included nicer icons for the falloff types.
2006-09-25 05:15:19 +00:00
Ton Roosendaal f6a6ad5688 New render feature:
If you define multiple RenderLayers with different view-layers, these
view-layers are rendered entirely, not looking at the faces that are
invisible. This allows layered composite, but only when geometry does
not intersect or overlap partially.

This new Renderlayer option "All Z values" will fill in the Z of not
visible faces (in the Scene view-layers) as well, which then allows
masking out as if these faces were set to Material option "Env".

Here's an example composite to show the effect:

Two cubes, in view-layers 1 and 2, and rendered in 2 RenderLayers:
http://www.blender.org/bf/all_z0.jpg

Same scene, but with both RenderLayers set to "All Z values":
http://www.blender.org/bf/all_z.jpg
2006-09-24 09:21:04 +00:00
Ton Roosendaal 03bab43951 Fix for Brecht's commit to include the active Brush in ToolSettings, seems
to cause crashes on loading files.

Struct toolsettings was defined with a struct definition inside of a struct
definition... something I'm pretty sure our SNDA doesn't have support for.
2006-08-30 10:43:51 +00:00
Brecht Van Lommel f893d950a1 Image Paint:
- Code for brush spacing and timing was rewritten, making spacing more even.
  Example: http://users.pandora.be/blendix/brush_spacing.jpg
- Instead of Stepsize for regular brushes and Flow for airbrushes, there is
  now Spacing for both, and Rate for airbrushes.
- Airbrush now works more like it does in the Gimp now, by maintaining the
  spacing even if the brush moves faster than the painting rate.

- Some preparations to make brushes work in texture paint mode.
2006-07-28 00:56:35 +00:00
Brecht Van Lommel 4ee3515bf1 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-26 22:29:23 +00:00
Ton Roosendaal bb9cafc257 Bugfix #4557
Report noted the slow icon renders for menus, which indeed is an issue,
especially when texture images need to be loaded (not to mention that
will eat up loads of memory).

Added a flag in scene to disable loading of images, makes it 50 times
faster, at least :)
2006-07-02 18:26:20 +00:00
Ton Roosendaal 5a4dc67281 Cleanup of UI for new renderpipeline
- removed "Unified" button, replaced with "HD" preset for 1920x1080 output
- removed the unused "Pass" options
- removed the unused "Strands" render-layer option

Because the internal render pipe supports this already; added two more
render-layer options:

- "Sky", to enable/disable sky render in a layer (this was part of "Solid"
  before, not so correct... to ensure previously saved files work, the
  "Sky" option is set by default when "Solid" was set. The version patching
  will do this temporally always, until we've bumped up version to 2.42
- "Edge", to enable/disable edge render in a layer. Nice for compositing.

Also in this commit: fixed warnings for exported functions for the new
Node Editor pull-down menus.
2006-06-17 10:25:07 +00:00
Alfredo de Greef 7df985be0a 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 03:39:03 +00:00
Ton Roosendaal e5b39b69d1 So! Finally time to work on finishing render pipeline project.
This commit brings back:

- Field Render
- MBlur Render (old style)
- Border render with or without cropping

Note: Field Render is not supported in Compositor yet. Blurring or filter
will destroy field information.
Both MotionBlur as Field render are done before Compositing happens.

Fixes:

- The "Save Buffers" option only worked on single frame renders, not for
  Anim render.
- Found an un-initalized variable in Render initialize... this might have
  caused the unknown random crashes with render.

Code restructure:

Cleaned up names and calls throughout the pipeline, more clearly telling
what goes on in functions.
This is visible in the updated first image of the Wiki doc:
http://mediawiki.blender.org/index.php/BlenderDev/RenderPipeline
2006-05-27 13:35:03 +00:00