blender.git
4 years agoDepth of field high quality:
Antony Riakiotakis [Tue, 3 Mar 2015 16:47:31 +0000 (17:47 +0100)]
Depth of field high quality:

A new checkbox "High quality" is provided in camera settings to enable
this. This creates a depth of field that is much closer to the rendered
result and even supports aperture blades in the effect, but it's more
expensive too. There are optimizations to do here since the technique is
very fill rate heavy.

People, be careful, this -can- lock up your screen if depth of field
blurring is too extreme.

Technical details:

This uses geometry shaders + instancing and is an adaptation of
techniques gathered from

http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane-

 http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20-
%20in%20Real-Time%20Rendering%20Course).ppt

TODOs:

* Support dithering to minimize banding.
* Optimize fill rate in geometry shader.

4 years agoFix compilation error of blenderplayer after recent constraint commit
Sergey Sharybin [Thu, 19 Mar 2015 14:10:09 +0000 (19:10 +0500)]
Fix compilation error of blenderplayer after recent constraint commit

4 years agoCorrect recent armature symmetrize
Campbell Barton [Thu, 19 Mar 2015 13:41:29 +0000 (00:41 +1100)]
Correct recent armature symmetrize

Duplicating part of a chain could have invalid 'connected' flag.

4 years agoSpeedup for constraints update from python script
Sergey Sharybin [Thu, 19 Mar 2015 13:28:49 +0000 (18:28 +0500)]
Speedup for constraints update from python script

General idea is to avoid actual calculation from property update()
callback and tag things for update later instead.

That said, pose constraint flags are now tagged for update and
handled as a part of object update. In the new depsgraph it'll
be a nice dedicated operation node.

Also avoid updating disabled flags for all the modifiers. This
part of the path is not totally optimal since it'll still need
to iterate over bones in order to get pchan, but to optimize it
further would be nice to find a way to avoid pchan requirement
all together.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1191

4 years agoFix T44040: Blender crashes when nodes are muted
Sergey Sharybin [Thu, 19 Mar 2015 11:04:49 +0000 (16:04 +0500)]
Fix T44040: Blender crashes when nodes are muted

It was actually an old issue with wrong conversion happening for muted
nodes, which wasn't visible before memory optimization commit.

This is to be backported to the final release.

4 years agoCleanup
Campbell Barton [Thu, 19 Mar 2015 09:34:02 +0000 (20:34 +1100)]
Cleanup

4 years agoTransform: Shift for precision PET adjustment
Campbell Barton [Thu, 19 Mar 2015 09:09:34 +0000 (20:09 +1100)]
Transform: Shift for precision PET adjustment

Patch T36753 by @hjaarnio

4 years agoArmature Symmetrize tool
Campbell Barton [Thu, 19 Mar 2015 06:57:17 +0000 (17:57 +1100)]
Armature Symmetrize tool

D1147 by @julien, with fixes/improvements

Duplicate bones where needed, otherwise use existing.
Keeps parent relations intact, can operate on parts of an armature.

4 years agoCleanup: style (armature duplicate)
Campbell Barton [Thu, 19 Mar 2015 06:29:46 +0000 (17:29 +1100)]
Cleanup: style (armature duplicate)

4 years agoFix out-of-bounds read BKE_deform_flip_side_name
Campbell Barton [Thu, 19 Mar 2015 07:00:10 +0000 (18:00 +1100)]
Fix out-of-bounds read BKE_deform_flip_side_name

4 years agoCMake: unbundle eigen3
Campbell Barton [Thu, 19 Mar 2015 04:41:41 +0000 (15:41 +1100)]
CMake: unbundle eigen3

Optionally use systems eigen3 library.

T41989 by @hasufell with edits

4 years agoCMake: exclude Colamd when OpenNL's disabled
Campbell Barton [Thu, 19 Mar 2015 03:48:52 +0000 (14:48 +1100)]
CMake: exclude Colamd when OpenNL's disabled

4 years agoFreestyle: pass Main struct to new/copy
Campbell Barton [Thu, 19 Mar 2015 03:33:05 +0000 (14:33 +1100)]
Freestyle: pass Main struct to new/copy

4 years agoCleanup: spelling grey -> gray
Campbell Barton [Thu, 19 Mar 2015 03:14:48 +0000 (14:14 +1100)]
Cleanup: spelling grey -> gray

4 years agoRevert part of recent color-management commit
Campbell Barton [Thu, 19 Mar 2015 03:09:01 +0000 (14:09 +1100)]
Revert part of recent color-management commit

This adds back rgb_to_grayscale,
not all color is managed or depends on the current loaded blend file's CM options.

Noted in comments that this is only to be used outside the CM pipeline.

4 years agoColor managed luminance for shader ramp-in-energy
Campbell Barton [Thu, 19 Mar 2015 01:59:36 +0000 (12:59 +1100)]
Color managed luminance for shader ramp-in-energy

4 years agoCleanup: better not pass function call to FTOCHAR
Campbell Barton [Thu, 19 Mar 2015 01:42:34 +0000 (12:42 +1100)]
Cleanup: better not pass function call to FTOCHAR

also use rgb_uchar_to_float

4 years agoUse fabsf for floats
Campbell Barton [Wed, 18 Mar 2015 19:13:50 +0000 (06:13 +1100)]
Use fabsf for floats

4 years agoSelect nth option to skip steps
Campbell Barton [Wed, 18 Mar 2015 17:40:43 +0000 (04:40 +1100)]
Select nth option to skip steps

Patch T43752 @codemanx, added matching curve option.

4 years agoFix for crash adding mask modifier
Campbell Barton [Wed, 18 Mar 2015 14:09:41 +0000 (01:09 +1100)]
Fix for crash adding mask modifier

4 years agoSimplify math in mix_linear glsl function. Thanks to valentin for
Antony Riakiotakis [Wed, 18 Mar 2015 13:09:03 +0000 (14:09 +0100)]
Simplify math in mix_linear glsl function. Thanks to valentin for
pointing out on irc.

4 years agoFix T44029 textures disappear in viewport if GPU mipmap generation is
Antony Riakiotakis [Wed, 18 Mar 2015 12:48:37 +0000 (13:48 +0100)]
Fix T44029 textures disappear in viewport if GPU mipmap generation is
off.

GPUs need a full tree of mipmaps up to dimension 1xn to work. This will
make it so for all imbufs but cost is negligible and it's unlikely that
something could break due to that.

4 years agoFix bad memory access freeing viewport which uses movie clip
Sergey Sharybin [Wed, 18 Mar 2015 12:17:04 +0000 (17:17 +0500)]
Fix bad memory access freeing viewport which uses movie clip

4 years agoSupport UV island selection in UV synch and face select mode.
Antony Riakiotakis [Wed, 18 Mar 2015 11:40:53 +0000 (12:40 +0100)]
Support UV island selection in UV synch and face select mode.

Enough said, people wanted this for ages, enjoy!

4 years agoFix crash using "Copy to selected" on ID-props
Campbell Barton [Wed, 18 Mar 2015 07:50:33 +0000 (18:50 +1100)]
Fix crash using "Copy to selected" on ID-props

4 years agoRNA: palette colors api
Campbell Barton [Wed, 18 Mar 2015 04:09:04 +0000 (15:09 +1100)]
RNA: palette colors api

Methods so Python can manage colors.
palette.colors.new()/remove()/clear()/active

4 years agoRNA: move palette into its own file
Campbell Barton [Wed, 18 Mar 2015 03:03:59 +0000 (14:03 +1100)]
RNA: move palette into its own file

4 years agoFix crash using removed data as function arguments
Campbell Barton [Wed, 18 Mar 2015 04:50:29 +0000 (15:50 +1100)]
Fix crash using removed data as function arguments

4 years agoFix RNA active spline assignment
Campbell Barton [Wed, 18 Mar 2015 04:14:32 +0000 (15:14 +1100)]
Fix RNA active spline assignment

4 years agoFix T44028: Vertex Colors Baking error
Sergey Sharybin [Tue, 17 Mar 2015 19:09:54 +0000 (00:09 +0500)]
Fix T44028: Vertex Colors Baking error

Was wrong color management flag used for some bakers.
Actually goes back to 7997e38.

4 years agoFix T44027: Normal Edit Mod : Radial from object normals affected by target object...
Bastien Montagne [Tue, 17 Mar 2015 17:14:38 +0000 (18:14 +0100)]
Fix T44027: Normal Edit Mod : Radial from object normals affected by target object scale.

The way we were getting diff to apply to vcos from target object was just bad!

Also, fixed another related issue - negated scale would be clamped to nearly zero,
now only consider absolute version of size (we do not care about its sign here anyway).

This should be backported to 2.74 (with previous commit too).

4 years agoBLI math vec: add 'abs' functions to get absolute values of a vector.
Bastien Montagne [Tue, 17 Mar 2015 17:13:35 +0000 (18:13 +0100)]
BLI math vec: add 'abs' functions to get absolute values of a vector.

Unseful when handling e.g. scale, sometimes.

4 years agoCycles: Improve readability of dumped graphs
Sergey Sharybin [Tue, 17 Mar 2015 16:15:17 +0000 (21:15 +0500)]
Cycles: Improve readability of dumped graphs

4 years agoCycles: Fix displacement code creating cyclic dependencies in graph
Sergey Sharybin [Tue, 17 Mar 2015 14:36:29 +0000 (19:36 +0500)]
Cycles: Fix displacement code creating cyclic dependencies in graph

Bump result was passed to set_normal node and then set_node was connected
to all unconnected Normal inputs, including the one from original Bump
node, causing cycles.

4 years agoPart 2 of D1082 by Troy Sobotka, remove our functions that do luma
Antony Riakiotakis [Tue, 17 Mar 2015 14:20:33 +0000 (15:20 +0100)]
Part 2 of D1082 by Troy Sobotka, remove our functions that do luma
calculations and use the OCIO one instead.

4 years agoPart 1 of D1082 by Troy Sobotka, add API in OCIO for luminance
Antony Riakiotakis [Tue, 17 Mar 2015 13:15:05 +0000 (14:15 +0100)]
Part 1 of D1082 by Troy Sobotka, add API in OCIO for luminance
calculation.

4 years agoKick particle systems to force redistribution, needed for reliably
Lukas Tönne [Tue, 17 Mar 2015 10:04:44 +0000 (11:04 +0100)]
Kick particle systems to force redistribution, needed for reliably
applying recent jitter fix.

4 years agoFix T44020: Crash exporting fluid sim to fbx
Sergey Sharybin [Tue, 17 Mar 2015 07:59:44 +0000 (12:59 +0500)]
Fix T44020: Crash exporting fluid sim to fbx

The issue is coming from wrong fluid modifier copy callback,
which might have left some pointers shared across original
and target fluid modifiers.

4 years agoFix T44021: Crash switching Rendering Engines while viewport rendering + animating
Sergey Sharybin [Tue, 17 Mar 2015 07:02:10 +0000 (12:02 +0500)]
Fix T44021: Crash switching Rendering Engines while viewport rendering + animating

Make sure preview render job is cancelled before freeing the render engine
associated to the viewport.

4 years agocleanup: Mac #include
Mike Erwin [Tue, 17 Mar 2015 05:18:52 +0000 (01:18 -0400)]
cleanup: Mac #include

Don’t need all of Cocoa, or any of Carbon here.

4 years agoCleanup: bool & const
Mike Erwin [Tue, 17 Mar 2015 02:57:56 +0000 (22:57 -0400)]
Cleanup: bool & const

Using bool when we're asking yes/no questions such as whether some GPU
feature is supported.

Consolidated these simple functions into gpu_extensions.c and grouped
them in the header.

Const-ified some args where the functions don't modify the pointed-to
data.

4 years agoI18n: update for new akward algo names in UI messages...
Bastien Montagne [Mon, 16 Mar 2015 19:51:02 +0000 (20:51 +0100)]
I18n: update for new akward algo names in UI messages...

4 years agoreverting unintentionally changed value of enum OBJ_TEXT
Gaia Clary [Mon, 16 Mar 2015 17:58:58 +0000 (18:58 +0100)]
reverting unintentionally changed value of enum OBJ_TEXT

4 years agofix D1130 renamed the enum OBJ_FONT to OBJ_TEXT to avoid naming conflicts in Windows
Gaia Clary [Mon, 16 Mar 2015 17:46:40 +0000 (18:46 +0100)]
fix D1130 renamed the enum OBJ_FONT to OBJ_TEXT to avoid naming conflicts in Windows

4 years agoGet rid og gluBuild2DMipmaps on game engine.
Antony Riakiotakis [Mon, 16 Mar 2015 15:18:37 +0000 (16:18 +0100)]
Get rid og gluBuild2DMipmaps on game engine.

4 years agoGet rid of gluBuild2DMipmaps on rna API.
Antony Riakiotakis [Mon, 16 Mar 2015 15:07:21 +0000 (16:07 +0100)]
Get rid of gluBuild2DMipmaps on rna API.

Code here is a bit weird/simpler than GPU_draw, but we can reuse the API
here, albeit with a few restrictions (no high resolution, custom
filtering mode - which will probably get lost next time blender reloads
textures)

4 years agoGet rid of gluBuild2DMipmaps on gpu_draw.c (use our own imbuf scaling
Antony Riakiotakis [Mon, 16 Mar 2015 14:45:34 +0000 (15:45 +0100)]
Get rid of gluBuild2DMipmaps on gpu_draw.c (use our own imbuf scaling
functions instead)

4 years agoMake sure disabling attribute arrays also resets the counter so we don't
Antony Riakiotakis [Mon, 16 Mar 2015 11:14:13 +0000 (12:14 +0100)]
Make sure disabling attribute arrays also resets the counter so we don't
do it twice.

4 years agoFix T43853: Audio animation bug (fcurves)
Jörg Müller [Mon, 16 Mar 2015 10:02:04 +0000 (23:02 +1300)]
Fix T43853: Audio animation bug (fcurves)

For a detailed bug explanation see the comments in the report.

4 years agoCode cleanup: Comment
Sergey Sharybin [Mon, 16 Mar 2015 09:52:36 +0000 (14:52 +0500)]
Code cleanup: Comment

4 years agoFix an incorrect assert in lnor code.
Bastien Montagne [Mon, 16 Mar 2015 09:37:26 +0000 (10:37 +0100)]
Fix an incorrect assert in lnor code.

There is one case where we do can have only two edges for two loops...

4 years agoFix T43178: BGE has hard-coded 60 Hz as frame rate
Sybren A. Stüvel [Mon, 16 Mar 2015 09:12:29 +0000 (10:12 +0100)]
Fix T43178: BGE has hard-coded 60 Hz as frame rate

Two areas of the BGE use a hard-coded 60 Hz as frame rate. However, this 60 Hz is just a default setting, and can be changed in the Blender interface.
This setting is now used instead of the hard-coded 60 Hz.

CcdPhysicsEnvironment::SetFixedTimeStep() is actually never called, as we don't even support a true fixed-timestep simulation.

4 years agoRefer to Task 43975: Deleting a Shapekey can break the relative pointers
Gaia Clary [Thu, 12 Mar 2015 13:21:41 +0000 (14:21 +0100)]
Refer to Task 43975: Deleting a Shapekey can break the relative pointers

This patch would reassign the relative of all keyblocks to the relative
of the deleted keyblock. And it fixes the misalignement of the index values
after the keyblock is deleted.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1176

4 years agoFix T43999: MIS for environment broken after multi-threading commit
Sergey Sharybin [Mon, 16 Mar 2015 08:30:35 +0000 (13:30 +0500)]
Fix T43999: MIS for environment broken after multi-threading commit

Typo in task start row calculation.

4 years agoPyConsole: double-click to select word
Campbell Barton [Mon, 16 Mar 2015 05:01:32 +0000 (16:01 +1100)]
PyConsole: double-click to select word

patch T43641 by @v-disp with own edits

4 years agoCorrect assert
Campbell Barton [Mon, 16 Mar 2015 02:39:27 +0000 (13:39 +1100)]
Correct assert

4 years agoFix T43997: Paste fcurve keeps handle selection
Campbell Barton [Mon, 16 Mar 2015 02:08:26 +0000 (13:08 +1100)]
Fix T43997: Paste fcurve keeps handle selection

4 years agoCleanup
Campbell Barton [Mon, 16 Mar 2015 00:46:20 +0000 (11:46 +1100)]
Cleanup

4 years agoPyAPI: bpy.ops enum error was cut short
Campbell Barton [Sun, 15 Mar 2015 23:16:16 +0000 (10:16 +1100)]
PyAPI: bpy.ops enum error was cut short

4 years agoFix T43976: Edit-mode crash /w (scene/screen.scene) mismatch
Campbell Barton [Sun, 15 Mar 2015 22:57:15 +0000 (09:57 +1100)]
Fix T43976: Edit-mode crash /w (scene/screen.scene) mismatch

4 years agoCleanup: warnings
Campbell Barton [Sun, 15 Mar 2015 22:37:00 +0000 (09:37 +1100)]
Cleanup: warnings

4 years agoUpdate themes for 2.74
Campbell Barton [Sun, 15 Mar 2015 22:27:42 +0000 (09:27 +1100)]
Update themes for 2.74

4 years agoFix T39184: Multisegment bevel profiles should curve in-plane sometimes.
Howard Trickey [Sun, 15 Mar 2015 22:24:36 +0000 (18:24 -0400)]
Fix T39184: Multisegment bevel profiles should curve in-plane sometimes.

When the multisegment profile joins two unbeveled edges, all in the same
plane, users desire that rather than the current behavior of linear
interpolation between those edges, the profile should curve.
This changes behavior to do that.  The old behavior can be obtained
by setting the profile parameter to 0.25, if desired.

4 years agoNodes: Shortcuts for Snap and Snap Element Menu
Julian Eisel [Sun, 15 Mar 2015 21:35:26 +0000 (22:35 +0100)]
Nodes: Shortcuts for Snap and Snap Element Menu

Added Shift + Tab for Snap and Ctrl + Shift + Tab for Snap Element Menu (consistent to
3D View)

NOTE: Exit Group is now Ctrl + Tab instead of Shift + Tab

4 years agoFix T44003: Flatty Light: GPencil vertices and timeline keyframes black
Julian Eisel [Sun, 15 Mar 2015 21:13:05 +0000 (22:13 +0100)]
Fix T44003: Flatty Light: GPencil vertices and timeline keyframes black

I noticed our version code and subversion got out of sync in the past, maybe
that's what the issue was here.
Deleting the entries from the .xml makes it fall back to the default values.

4 years agoBGE - new read-only attribute in KX_GameObject python api (LOD level)
Pierluigi Grassi [Sun, 15 Mar 2015 16:26:11 +0000 (17:26 +0100)]
BGE - new read-only attribute in KX_GameObject python api (LOD level)

Added a new "current_lod_level" property to the python api of
KX_GameObject. The property returns the current lod level of the game
object. The purpose of the property is activate logic routines only when
an object is at a certain lod-distance from the camera, avoiding to
separately recomputing the same distance in the logic script. Usage in
python script might look like:

owner = bge.logic.getCurrentController().owner
lod_level = owner.currentLodLevel
if lod_level == 0: ...do something
else: ... object might be too distant

Reviewers: dfelinto, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D978

4 years agoBGE: Fix for T43994 Steering actuator bug with Navmesh
Jorge Bernal [Sun, 15 Mar 2015 10:38:04 +0000 (11:38 +0100)]
BGE: Fix for T43994 Steering actuator bug with Navmesh

Now the facing option is taken into account as before

This is a regression and to be ported to the final release branch.

4 years agoBGE : Fix for T43724 and T41599 addObject() with KX_FontObject and
Porteries Tristan [Sun, 15 Mar 2015 09:36:55 +0000 (10:36 +0100)]
BGE : Fix for T43724 and T41599 addObject() with KX_FontObject and
overlay scene

GetGameObjectType is overwritten in KX_FontObject to differentiate a
font object into AddNodeReplicaObject function. Now, in this function,
we add fonts in the appropriate list.

Reviewers: campbellbarton, moguri, dfelinto, lordloki

Reviewed By: lordloki

Subscribers: lordloki

Projects: #game_logic, #game_engine

Differential Revision: https://developer.blender.org/D1130

4 years agoCleanup: style
Campbell Barton [Sat, 14 Mar 2015 01:10:09 +0000 (12:10 +1100)]
Cleanup: style

4 years agoBGE: Fix for T43788 Light casts shadow when use_shadow unchecked
Jorge Bernal [Fri, 13 Mar 2015 22:46:07 +0000 (23:46 +0100)]
BGE: Fix for T43788 Light casts shadow when use_shadow unchecked

Makes use_shadow usage consistent across supported lamp types (Spot and
Sun)

Differential D1148

Reviewers: Moguri, Brecht

4 years agoRNA: avoid inefficient array printing
Campbell Barton [Fri, 13 Mar 2015 12:48:45 +0000 (23:48 +1100)]
RNA: avoid inefficient array printing

4 years agoAdd argument to DM_to_mesh() function to take ownership over the DM
Sergey Sharybin [Wed, 18 Feb 2015 19:00:23 +0000 (00:00 +0500)]
Add argument to DM_to_mesh() function to take ownership over the DM

The idea is pretty simple: instead of making temporary copy of all the
related custom data layers just pass the ownership from the DM to the
mesh.

This is really handy in cases when you've got DM which you need to
convert to Mesh datablock and wouldn't need that DM after conversion
anyway.

Foe example, render database conversion, exporters and even Modifier
Apply will benefit from this option.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1127

4 years agoAdd an option to mesh.calc_tessface() to get rid of polygons and loops
Sergey Sharybin [Wed, 18 Feb 2015 17:47:23 +0000 (22:47 +0500)]
Add an option to mesh.calc_tessface() to get rid of polygons and loops

The purpose of this change is to add extra possibility to render engines and
export scripts to reduce peak memory footprint during their operation.

This new argument should be used with care since it'll leave mesh in not really
compatible with blender format, but it's ok to be used on temp meshes.

Unfortunately, it's hard to get scene where it'll show huge benefit because
in my tests with cycles peak memory is reached in MEM_printmemlist_stats().

However, in the file with sintel dragon it gives around 1gig of memory benefit
after removing the polys which would allow other heavy to compute stuff such as
hair (or even pointiness calculation) to not be a peak memory usage.

In any case, this change is nice to have IMO, and only means more parts of
scene export code should be optimized memory-wise.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1125

4 years agoCycles: Free caches used by the synchronized objects
Sergey Sharybin [Tue, 17 Feb 2015 12:27:15 +0000 (17:27 +0500)]
Cycles: Free caches used by the synchronized objects

Issue this commit is addressed to is that particle system and particle modifier
will contain caches once derived mesh was requested and this cached data will
never be freed.

This could easily lead to unwanted memory peaks during synchronization stage
of rendering.

The idea is to have RNA function in object which would free caches which can't
be freed otherwise. This function is not intended to deal with derived final
since it might be used by other objects (for example by object with boolean
modifier).

This cache freeing is only happening in the background rendering and locked
interface rendering.

From quick tests with victor file this change reduces peak memory usage by
command line rendering by around 6% (1780MB vs. 1883MB). For rendering from
the interface it's about 12% (1763MB vs. 1998MB).

Reviewers: campbellbarton, lukastoenne

Differential Revision: https://developer.blender.org/D1121

4 years agoFix T43959 jittering in 2D texture painting.
Antony Riakiotakis [Fri, 13 Mar 2015 12:09:52 +0000 (13:09 +0100)]
Fix T43959 jittering in 2D texture painting.

This is still not perfect,
but should work smoother now. Previously there was visible wobbling
while painting.

This can be included in final release.

4 years agoFix unstable particle jittered distribution.
Lukas Tönne [Fri, 13 Mar 2015 12:06:40 +0000 (13:06 +0100)]
Fix unstable particle jittered distribution.

This was never working for threaded distribution.

4 years agoInitial compilation support with C++11 featureset enabled
Sergey Sharybin [Mon, 9 Feb 2015 17:23:21 +0000 (22:23 +0500)]
Initial compilation support with C++11 featureset enabled

This commit makes some preliminary fixes and tweaks aimed to make blender
compilable with C++11 feature set. This includes:

- Build system attribute to enable C++11 featureset.

  It's for sure default OFF, but easy to enable to have a play around with
  it and make sure all the stuff is compilable before we go C++11 for real.

- Changes in Compositor to use non-named cl_int structure fields.

  This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL
  does not use named fields in this case.

- Changes to TYPE_CHECK() related on lack of typeof() in C++11

  This uses decltype() instead with some trickery to make sure returned type
  is not a reference.

- Changes for auto_ptr in Freestyle

  This actually conditionally switches between auto_ptr and unique_ptr since
  auto_ptr is deprecated in C++11. Seems to be not strictly needed but still
  nice to be ready for such an update anyway/

This all based on changes form depsgraph_refactor branch apart from the weird
changes which were made in order to support MinGW compilation. Those parts of
change would need to be carefully reviewed again after official move to gcc49
in MinGW.

Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and
likely needs some more tweaks.

Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3

Differential Revision: https://developer.blender.org/D1089

4 years agoerror in last commit
Campbell Barton [Fri, 13 Mar 2015 11:46:15 +0000 (22:46 +1100)]
error in last commit

4 years agoCMake: unbundle LZO library
Campbell Barton [Fri, 13 Mar 2015 11:33:31 +0000 (22:33 +1100)]
CMake: unbundle LZO library

Patch T41989 by @hasufell

4 years agoCycles: Optimization for CMJ in CUDA kernels
Sergey Sharybin [Fri, 13 Mar 2015 07:14:43 +0000 (12:14 +0500)]
Cycles: Optimization for CMJ in CUDA kernels

Two things:
- Use intrinsics for clz/ctz (ctz is implemented via ffs()).
- Use faster sqrt() function which precision is enough for
  integer values.

4 years agoPass proper bmain to the updateDepgraph() of modifiers
Sergey Sharybin [Fri, 13 Mar 2015 06:48:04 +0000 (11:48 +0500)]
Pass proper bmain to the updateDepgraph() of modifiers

This is mainly to make physics modifiers being able to work
with it. For other cases this main is not needed.

4 years agoFix T43803: Crash playing smoke animation, when linked as group instance
Sergey Sharybin [Tue, 10 Mar 2015 11:51:29 +0000 (16:51 +0500)]
Fix T43803: Crash playing smoke animation, when linked as group instance

The issue was caused by missing relations between smoke domain and flow/source
objects. This happened because smoke's modifier only iterated base objects and
ignored cases when flow/source could be linked to scene via dupli-group and
does not have real base.

The same seems to be still needed for fluid and dynamic paint modifiers,
will do it as a separate commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1172

4 years agoBGE: Fix for T43980 MouseLook (actuator) triggers MouseMovement (sensor)
Jorge Bernal [Thu, 12 Mar 2015 23:48:28 +0000 (00:48 +0100)]
BGE: Fix for T43980 MouseLook (actuator) triggers MouseMovement (sensor)
on other objects permanently

only trigger mouse event when it is necessary, this way we avoid
conflicts with other mouse sensors.

4 years agoCycles: Simplify volume light connect code.
Thomas Dinges [Thu, 12 Mar 2015 23:09:13 +0000 (00:09 +0100)]
Cycles: Simplify volume light connect code.

4 years agoCleanup: Use differential helper class.
Thomas Dinges [Thu, 12 Mar 2015 22:35:01 +0000 (23:35 +0100)]
Cleanup: Use differential helper class.

4 years agoBGE: Fix for T43793 Increment frame_start/end value to 255 frames
Jorge Bernal [Thu, 12 Mar 2015 21:07:35 +0000 (22:07 +0100)]
BGE: Fix for T43793 Increment frame_start/end value to 255 frames

Currently, for animated textures we were allowing 16x16 tiles but we can reproduce 128 frames only.

Reviewers: moguri, sergey, campbellbarton

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1164

4 years agoView3D: Quad-view opposite axis switching
Campbell Barton [Thu, 12 Mar 2015 17:45:40 +0000 (04:45 +1100)]
View3D: Quad-view opposite axis switching

Pressing Numpad9 now orbits to the opposite side in any viewport,
with the advantage that it can switch locked-quadview axis to their opposite side.

4 years agoCleanup: remove unused viewnumpad code
Campbell Barton [Thu, 12 Mar 2015 16:40:58 +0000 (03:40 +1100)]
Cleanup: remove unused viewnumpad code

4 years agoD1171: Use GHash for BHead idname lookups
Campbell Barton [Tue, 10 Mar 2015 13:33:44 +0000 (00:33 +1100)]
D1171: Use GHash for BHead idname lookups

This patch avoids looping over bhead's linked list when looking up values by name.

Used during appaned and library loading.
Gives noticeable overall speedup loading files that used libraries. (nearly 2x on some Mango files)

4 years agoCleanup: use realloc for entry-array-resizing
Campbell Barton [Thu, 12 Mar 2015 14:54:38 +0000 (01:54 +1100)]
Cleanup: use realloc for entry-array-resizing

4 years agoCleanup: refactor header lookups into functions
Campbell Barton [Tue, 10 Mar 2015 13:05:14 +0000 (00:05 +1100)]
Cleanup: refactor header lookups into functions

4 years agoCleanup: use POINTER_OFFSET macro
Campbell Barton [Tue, 10 Mar 2015 12:40:39 +0000 (23:40 +1100)]
Cleanup: use POINTER_OFFSET macro

4 years agoReadme: tweaks to make it less hassle to edit
Campbell Barton [Thu, 12 Mar 2015 13:32:10 +0000 (00:32 +1100)]
Readme: tweaks to make it less hassle to edit

also remove "this is the Nth release" text, not so helpful and easy to forget to update.

4 years agoRevert "Fix T43865: Cycles: Watertight rendering produces artifacts on a huge plane"
Sergey Sharybin [Thu, 12 Mar 2015 12:51:01 +0000 (17:51 +0500)]
Revert "Fix T43865: Cycles: Watertight rendering produces artifacts on a huge plane"

The fix was really flacky, in terms during speed benchmarks i had
abort() in the fallback block to be sure it never runs in production
scenes, but that affected on the optimization as well. Without this
abort there's quite bad slowdown of 5-7% on the renders even tho
the Pleucker fallback was never run.

This is all weird and for now reverting the change which affects on
all the production scenes and will look into alternative fixes for
the original issue with precision loss on huge planes.

This reverts commit 9489205c5c0b9b432d02be4a3d0d15fc62ee6cb9.

4 years agoFix T43974: Alpha output of movie clip node crashes blender
Sergey Sharybin [Thu, 12 Mar 2015 12:13:38 +0000 (17:13 +0500)]
Fix T43974: Alpha output of movie clip node crashes blender

Issue was caused by a bug in the memory optimization commit,
should be backported to the final release branch.

4 years agoPartial fix for T43967: Background is wrong in 2.74
Sergey Sharybin [Thu, 12 Mar 2015 10:11:18 +0000 (15:11 +0500)]
Partial fix for T43967: Background is wrong in 2.74

Was missing do-versions code after rotation order change in Cycles.

This is a regression and to be ported to the final release branch.

4 years agoCleanup: style
Campbell Barton [Thu, 12 Mar 2015 13:07:26 +0000 (00:07 +1100)]
Cleanup: style

4 years agomakesrna: move extern prototypes into own header
Campbell Barton [Thu, 12 Mar 2015 13:03:01 +0000 (00:03 +1100)]
makesrna: move extern prototypes into own header

Patch T36049 by @jeske

4 years agoOpenEXR 2.2 add support for Dreamworks DWAA / DWAB compression
Martijn Berger [Thu, 12 Mar 2015 13:02:33 +0000 (14:02 +0100)]
OpenEXR 2.2 add support for Dreamworks DWAA / DWAB compression

This patch makes it possible for the user to select all supported compression types in OpenEXR 2.2

Discussion points:
 - B44 is only defined for half's it compresses to a fixed representation of 44% of the halfs. We do currently not reflect in the UI that in the case of float32's it will be equal to compression = NONE
 - ZIPS is single scanline zip and is supposed to be useful in cases where importing in Nuke happens.
 - The new Dreamworks formats, are the worth exposing etc etc

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1050

4 years agoRemove version from readme, (replace on install)
Campbell Barton [Thu, 12 Mar 2015 11:14:48 +0000 (22:14 +1100)]
Remove version from readme, (replace on install)