3 years agoFix debug mode assert in subd code after recent refactoring.
Brecht Van Lommel [Sun, 29 May 2016 09:16:27 +0000 (11:16 +0200)]
Fix debug mode assert in subd code after recent refactoring.

3 years agoBKE's DerivedMesh: get rid of last OMP usage.
Bastien Montagne [Sun, 29 May 2016 18:14:42 +0000 (20:14 +0200)]
BKE's DerivedMesh: get rid of last OMP usage.

Not replacing with some BLI_task_stuff here, tests show this is pointless
(in absolute best case - i.e. single huge mesh in scene - parallelizing here switches
from 0.8ms to 0.5ms for that piece of code - with something like 750ms per frame update...).

3 years agoFix T48507: Symmetrize doesn't work properly on Bendy Bones
Joshua Leung [Sun, 29 May 2016 07:37:40 +0000 (19:37 +1200)]
Fix T48507: Symmetrize doesn't work properly on Bendy Bones

3 years agoFix: Flip logic order for autokeying checking to cope with files where the flags...
Joshua Leung [Sun, 29 May 2016 07:07:50 +0000 (19:07 +1200)]
Fix: Flip logic order for autokeying checking to cope with files where the flags have been set incorrectly

Sometimes the autokeying flags don't get set correctly (i.e. the "mode" flags
used for 'Add + Replace' vs 'Replace Only' aren't set), meaning that the old logic
would always fall through to the "replace only" case. When this happens, the resulting
behaviour can be quite strange and hard to debug. This fix prevents problems like
this from continuing to be an issue...

3 years agoadded missing include
Gaia Clary [Sat, 28 May 2016 23:38:14 +0000 (01:38 +0200)]
added missing include

3 years agofixed some incompatible definitions (to make this work also on linux)
Gaia Clary [Sat, 28 May 2016 23:30:20 +0000 (01:30 +0200)]
fixed some incompatible definitions (to make this work also on linux)

3 years agoAdded support for non numeric bone layer labels (could happen when importing from...
Gaia Clary [Sat, 28 May 2016 22:35:50 +0000 (00:35 +0200)]
Added support for non numeric bone layer labels (could happen when importing from other tools)

Differential Revision:

3 years agocollada exporter: fixed wrong check for bone roll value
Gaia Clary [Sat, 28 May 2016 18:52:10 +0000 (20:52 +0200)]
collada exporter: fixed wrong check for bone roll value

3 years agoFix T48529: NLA : viewport not updated after Track muted/unmuted.
Bastien Montagne [Sat, 28 May 2016 17:50:05 +0000 (19:50 +0200)]
Fix T48529: NLA : viewport not updated after Track muted/unmuted.

Not sure why, but ANIM_animdata_update() totally ignored NLAStrip type of bAnimListElem.

For now only added support for ANIM_UPDATE_DEPS type of update, don't know whether
others are needed in this case or not... time will say.

3 years agoCollada: Adding support for bone roll and bone layers
Gaia Clary [Sat, 28 May 2016 16:41:54 +0000 (18:41 +0200)]
Collada: Adding support for bone roll and bone layers

Differential Revision:

3 years agoCode refactor: nodify object and mesh, but not used for XML yet.
Brecht Van Lommel [Sat, 7 May 2016 19:44:17 +0000 (21:44 +0200)]
Code refactor: nodify object and mesh, but not used for XML yet.

Differential Revision:

3 years agoCode refactor: modify mesh storage to use arrays rather than vectors, separate some...
Brecht Van Lommel [Sat, 7 May 2016 22:09:08 +0000 (00:09 +0200)]
Code refactor: modify mesh storage to use arrays rather than vectors, separate some arrays.

Differential Revision:

3 years agoCode refactor: make ShaderNode match Node a bit more, reusing types and enums.
Brecht Van Lommel [Sat, 7 May 2016 23:32:09 +0000 (01:32 +0200)]
Code refactor: make ShaderNode match Node a bit more, reusing types and enums.

Differential Revision:

3 years agoPyRNA: Fix repr used /w arrays
Campbell Barton [Sat, 28 May 2016 12:23:39 +0000 (22:23 +1000)]
PyRNA: Fix repr used /w arrays

RNA arrays now display their index, with support for multi-dimensional arrays.

3 years agoCode refactor: nodify Cycles camera and fix some mistakes in XML node read.
Brecht Van Lommel [Sat, 7 May 2016 22:28:21 +0000 (00:28 +0200)]
Code refactor: nodify Cycles camera and fix some mistakes in XML node read.

Differential Revision:

3 years agoFix T48534: color picker hex #RRGGBB input allows typing one character too many.
Brecht Van Lommel [Sat, 28 May 2016 10:36:52 +0000 (12:36 +0200)]
Fix T48534: color picker hex #RRGGBB input allows typing one character too many.

Fix suggested by Daniel Rivera.

3 years agoFix T48498: stereo camera interocular distance should not have a hard max limit.
Brecht Van Lommel [Sat, 28 May 2016 10:21:59 +0000 (12:21 +0200)]
Fix T48498: stereo camera interocular distance should not have a hard max limit.

3 years agoFix T48526: Cycles viewport render incorrectly influenced by pixel aspect ratio.
Brecht Van Lommel [Sat, 28 May 2016 09:54:08 +0000 (11:54 +0200)]
Fix T48526: Cycles viewport render incorrectly influenced by pixel aspect ratio.

This reverts 72592cfb, needs more refactoring to do that cleanup.

3 years agoFix T48533: camera node view vector wrong for Cycles GLSL.
Ralf Hölzemer [Sat, 28 May 2016 09:34:08 +0000 (11:34 +0200)]
Fix T48533: camera node view vector wrong for Cycles GLSL.

Reviewed By: brecht

Differential Revision:

3 years agoAdd missing include
Campbell Barton [Sat, 28 May 2016 00:25:46 +0000 (10:25 +1000)]
Add missing include

3 years agoCleanup: Further tweaks for consistency and simplifications.
Thomas Dinges [Fri, 27 May 2016 21:35:29 +0000 (23:35 +0200)]
Cleanup: Further tweaks for consistency and simplifications.

Now I can start adding half float without adding even bigger mess to all these functions. ;)

3 years agoCleanup: Simplify and de-duplicate assignements in the ImageManager constructor.
Thomas Dinges [Fri, 27 May 2016 21:12:13 +0000 (23:12 +0200)]
Cleanup: Simplify and de-duplicate assignements in the ImageManager constructor.

3 years agoCleanup: Shorten texture variables, tex and image was kinda redundant.
Thomas Dinges [Fri, 27 May 2016 20:58:33 +0000 (22:58 +0200)]
Cleanup: Shorten texture variables, tex and image was kinda redundant.

Also make prefix consistent, so it starts with either TEX_NUM or TEX_START, followed by texture type and architecture.

3 years agondof: detect SpaceMouse Enterprise
Mike Erwin [Fri, 27 May 2016 19:34:40 +0000 (15:34 -0400)]
ndof: detect SpaceMouse Enterprise

New device! Lots of buttons!

3 years agoDepsgraph: Accidentally removed one line too much
Sergey Sharybin [Fri, 27 May 2016 16:30:01 +0000 (18:30 +0200)]
Depsgraph: Accidentally removed one line too much

3 years agoDepsgraph: Cleanup and code simplification
Sergey Sharybin [Fri, 27 May 2016 16:01:18 +0000 (18:01 +0200)]
Depsgraph: Cleanup and code simplification

This is mainly a maintenance commit which was aimed to make work with
this module more pleasant and solve such issues as:

- Annoyance with looong files, which had craftload in them
- Usage of STL for the data structures we've got in BLI
- Possible symbol conflicts
- Not real clear layout of what is located where

So in this commit the following changes are done:

- STL is prohibited, it's not really predictable on various compilers,
  with our BLI algorithms we can predict things much better.

  There are still few usages of std::vector, but that we'll be
  solving later once we've got similar thing in BLI.

- Simplify foreach loops, avoid using const_iterator all over the place.

- New directory layout, which is hopefully easier to follow.

- Some files were split, some of them will be split soon.

  The idea of this is to split huge functions into own files with
  good documentation and everything.

- Removed stuff which was planned for use in the future but was never
  finished, tested or anything.

  Let's wipe it out for now, and bring back once we really start using
  it, so it'll be more clear if it solves our needs.

- All the internal routines were moved to DEG namespace to separate
  them better from rest of blender.

  Some places now annoyingly using DEG::foo, but that we can olve by
  moving some utility functions inside of the namespace.

While working on this we've found some hotspot in updates flush, so
now playback of blenrig is few percent faster (something like 96fps
with previous master and around 99-100fps after this change).

Not saying it's something final, there is still room for cleanup and
API simplification, but those might happen as a regular development
now without doing any global changes.

3 years agomore correct Normal Map node behavior for tangent mapping in Cycles Viewport
Alexander Romanov [Fri, 27 May 2016 11:25:39 +0000 (14:25 +0300)]
more correct Normal Map node behavior for tangent mapping in Cycles Viewport

3 years agoAdd upstream information to libraries
Campbell Barton [Fri, 27 May 2016 10:03:27 +0000 (20:03 +1000)]
Add upstream information to libraries

3 years agoCycles: Simplify code around debug stats in BVH traversing
Sergey Sharybin [Fri, 27 May 2016 08:55:48 +0000 (10:55 +0200)]
Cycles: Simplify code around debug stats in BVH traversing

3 years agoAdd some more information about extern libraries
Sergey Sharybin [Fri, 27 May 2016 07:27:44 +0000 (09:27 +0200)]
Add some more information about extern libraries

3 years agoOpenGL: use EXT version of FBOs
Mike Erwin [Fri, 27 May 2016 04:19:32 +0000 (00:19 -0400)]
OpenGL: use EXT version of FBOs

Blender 2.7x supports OpenGL 2.1 which has FBO only as an extension.

It was working fine, but this is more correct.

3 years agofixed collada api call for blenderplayer
Gaia Clary [Thu, 26 May 2016 17:16:18 +0000 (19:16 +0200)]
fixed collada api call for blenderplayer

3 years agomoved is_leaf_bone() to collada utils for reuse in exporter and importer
Gaia Clary [Thu, 26 May 2016 16:22:36 +0000 (18:22 +0200)]
moved is_leaf_bone() to collada utils for reuse in exporter and importer

3 years agofix: Import of meshes with holes is now reported as WARNING (unsupported)
Gaia Clary [Thu, 26 May 2016 15:40:56 +0000 (17:40 +0200)]
fix: Import of meshes with holes is now reported as WARNING (unsupported)
improved: add support for bone tail export/import using Blender Collada profile

Differential Revision:

3 years agofix: Import of meshes with holes is now reported as WARNING (unsupported)
Gaia Clary [Thu, 12 May 2016 15:55:41 +0000 (17:55 +0200)]
fix: Import of meshes with holes is now reported as WARNING (unsupported)

3 years agoImage viewer scopes update: OMP->BLI_task.
Bastien Montagne [Thu, 26 May 2016 12:30:14 +0000 (14:30 +0200)]
Image viewer scopes update: OMP->BLI_task.

Gives over 50% faster scope update (from 4.5ms to 2.2ms here with SD shot)!
Probably mostly due to more clever usage of thread-local data (which avoids any lock,
when OMP code had a rather stupid critical section for minmax)...

3 years agoCorrect invalid pointer-pair compare check
Campbell Barton [Thu, 26 May 2016 12:20:12 +0000 (22:20 +1000)]
Correct invalid pointer-pair compare check

3 years agoCleanup: glsl style
Campbell Barton [Thu, 26 May 2016 08:46:12 +0000 (18:46 +1000)]
Cleanup: glsl style

3 years agoBMesh: don't alloc zero sized select elem array
Campbell Barton [Thu, 26 May 2016 05:55:09 +0000 (15:55 +1000)]
BMesh: don't alloc zero sized select elem array

3 years agoFix T48514: Cycles toon glossy BSDF not respecting reflective caustics option.
Brecht Van Lommel [Wed, 25 May 2016 19:10:36 +0000 (21:10 +0200)]
Fix T48514: Cycles toon glossy BSDF not respecting reflective caustics option.

3 years agoCycles CUDA: reduce branched path stack memory by sharing indirect ShaderData.
Brecht Van Lommel [Tue, 24 May 2016 20:28:03 +0000 (22:28 +0200)]
Cycles CUDA: reduce branched path stack memory by sharing indirect ShaderData.

Saves about 15% for the branched path kernel.

3 years agoFix T47257: bevel crash when there are internal faces.
Howard Trickey [Wed, 25 May 2016 12:48:46 +0000 (08:48 -0400)]
Fix T47257: bevel crash when there are internal faces.

Bevel had assumed that when rebuilding a face that touches
a vertex with beveled edges, the edges of the face at that vertex
would be adjacent in internal order. That is not necessarily true
if there are edges with more than two faces attached.
We could just prohibit beveling any edges that touch a vertex
where this happens (we already don't bevel non-manifold edges)
but the use case in the model of T47257 seems reasonable.
Also had to fix the edge-ordering code, and the face reconstruction
code to take care of cases where the face normal may not be as expected.

3 years agodd upstream information to libraries
Campbell Barton [Wed, 25 May 2016 12:26:57 +0000 (22:26 +1000)]
dd upstream information to libraries

3 years agoDepsgraph: Simplify some loops using foreach()
Sergey Sharybin [Wed, 25 May 2016 11:51:35 +0000 (13:51 +0200)]
Depsgraph: Simplify some loops using foreach()

3 years agoAdd warning to Mesh.from_pydata
Campbell Barton [Wed, 25 May 2016 11:34:48 +0000 (21:34 +1000)]
Add warning to Mesh.from_pydata

3 years agoDepsgraph: Solve wrong datamask calculated by depsgraph
Sergey Sharybin [Wed, 25 May 2016 11:00:30 +0000 (13:00 +0200)]
Depsgraph: Solve wrong datamask calculated by depsgraph

This is a weak concept, but nice t support it for now, so we can enable
new depsgraph by default earlier.

3 years agoCycles: Yet another fix for textures limit
Sergey Sharybin [Wed, 25 May 2016 10:48:40 +0000 (12:48 +0200)]
Cycles: Yet another fix for textures limit

3 years agoMove editmesh undo into its own file
Campbell Barton [Wed, 25 May 2016 09:12:43 +0000 (19:12 +1000)]
Move editmesh undo into its own file

3 years agoCycles: Fix wrong cuda textures limits
Sergey Sharybin [Tue, 24 May 2016 15:02:19 +0000 (17:02 +0200)]
Cycles: Fix wrong cuda textures limits

3 years agoCycles: Fix wrong render results when using multiple OpenCL devices
Sergey Sharybin [Tue, 24 May 2016 14:57:13 +0000 (16:57 +0200)]
Cycles: Fix wrong render results when using multiple OpenCL devices

3 years agoFix own mistake in D1120: wrong indexing of UV maps during tangent calculation
Alexander Romanov [Tue, 24 May 2016 14:43:57 +0000 (17:43 +0300)]
Fix own mistake in D1120: wrong indexing of UV maps during tangent calculation

3 years agoFix T48508: Cycles Regression / Crash
Sergey Sharybin [Tue, 24 May 2016 12:53:34 +0000 (14:53 +0200)]
Fix T48508: Cycles Regression / Crash

3 years agoFix T48496: Viewer function in NodeWrangler addon don't work in Material Shading...
Sergey Sharybin [Tue, 24 May 2016 12:39:28 +0000 (14:39 +0200)]
Fix T48496: Viewer function in NodeWrangler addon don't work in Material Shading mode

3 years agoCleanup: indentation
Campbell Barton [Tue, 24 May 2016 10:29:59 +0000 (20:29 +1000)]
Cleanup: indentation

3 years agoFix T48486: Not enough precision in Volume Sampling Step Size input
Sergey Sharybin [Tue, 24 May 2016 10:16:16 +0000 (12:16 +0200)]
Fix T48486: Not enough precision in Volume Sampling Step Size input

Volumes might be small, makes sense to use more precision here.

3 years agoGHOST cleanup (null check before delete, and 0 -> NULL for pointers).
Bastien Montagne [Tue, 24 May 2016 09:47:48 +0000 (11:47 +0200)]
GHOST cleanup (null check before delete, and 0 -> NULL for pointers).

Based on patch from Lawrence D'Oliveiro (ldo) in T48499.

3 years agoForgot this in previous commit
Sergey Sharybin [Tue, 24 May 2016 09:48:19 +0000 (11:48 +0200)]
Forgot this in previous commit

3 years agoAdd upstream information to libraries
Sergey Sharybin [Tue, 24 May 2016 09:46:53 +0000 (11:46 +0200)]
Add upstream information to libraries

3 years agoSequencer's histogram view: OMP -> BLI_task.
Bastien Montagne [Mon, 23 May 2016 21:23:51 +0000 (23:23 +0200)]
Sequencer's histogram view: OMP -> BLI_task.

New code using loop/finalize model is about 45% faster (from 4.4ms tp 2.4ms per frame,
overall playback of single shot in sequencer in this preview mode goes from 40 to 45fps).

3 years agondof: build system cleanup
Mike Erwin [Tue, 24 May 2016 05:57:17 +0000 (01:57 -0400)]
ndof: build system cleanup

Only Linux needs a lib linked in (libspnav).

ghostndof3dconnexion refers to an obsolete Mac driver shim.

3 years agondof: enable Linux support by default, unless libs missing
Mike Erwin [Tue, 24 May 2016 04:35:17 +0000 (00:35 -0400)]
ndof: enable Linux support by default, unless libs missing

3 years agoCycles CUDA: reduce stack memory by reusing ShaderData.
Brecht Van Lommel [Sun, 22 May 2016 20:35:47 +0000 (22:35 +0200)]
Cycles CUDA: reduce stack memory by reusing ShaderData.

57% less for path and 48% less for branched path.

3 years agoFix T48487: Physics cache names allow (back)slashes, which breaks its handling.
Bastien Montagne [Mon, 23 May 2016 15:45:44 +0000 (17:45 +0200)]
Fix T48487: Physics cache names allow (back)slashes, which breaks its handling.

For now, just validate new pointcache names as if they were filnames.

Ideal solution would be rather to validate names in `ptcache_filename()`, but it would
likely break some existing caches - and we'd also have to ensure we still have
uniqueness of name after it has been cleaned up, wich would not be trivial at this stage.

So let's go for simple solution for now, especially since this part of code is to be
fully rewritten in 2.8...

3 years agoEnable correct GLSL output for cycles normalmap node
Ralf Hölzemer [Mon, 23 May 2016 13:12:52 +0000 (16:12 +0300)]
Enable correct GLSL output for cycles normalmap node

See T48453 for details and test scenes

Reviewers: a.romanov, sergey

Reviewed By: a.romanov, sergey

Projects: #opengl_gfx, #nodes

Differential Revision:

3 years agoAdd TODO about vertex color linearization to GLSL code
Sergey Sharybin [Mon, 23 May 2016 12:43:03 +0000 (14:43 +0200)]
Add TODO about vertex color linearization to GLSL code

It's not really clear at this moment how we can detect cases
when attribute needs linearization. For now added a comment
so we don't forget about this, hopefully.

3 years agoFix wrong scale of vertex color values when doing border render of Cycles viewport
Sergey Sharybin [Mon, 23 May 2016 12:40:04 +0000 (14:40 +0200)]
Fix wrong scale of vertex color values when doing border render of Cycles viewport

3 years agoFix wrong vertex color in BI GLSL mode
Sergey Sharybin [Mon, 23 May 2016 12:28:47 +0000 (14:28 +0200)]
Fix wrong vertex color in BI GLSL mode

The issue was caused by recent normalization added to the GLSL attributes.

3 years agoCycles: Fix wrong closure counter in feature adaptive kernel
Sergey Sharybin [Mon, 23 May 2016 12:09:27 +0000 (14:09 +0200)]
Cycles: Fix wrong closure counter in feature adaptive kernel

Some closures were missing from calculation, leading to an array
under-allocation, presumable causing memory corruption issues with
emission shaders on OpenCL and was causing issues with Volume 3D
textures with CUDA.

The issue was identified by Thomas Dinges, the patch is different
from the original D2006. See the brief discussion there. Current
approach is similar (or the same) as Brecht suggested.

3 years agoFix T48334: Cycles standalone xml import of uv coordinates
Sergey Sharybin [Mon, 23 May 2016 11:38:15 +0000 (13:38 +0200)]
Fix T48334: Cycles standalone xml import of uv coordinates

In Cycle standalone, the xml import of uv's is done in a way that
a vertex could only have one unique uv coordinate. In practice it
is most of the time not the case.

Patch by Laurent Boiron, thanks!

3 years agoFixed a rare case of NaN in Cycles
Stefan Werner [Mon, 23 May 2016 11:27:46 +0000 (13:27 +0200)]
Fixed a rare case of NaN in Cycles

This fixes a rare case where NaNs could exist inside Cycles.

When certain invalid meshes were passed in, Cycles would try too normalize
a zero length normal during its setup stage. While it does check against
division by zero, it still returns a zero length normal and passes it on to
the path tracing kernel. The kernel then operates under the assumption that
normals are valid, and in the case of such a zero length normal, would
eventually create NaNs that propagate through and result in black pixels.

Reviewers: #cycles

Subscribers: brecht, sergey

Projects: #cycles

Differential Revision:

3 years agoB-Bones improve handle calculation
Campbell Barton [Mon, 23 May 2016 11:32:12 +0000 (21:32 +1000)]
B-Bones improve handle calculation

This changes the bezier handles b-bones to fit to a circle more closely.

3 years agoBLI_math: Add function to calculate circular cubic curve tangents
Campbell Barton [Mon, 23 May 2016 11:31:22 +0000 (21:31 +1000)]
BLI_math: Add function to calculate circular cubic curve tangents

3 years agoCycles: Fix missing feature reported by the Volume node
Sergey Sharybin [Mon, 23 May 2016 10:58:25 +0000 (12:58 +0200)]
Cycles: Fix missing feature reported by the Volume node

3 years agoCycles: Fix missing volumes support for feature-adaptive viewport render
Sergey Sharybin [Mon, 23 May 2016 10:36:31 +0000 (12:36 +0200)]
Cycles: Fix missing volumes support for feature-adaptive viewport render

3 years agoFix for all OpenGL lights affecting Cycles viewport, regardless of their Enabled...
Sergey Sharybin [Mon, 23 May 2016 10:07:00 +0000 (12:07 +0200)]
Fix for all OpenGL lights affecting Cycles viewport, regardless of their Enabled state

Was a regression since e1b8a5d.

Probably not very optimal fix, but better than a regression anyway.

3 years agoCleanup: glsl indentation, line length
Campbell Barton [Mon, 23 May 2016 09:56:50 +0000 (19:56 +1000)]
Cleanup: glsl indentation, line length

3 years agoCode cleanup, stick closer to a blender code style in GLSL shader
Sergey Sharybin [Mon, 23 May 2016 08:31:36 +0000 (10:31 +0200)]
Code cleanup, stick closer to a blender code style in GLSL shader

3 years agoSupport Vertex Color in GLSL viewport for Cycles
Sergey Sharybin [Sun, 22 May 2016 16:24:53 +0000 (18:24 +0200)]
Support Vertex Color in GLSL viewport for Cycles

The title says it all actually.

Added special custom data type, because we don't know in advance
whether we're referencing UV or Color layer. Also made it so vertex
attributes are normalized.

TODO: Border render in viewport ignores the normalization of the
attribute array for some reason, will be looked into still.

Reviewers: mont29, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Differential Revision:

3 years agoCleanup: Deduplicate image loading functions using templates.
Thomas Dinges [Sun, 22 May 2016 21:24:26 +0000 (23:24 +0200)]
Cleanup: Deduplicate image loading functions using templates.

3 years agoCleanup: Use short condition style.
Thomas Dinges [Sun, 22 May 2016 20:47:37 +0000 (22:47 +0200)]
Cleanup: Use short condition style.

3 years agoFix Cycles warning in release builds.
Brecht Van Lommel [Sun, 22 May 2016 17:42:45 +0000 (19:42 +0200)]
Fix Cycles warning in release builds.

3 years agoFix Cycles compile errors with GCC due to double promotion as errors.
Brecht Van Lommel [Sun, 22 May 2016 17:11:26 +0000 (19:11 +0200)]
Fix Cycles compile errors with GCC due to double promotion as errors.

3 years agoSupport Musgrave texture for Cycles GLSL viewport
Sergey Sharybin [Sun, 22 May 2016 17:09:42 +0000 (19:09 +0200)]
Support Musgrave texture for Cycles GLSL viewport

Only for non-OSX viewport!

3 years agoFix T48497: Stupid typo in recent own BLI_task forloop work that broke non-paralleliz...
Bastien Montagne [Sun, 22 May 2016 16:33:04 +0000 (18:33 +0200)]
Fix T48497: Stupid typo in recent own BLI_task forloop work that broke non-parallelized case.

3 years agoCleanup: remove Cycles layer bits checking in the kernel.
Brecht Van Lommel [Sun, 22 May 2016 07:57:36 +0000 (09:57 +0200)]
Cleanup: remove Cycles layer bits checking in the kernel.

At some point the idea was that we could have an optimization where we could
render multiple render layers without re-exporting the scene, by just updating
the layer bits. We are not doing this now and in practice with the available
render layer control like exclude layers it's not always possible anyway.

This makes it easier to support an arbitrary number of layers in the future
(hopefully this summer), and frees up some useful bits in the kernel.

Reviewed By: sergey, dingto

Differential Revision:

3 years agoCode refactor: nodify Cycles shader and lights.
Brecht Van Lommel [Sat, 7 May 2016 22:18:32 +0000 (00:18 +0200)]
Code refactor: nodify Cycles shader and lights.

Differential Revision:

3 years agoCode refactor: nodify Cycles background and film.
Brecht Van Lommel [Sat, 7 May 2016 18:30:16 +0000 (20:30 +0200)]
Code refactor: nodify Cycles background and film.

Differential Revision:

3 years agoCode refactor: nodify Cycles integrator.
Brecht Van Lommel [Sat, 7 May 2016 18:05:21 +0000 (20:05 +0200)]
Code refactor: nodify Cycles integrator.

Differential Revision:

3 years agoCode refactor: add generic Cycles XML node read and write functions.
Brecht Van Lommel [Sat, 7 May 2016 18:43:22 +0000 (20:43 +0200)]
Code refactor: add generic Cycles XML node read and write functions.

Differential Revision:

3 years agoCode refactor: add generic Cycles node infrastructure.
Brecht Van Lommel [Sat, 7 May 2016 17:47:37 +0000 (19:47 +0200)]
Code refactor: add generic Cycles node infrastructure.

Differential Revision:

3 years agoFix missing Ignore option for GLSL bump
Sergey Sharybin [Sun, 22 May 2016 14:47:06 +0000 (16:47 +0200)]
Fix missing Ignore option for GLSL bump

3 years agoUse previous shading mode for border render in viewport
Sergey Sharybin [Sun, 22 May 2016 14:23:26 +0000 (16:23 +0200)]
Use previous shading mode for border render in viewport

This way we can have border rendered part in the viewport and have
everything else material/texture shaded.

3 years agoMake Shift-Z in viewprot a toggle between current shading mode and rendered one
Sergey Sharybin [Sun, 22 May 2016 13:44:18 +0000 (15:44 +0200)]
Make Shift-Z in viewprot a toggle between current shading mode and rendered one

This way it is now possible to toggle between material and rendered shading
while previously rendered viewport will always go back to solid shading.

3 years agoCycles: Support bump mapping in GLSL viewport
Sergey Sharybin [Fri, 20 May 2016 12:16:54 +0000 (14:16 +0200)]
Cycles: Support bump mapping in GLSL viewport

This commit implements Bump node in GLSL, making it possible to
see previews of bump mapping in viewport without need to render.
Nothing really fancy going on here, just uses internal dFdx/dFdy
functions to get derivatives of the surface and map itself.
Quite basic but seems to behave correct-ish.

This commit also makes Displacement material output to affect
viewport shading by re-linking unconnected Normal input to a
node which was used for displacement output (via Bump node).

Intention of all this is to make it really easy to do bump map
painting with Cycles as an active render engine.

Reviewers: campbellbarton, mont29, brecht, psy-fi

Reviewed By: brecht

Subscribers: Blendify, eyecandy

Differential Revision:

3 years agoCMake: Solve compilation error with pre-compiled libraries and new GCC-6
Sergey Sharybin [Sun, 22 May 2016 11:41:55 +0000 (13:41 +0200)]
CMake: Solve compilation error with pre-compiled libraries and new GCC-6

Since version 6 G++ switched to C++11 by default, which breaks some logic
around WITH_CXX11 checks in out CMake files, leading to compilation errors.
This is easy to solve by explicitly enabling older C++ standard when C++11
was not explicitly enabled by CMake options.

However, G++-6 will also use new ABI by default even if older standard was
specified in the compiler options. This is being addressed by a special
define flag.

This tricks made it possible to use new G++-6 without need to recompile
any of pre-compiled libraries.

However, this might break compilation with existing system libraries, which
might already be using new ABI. We can't address this automatically, so
now we simply default WITH_C11 and WITH_CXX11 options to whatever defaults
of the current compiler are. This means, for G++-6 we'll set WITH_CXX11 to
truth. This should make linking with system libraries working just fine,
but to make pre-compiled libraries we still might need to disable CXX11.

This should work fine work for a new environments with G++-6 and install_deps
script run from scratch there, because C++ standard will be the same for
both Blender dependencies and Blender itself.

3 years agoFix T48476: 'Recalculate Bone to Cursor' fails
Campbell Barton [Sun, 22 May 2016 07:47:39 +0000 (17:47 +1000)]
Fix T48476: 'Recalculate Bone to Cursor' fails

3 years agoCleanup: remove unused doxy config
Campbell Barton [Sun, 22 May 2016 07:14:08 +0000 (17:14 +1000)]
Cleanup: remove unused doxy config

3 years agondof: simplify Mac build
Mike Erwin [Sat, 21 May 2016 22:29:55 +0000 (18:29 -0400)]
ndof: simplify Mac build

We don’t require the 3Dconnexion driver framework at build time.

No special link flags or include paths needed.

3 years agoPython API: add material to uniforms from gpu.export_shader.
Sebastian Ullrich [Sat, 21 May 2016 14:13:09 +0000 (16:13 +0200)]
Python API: add material to uniforms from gpu.export_shader.

Reviewed By: brecht

Differential Revision:

3 years agoForgot to remove omp header include...
Bastien Montagne [Sat, 21 May 2016 14:12:30 +0000 (16:12 +0200)]
Forgot to remove omp header include...