- add knife project to toolbar.
- when running knife project, disable vertex selection since it may select areas between the newly cut regions.
  add EDBM_selectmode_disable() function since loopcut does this too.
- (optimization) avoid looping over all geometry when flushing and no selection exists.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55445 954f8c5b-7b00-dc11-b283-0030488c597c
Small fix: make node backdrop draw with nearest-pixel filter, so it zooms in 
showing pixels. Issue was it also blurred image at zoom level 1... maybe subpixel
issue. Anyway - for inspecting exact composite results, zooming in showing pixels
is nicer anyway.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55446 954f8c5b-7b00-dc11-b283-0030488c597c
OSX/tablet: fix a longstanding bug with certain devices and a cornercases

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55447 954f8c5b-7b00-dc11-b283-0030488c597c
Prefetching for movie clips

This commit basically implements frames prefetching for
movie clip datablock.

Number of frames to be prefetched is controlled in User
Preferences, System tab, Prefetch Frames option.

Currently prefetching is destructive-less for movie cache,
meaning mo frames will be removed from the cache when while
prefetching. This is because it's half of simplier to
implement, but it also makes sense from tracking point of
view -- we could want to playback in both directions and
removing frames from behind time cursor is not always a
good idea.

Anyway, smarter prefetching strategy could be developed
later.

Some implementation notes:

- Added MEM_CacheLimiter_get_memory_in_use function to get
  memory usage of specified memory limiter.

- Fixed prototype of MEM_CacheLimiter_get_maximum which
  was simply wrong (used wrong data type for output).

- Added some utility functions to movie clip and movie
  cache for direct cache interaction and obtaining cache
  statistics.

- Prefetching is implemented using general jobs system.
  which is invoking from clip draw function.

- Prefetcing will stop as soon other job or playback starts.
  This is done from performance point of view. Jobs will
  likely require lots of CPU power and better to provide
  whole CPU to it.

  Playback is a bit more complicated case. For jpeg sequence
  playback prefetching while paying back is nice. But trying
  to prefetch heavy exr images and doing color space
  conversion slows down both playback and prefetching.

TODO:

- Think of better policy of dealing with already cached frames
  (like when cached frames from other clips prevents frames
  from current clip to be prefetched)

- Currently a bit funky redraw notification happens from
  prefetch job. Perhaps own ND_ is better to have here.

- Hiding clip while prefetch is active in theory shall stop
  prefetching job.

- Having multiple clips opened on file load will prefetch
  frames for only one of them.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55448 954f8c5b-7b00-dc11-b283-0030488c597c
Bugfix [#34710] Crash on duplicating object with cloth modifier.

Caused by last commit by me.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55449 954f8c5b-7b00-dc11-b283-0030488c597c
When using border rendering, use the same border for compositor

This makes compositing as fast as it's possible in this case.

The only thing is border render+crop will still give funcy
results. This is the next thing to be solved in compositor.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55450 954f8c5b-7b00-dc11-b283-0030488c597c
Changes to compositor output node

Make it so compositor output node wouldn't be calculated
when Render Result image is not visible on the screen.
This makes compositor tree editing more friendly and
faster.

Also, if there's no viewer image visible on the screen
viewer nodes wouldn't be handled.

Final rendering keeps unchanged for now.

This solves issues when for performance artists are
disconnecting compo output node before tweaking values
in compositor and forgets to attach compo output
node before sending file to the farm.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55451 954f8c5b-7b00-dc11-b283-0030488c597c
I18n users request: add the ability to use a translated name for newly added/created objects or other datablocks.

This simply adds a third "translation type" (in addition to iface and tip), "new data", with relevant user settings flag and helper funcs/macros (and py api).

Currently implemented name translation when adding new objects, as well as modifiers and constraints, will add the others (cd layers, scenes, perhaps nodes [though I think they do not need this], etc.) later.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55452 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: use bool where values are true/false, for view3d and related functions.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55453 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34700: cycles depth of field now works with orthographic cameras too.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55454 954f8c5b-7b00-dc11-b283-0030488c597c
fix for incorrect use of 'bool', also fix 2 older bugs in fly mode.
- panning didnt keyframe translation animation.
- when checking to key translation: speed `float` was converted to an `int` then treated as a bool, now check (speed != 0).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55455 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: misc warnings/style


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55456 954f8c5b-7b00-dc11-b283-0030488c597c
Bugfix [#34688] Auto-Keying doesn't include custom properties when pasting poses

Previously, Paste Poses only used the LocRotScale Keying Set for autokeyframing
purposes. This was fine for most purposes, but with many rigs these days also
using custom properties for important posing functions, it's important that we
include those here too.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55457 954f8c5b-7b00-dc11-b283-0030488c597c
Driver error warnings are now only printed to the console when Blender is run
using the -d flag

This prevents a stream of error messages flooding the console when working with
particular rigs which may have a few broken controls. In general, riggers now
have a better alternative by using the filtering tools in the Graph Editor.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55458 954f8c5b-7b00-dc11-b283-0030488c597c
Tweaks to movie clip prefetching after discussion with Sebastian

Don't use sequencer's Frames Prefetch option and rather fill the
whole cache with frames.

Since movie clip is not "classical" prefetcher (it doesn't do
anything while playing back) and main purpose is to speed up
reading for further tracking and so, such a change seems logical.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55459 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34707: Blender crash on enabling of boolean modifier

Stupid mistake by my own with recent Carve update which
undid fix for MSVC STL library.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55460 954f8c5b-7b00-dc11-b283-0030488c597c
Bugfix: Transform autokey warning indicator text was getting clipped prematurely

After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55461 954f8c5b-7b00-dc11-b283-0030488c597c
Bug fix #34713

Using MultiSample, the code that inspects Z buffer values fail, like for grease pencil
drawing on "Surface".

It appears to me that all this depth draw/read code is ignoring gpu offscreen entirely.
This should be confirmed by Campbell though :)

I'm also quite unsure why this code exists, related to other tools that use
depth too (particles, sculpt). Good to mark down for our viewport recode.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55462 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for extra string width padding in ui_text_icon_width, causing labels in right-aligned layouts show an annoying gap. If the layout is right-aligned, make the text button align right as well, so text is drawn at the right side of the alloted rect.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55463 954f8c5b-7b00-dc11-b283-0030488c597c
Add a little bit of space between socket layouts on nodes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55464 954f8c5b-7b00-dc11-b283-0030488c597c