Commit Graph

3199 Commits

Author SHA1 Message Date
Nicholas Bishop 147b4b13ba Add new options to PAINT_OT_brush_select, toggle and create_missing.
The toggle option, if enabled, will toggle back and forth between two
brushes. (The first brush of the desired tool type will be toggled to,
running the toggle again switches back to the previously selected
brush.)

If no brush of the desired type is found, and the create_missing
option is enabled, a new brush of that type will be created and set.
2012-05-10 20:32:31 +00:00
Daniel Genrich 7a95d4333a Fix reseting of particle lifetime and unborn feature when adding smoke - reported by blendernation 2012-05-08 11:39:32 +00:00
Campbell Barton 9e3523b556 code cleanup: documentation commit 2012-05-06 16:28:52 +00:00
Campbell Barton 1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
Campbell Barton 299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
Campbell Barton a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Sergey Sharybin 72fa158724 Added start and end bevel factor for curves, so now it's possible to make
a bevelled curve which isn't fully covered with a bevel.
2012-05-04 17:04:20 +00:00
Dalai Felinto d7fbe03a8a Fisheye Camera for Cycles
For sample images see:
http://www.dalaifelinto.com/?p=399 (equisolid)
http://www.dalaifelinto.com/?p=389 (equidistant)

The 'use_panorama' option is now part of a new Camera type: 'Panorama'.
Created two other panorama cameras:

- Equisolid: most of lens in the market simulate this lens - e.g. Nikon, Canon, ...)
             this works as a real lens up to an extent. The final result takes the
             sensor dimensions into account also.
             .:. to simulate a Nikon DX2S with a 10.5mm lens do:
                 sensor: 23.7 x 15.7
                 fisheye lens: 10.5
                 fisheye fov: 180
                 render dimensions: 4288 x 2848

- Equidistant: this is not a real lens model. Although the old equidistant lens simulate
               this lens. The result is always as a circular fisheye that takes the whole sensor
               (in other words, it doesn't take the sensor into consideration).
               This is perfect for fulldomes ;)

               For the UI we have 10 to 360 as soft values and 10 to 3600 as hard values (because we can).


Reference material:
http://www.hdrlabs.com/tutorials/downloads_files/HDRI%20for%20CGI.pdf
http://www.bobatkins.com/photography/technical/field_of_view.html

Note, this is not a real simulation of the light path through the lens.
The ideal solution would be this:
https://graphics.stanford.edu/wikis/cs348b-11/Assignment3
http://www.graphics.stanford.edu/papers/camera/


Thanks Brecht for the fix, suggestions and code review.
Kudos for the dome community for keeping me stimulated on the topic since 2009 ;)

Patch partly implemented during lab time at VisGraf, IMPA - Rio de Janeiro.
2012-05-04 16:20:51 +00:00
Sergey Sharybin 549b3ccba1 Throw an error and prevent compilation if there're unknown structures detected by DNA 2012-05-04 08:18:47 +00:00
Sergey Sharybin 48ead27366 Camera tracking: switch dopesheet information to lazy calculation
All operators which changes tracking data now just tags dopsheet as outdated,
actual re-calculaiton of happens only when this information is actually needed
(like on dopesheet draw).

This makes things a bit faster when there's no dopesheet visible in current
screen and also makes it much easier to update dopesheet using dependency
graph.

Also renamed dopesheet_sort_order to dopesheet_sort_method in rna and internal
stuff which makes much more sense and also correlated with naming in
file browser.
2012-05-03 23:15:01 +00:00
Campbell Barton 5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +00:00
Sergey Sharybin b1006fb949 Clip editor: sort order for dopesheet channels
Supported sorting by name, longest tracked segment and total tracked frames.

Internally tracks are stored in Tracking datablock, but sort order is
a clip editor space property and sorting happens on clip editor draw.
If there's no dopesheet opened with different sort orders it's not
a problem due to re-sorting wouldn't happen.

Also fixed draw issue of tracked segments introduced in previous commit.
2012-05-03 19:28:41 +00:00
Sergey Sharybin 5821c2973e Camera tracking: pre-calculate tracked segments for dopesheet channels 2012-05-03 17:52:34 +00:00
Lukas Toenne 01b3deb680 A number of changes to node RNA and the file output node, to simplify socket types and make node code more robust for future nodes with extra socket data.
* Removed the struct_type identifier from sockets completely. Any specialization of socket types can be done by using separate collections in RNA and customized socket draw callbacks in node type. Sockets themselves are pure data inputs/outputs now. Possibly the sock->storage data could also be removed, but this will change anyway with id properties in custom nodes.

* Replaced the direct socket button draw calls by extra callbacks in node types. This allows nodes to draw sockets in specialized ways without referring to the additional struct_type identifier. Default is simply drawing the socket default_value button, only file output node overrides this atm.

* File output node slots now use a separate file sub-path in their storage data, instead of using the socket name. That way the path is an actual PROP_FILEPATH property and it works better with the UI list template (name property is local to the data struct).

* Node draw contexts for options on the node itself and detail buttons in the sidebar now have an extra context pointer "node" (uiLayoutSetContextPointer). This can be used to bind operator buttons to a specific node, instead of having to rely on the active/selected node(s) or making weak links via node name. Compare to modifiers and logic bricks, they use the same feature.

* Added another operator for reordering custom input slots in the file output node.
2012-05-02 07:18:51 +00:00
Daniel Stokes ae4fda82b0 Merging phase 1 of the BGE Harmony branch:
* Shadow color now usable in the BGE
 * Simplified the shadow panel while "Blender Game" renderer is active
 * Added variance shadow maps for the BGE
 * Buffered shadows on sun lamps in the BGE (orthographic)
 * Light textures in the BGE
2012-05-01 02:50:17 +00:00
Sergey Sharybin f111131ca6 Camera tracking: initial commit of dopesheet view for clip editor
- Displays dopesheet information for selected tracks, and currently does not
  support any kind of editing.
- Changed regions to use the whole main region for such views as curves and dopesheet.
  This allows to have own panels with tools/properties in this area.
- Active clip is getting synchronized between different clip editor editors in the
  same screen, so updating of curve/dopesheet views happens automatically when one
  changes current clip in one of this editors.
- Panels in toolbox and properties panels are now separated to rely on current view
  mode, but some operators and poll functions still need to be updated.
- Added new screen called "Movie Tracking" where layout is configured to
  display timeline, main clip window, curves and dopesheet.
2012-04-30 16:19:20 +00:00
Sergey Sharybin 323aedb81e Camera tracking: use texture buffers (if supported) to display clip editor frames
Use texture buffers to display frames of footage in clip editor. This allows
to apply bilinear filtering of proxied resolution which.

This also resolves incredibly slow performance when drawing 4K footage on
some videocards (was originally noticed on macbook pro). Also this allows
to avoid sending the whole frame to the video memory when working with a
single frame (i.e. before this patch the whole frame would be send to the
videocard when panning frame).
2012-04-30 16:19:12 +00:00
Campbell Barton 112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
Nicholas Bishop f7ec94cbc6 Add per-brush weight field.
Patch from Jaggz H, thanks!

[#31096] Weight-painting: Brush-specific weights
http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9

Each brush's weight can now be set individually, can also enable
unified setting (same as size and strength have.)

Added readfile code to the patch: subversion bumped to 1, brushes get
default weight of 0.5, unified weight enabled by default and value
from old vgroup_weight field.
2012-04-29 20:04:25 +00:00
Campbell Barton 343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
Campbell Barton e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Sergey Sharybin c27c87dde4 Camera tracking: backport refactoring made in local branches with masking and dopesheet view into trunk
Mostly related on changes in poll functions for tracking operators and some changes
to how interface is initializing for different view types.
2012-04-29 12:32:26 +00:00
Daniel Genrich 8bf8a128c2 Smoke: Support for moving obstacles. (Merge from Smoke2 branch)
Sponsored by the Blender Development Fund.
http://www.blender.org/blenderorg/blender-foundation/development-fund/

Remarks:
The original code was not designed to support moving obstacles so I had to introduce some velocity constraints into the code to prevent smoke from exploding. If this causes problems with "fire" emulation, please let me know.
2012-04-28 21:46:43 +00:00
Sergey Sharybin 51a4188105 Camera tracking: support of tripod motion solving
Expose option into interface to use modal solver which currently
supports only tripod motion.

This solver requires two tracks at least to reconstruct motion.
Using more tracks aren't improving solution in general, just adds
instability into solution and slows down things a lot.

Refirement of camera intrinsics was disabled due to it's not only
refines camera intrinsics but also adjusts camera position which
isn't necessary here

To use this solver just activate "Tripod Motion" checkbox in
solver panel.

Merged from tomato: svn merge ^/branches/soc-2011-tomato -r45622:45624 -r46036:46037

P.S. Quite experimental yet, requires more checking and probably
tweaks to prevent camera jumps when tracks apperars/disappears
from the screen.
2012-04-28 14:54:45 +00:00
Campbell Barton 9caab2e265 code cleanup: replace some long ELEM7 checks with macro OB_TYPE_SUPPORT_EDITMODE() 2012-04-28 10:33:32 +00:00
Brecht Van Lommel 07b2241fb1 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 08:53:59 +00:00
Campbell Barton b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Bastien Montagne f92fcbd413 Minor fix in response to Koji Iigura's mail. Own error, sorry about that (I tend to forget not all OS are utf-8 yet :/ ). 2012-04-26 11:23:37 +00:00
Antony Riakiotakis 4782522379 Add libMV and Scons support for MinGW-w64, patches by Caleb Joseph with slight modifications.
Thanks!
2012-04-24 12:57:58 +00:00
Campbell Barton 4ff038c411 screenshot operator now adds file extension in the file selector and has its own save options rather then using the render options (works like image save a copy). 2012-04-24 02:01:23 +00:00
Campbell Barton 6f1019e869 add inset and bridge to mesh specials menu (along side bevel) + typo fix. 2012-04-24 01:04:37 +00:00
Campbell Barton b9a2741f68 code cleanup: remove unused defines 2012-04-23 08:05:02 +00:00
Campbell Barton 4c4389f6a4 code cleanup: remove editbutflag flag from toolsettings & related defines. 2012-04-23 02:48:05 +00:00
Campbell Barton e26ef899c3 clear the FGON edge flag when updating old meshes to polygons. (we may wan't to reuse the flag later) 2012-04-23 00:58:17 +00:00
Campbell Barton 5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
Campbell Barton b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
Campbell Barton 8765dfccf7 style cleanup: correct typos 2012-04-21 14:14:58 +00:00
Campbell Barton 6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
Brecht Van Lommel 8ae502ae99 Fix #30977: error loading modal keymaps from keyconfiguration presets. 2012-04-17 15:40:04 +00:00
Lukas Toenne 5c646e7e3a Reverted r43219 "Improved auto-hiding of unused sockets for collapsed nodes."
This feature did have a number of flaws and caused some controversy, so removal is the better option. Hiding nodes without prior connections would just hide all the sockets, leaving an unusable node. Better way is to use the ctrl+h shortcut to explicitly hide unused sockets when necessary.
2012-04-16 10:50:57 +00:00
Thomas Dinges 5496e87eee Fluid Simulation:
* Replaced the hard coded viscosity presets with Python ones.

* Added version check, so older files load fine.
Loading new files into 2.62 also works fine.
2012-04-15 21:02:08 +00:00
Sergey Sharybin f9d9b4635d Camera tracking: support of tripod motion solving
Expose option into interface to use modal solver which currently
supports only tripod motion.

This solver requires two tracks at least to reconstruct motion.
Using more tracks aren't improving solution in general, just adds
instability into solution and slows down things a lot.

Refirement of camera intrinsics is supported by this solver.

To use this solver just activate "Tripod Motion" checkbox in
solver panel.
2012-04-14 12:02:47 +00:00
Sergey Sharybin bfca79a657 Merging r44227 through r45619 from trunk into soc-2011-tomato 2012-04-14 10:46:47 +00:00
Campbell Barton 969a079aeb code cleanup: comment (almost) all members of KeyBlock & Key. 2012-04-14 03:58:08 +00:00
Campbell Barton 289f627f63 code cleanup: when extending name length Key.elemstr was incorrectly extended to 64 chars, added comment and set back to original length. 2012-04-14 02:48:56 +00:00
Campbell Barton 0d9fa93581 fix for editmode UV hiding with edges, was also using deprecated flag (UV_SELECT_FACE) 2012-04-13 13:31:41 +00:00
Campbell Barton 405c9d9a95 code cleanup: remove unused KeyBlock.adrcode 2012-04-12 11:50:43 +00:00
Campbell Barton c74ace03e0 fix [#30907] Inset tool with Select Outer disabled does not allow translation of new faces
inset with select-inner faces gave invalid selection.

also correct spelling in some comments.
2012-04-12 07:40:47 +00:00
Campbell Barton 1f6369fd41 bmesh shape key conversion on exiting editmode.
there were 2 blocks of code (both calculating the offset array), now move the fallback method into the main key conversions block.
2012-04-11 15:24:13 +00:00
Campbell Barton c56b39b8dd write mesh selection history to the blend file. without this active edge/vert are lost on UNDO. 2012-04-11 11:52:21 +00:00