5 years agoFix Cycles CUDA adaptive kernel not working correctly after recent closure changes.
Brecht Van Lommel [Mon, 8 Aug 2016 23:00:57 +0000 (01:00 +0200)]
Fix Cycles CUDA adaptive kernel not working correctly after recent closure changes.

5 years agoAlembic: fix finding boost headers for win32
lazydodo [Mon, 8 Aug 2016 22:57:04 +0000 (16:57 -0600)]
Alembic: fix finding boost headers for win32

5 years agoMake previous alembic fix only apply to MSVC
lazydodo [Mon, 8 Aug 2016 20:15:42 +0000 (14:15 -0600)]
Make previous alembic fix only apply to MSVC

5 years agoFix extra ; warning for OpenCL as well.
Thomas Dinges [Mon, 8 Aug 2016 18:00:44 +0000 (20:00 +0200)]
Fix extra ; warning for OpenCL as well.

5 years agoAlembic/ msvc : Link alembic_d.lib instead of alembic.lib when doing debug builds.
lazydodo [Mon, 8 Aug 2016 17:19:41 +0000 (11:19 -0600)]
Alembic/ msvc : Link alembic_d.lib instead of alembic.lib when doing debug builds.

5 years agoFix ID types DAG update tagging.
Kévin Dietrich [Mon, 8 Aug 2016 15:51:15 +0000 (17:51 +0200)]
Fix ID types DAG update tagging.

The first character of the ID type was used to tag IDs for updates which
is weak since different IDs can have the same first character (for
example meshes, materials and metaballs), causing unnecessary updates of
unrelated IDs.

Now we use a unique index per ID type to tag for updates, unifying IDs
arrays indexing along the way.

Reviewers: sergey, mont29

Differential Revision:

5 years agoBGE: Call DNA_sdna_current_init when launching blenderplayer.
Porteries Tristan [Mon, 8 Aug 2016 15:39:34 +0000 (15:39 +0000)]
BGE: Call DNA_sdna_current_init when launching blenderplayer.

Don't calling DNA_sdna_current_init was creating a crash because a global uninitialized
variable was used when reading blender files.

5 years agoCycles: Fix compilation on Cycles unit tests after recent changes
Sergey Sharybin [Mon, 8 Aug 2016 13:09:34 +0000 (15:09 +0200)]
Cycles: Fix compilation on Cycles unit tests after recent changes

5 years agoDisable depth buffer writes while rendering smoke in the viewport.
Alexander Gavrilov [Mon, 8 Aug 2016 10:48:03 +0000 (13:48 +0300)]
Disable depth buffer writes while rendering smoke in the viewport.

Depth buffer values are used by the viewport pan and zoom code to
adjust response scaling factors between mouse and viewport movement.
Letting smoke write to the buffer confuses it and causes the camera
to get stuck and move very slowly inside smoke domains, because it
thinks it is very close to an object.

5 years agoGPencil: Cleanup - Rename function for better naming
Antonioya [Mon, 8 Aug 2016 09:26:00 +0000 (11:26 +0200)]
GPencil: Cleanup - Rename function for better naming

The old function name was not clear enough

5 years agoGPencil: Move polygon to back only if something was drawn
Antonioya [Mon, 8 Aug 2016 09:21:44 +0000 (11:21 +0200)]
GPencil: Move polygon to back only if something was drawn

If the user enable polygon draw and press ESC before drawing something,
the last stroke must not be moved back.

5 years agoCycles: Remove set but unused variable
Sergey Sharybin [Mon, 8 Aug 2016 08:50:23 +0000 (10:50 +0200)]
Cycles: Remove set but unused variable

5 years agoCycles: Quiet warning with WITH_OPENSUBDIV disabled
Julian Eisel [Sun, 7 Aug 2016 21:20:22 +0000 (23:20 +0200)]
Cycles: Quiet warning with WITH_OPENSUBDIV disabled

Checked with @maiself, for now going with this simple solution.

5 years agoCycles: fix objects disappearing when starting or stopping movement.
Alexander Gavrilov [Sun, 7 Aug 2016 19:41:35 +0000 (22:41 +0300)]
Cycles: fix objects disappearing when starting or stopping movement.

Another issue with the modified particle motion blur fix: since
pre and post are used as validity markers, they must be set even
if there is no actual motion, like the original bool flags were.
Otherwise an object starting to move or stopping is interpreted
as having invalid blur data and hidden.

5 years agoFix local view editing broken after changing object's layer from non-local view
Julian Eisel [Sun, 7 Aug 2016 18:46:05 +0000 (20:46 +0200)]
Fix local view editing broken after changing object's layer from non-local view

Wasn't copying back local view bytes to object after changing layer.

Steps to reproduce were:
* Split 3D view in default startup.blend
* Enter local view in one of the 3D views
* Move default cube to different layer *in the other 3D view* (the one that's not in local view)
* Try transforming object from 3D View that's in local view (should lag)

5 years agoCycles microdisplacement: Move displacement options from mesh to material settings
Mai Lavelle [Tue, 2 Aug 2016 09:13:58 +0000 (05:13 -0400)]
Cycles microdisplacement: Move displacement options from mesh to material settings

Displacement is now a per material setting, which means old files will have to
be updated if they had used displacement. Cool side effect of this change is
material previews now show displacement.

Reviewed By: brecht

Differential Revision:

5 years agoSet WIN32_WINNT for all windows platforms, not just x64
lazydodo [Sun, 7 Aug 2016 17:00:35 +0000 (11:00 -0600)]
Set WIN32_WINNT for all windows platforms, not just x64

5 years agoCycles microdisplacement: Support for Catmull-Clark subdivision via OpenSubdiv
Mai Lavelle [Sun, 17 Jul 2016 02:57:06 +0000 (22:57 -0400)]
Cycles microdisplacement: Support for Catmull-Clark subdivision via OpenSubdiv

Enables Catmull-Clark subdivision meshes with support for creases and attribute
subdivision. Still waiting on OpenSubdiv to fully support face varying
interpolation for subdividing uv coordinates tho. Also there may be some
inconsistencies with Blender's subdivision which will be resolved at a
later time.

Code for reading patch tables and creating patch maps is borrowed
from OpenSubdiv.

Reviewed By: brecht

Differential Revision:

5 years agoGPencil: Handle drawing on back for polygons
Antonioya [Sun, 7 Aug 2016 10:16:44 +0000 (12:16 +0200)]
GPencil: Handle drawing on back for polygons

The polygons must move the stroke to back only when polygon is complete

5 years agoGPencil: Add option to draw new strokes on back of layer
Antonioya [Fri, 5 Aug 2016 21:03:51 +0000 (23:03 +0200)]
GPencil: Add option to draw new strokes on back of layer

For artist point of view is very useful to have an option to draw by
default the new strokes on back of all strokes in the layer.

5 years agoGPencil: Fix error in arrange strokes
Antonioya [Fri, 5 Aug 2016 19:09:30 +0000 (21:09 +0200)]
GPencil: Fix error in arrange strokes

During code review a field was renamed, but one line was missing.

5 years agoGPencil: Do not disable continuous drawing if click out of drawing area
Antonioya [Fri, 5 Aug 2016 16:12:17 +0000 (18:12 +0200)]
GPencil: Do not disable continuous drawing if click out of drawing area

Do not clear continuous drawing. This code was related to a previous
test and must be removed.

5 years agoDon't hide on/off buttons of the Softbody modifier when there's Collision.
Alexander Gavrilov [Sun, 7 Aug 2016 13:45:31 +0000 (16:45 +0300)]
Don't hide on/off buttons of the Softbody modifier when there's Collision.

From source code history, it seems this behavior is a relic of a very
old limitation when the same object couldn't be both a Softbody and a
Collision object. In those times if somehow both modifiers were added
to an object, Softbody auto-disabled itself and buttons were hidden.

Now however there is no problem having both modifiers on an object,
so there is no point hiding the buttons. The same exact buttons are
available on the physics tab in any case.

5 years agoParticles: don't output nonsense UV data for Grid distribution particles.
Alexander Gavrilov [Sun, 7 Aug 2016 10:48:25 +0000 (13:48 +0300)]
Particles: don't output nonsense UV data for Grid distribution particles.

As reported in T48928, From Dupli UV is not supported for grid
distribution, and running the normal code as usual simply produces
nonsense data, because fuv is used to hold orco instead of
interpolation factors for uv, and num is zero.

Since support won't be added in 2.78, just stop outputting nonsense.

5 years agoFix pretty stupid mistake in last 'append fix' commit (rB50c017b6eabd).
Bastien Montagne [Sun, 7 Aug 2016 08:02:17 +0000 (10:02 +0200)]
Fix pretty stupid mistake in last 'append fix' commit (rB50c017b6eabd).

5 years agoCleanup: add missing ID types to BKE_library_idtype_can_use_idtype().
Bastien Montagne [Sat, 6 Aug 2016 10:56:15 +0000 (12:56 +0200)]
Cleanup: add missing ID types to BKE_library_idtype_can_use_idtype().

5 years agoFix T49028: crash when copying a scene without grease pencil data.
Kévin Dietrich [Sat, 6 Aug 2016 10:43:37 +0000 (12:43 +0200)]
Fix T49028: crash when copying a scene without grease pencil data.

5 years agoCleanup: better not split UI strings when possible...
Bastien Montagne [Sat, 6 Aug 2016 09:27:05 +0000 (11:27 +0200)]
Cleanup: better not split UI strings when possible...

5 years agoCleanup some new gpencil rna functions names.
Bastien Montagne [Sat, 6 Aug 2016 09:22:34 +0000 (11:22 +0200)]
Cleanup some new gpencil rna functions names.

Convention for properties callback names is to prefix them with a version of the RNA struct name.

5 years agoBasic Alembic support
Kévin Dietrich [Sat, 6 Aug 2016 04:20:37 +0000 (06:20 +0200)]
Basic Alembic support

All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.

A more in-depth documentation is to be found on the wiki, as well as a
 guide to compile alembic:

Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.

Reviewers: sergey, campbellbarton, mont29

Reviewed By: sergey, campbellbarton, mont29

Differential Revision:

5 years agoAdd the collision group option to the UI for boid particle physics.
Alexander Gavrilov [Sat, 6 Aug 2016 07:49:42 +0000 (10:49 +0300)]
Add the collision group option to the UI for boid particle physics.

The option already works, just missing from the ui since it
has completely different option set from newtonian and fluid.

5 years agoFix T26658: particles stopped or bounced by 100% permeability colliders.
Alexander Gavrilov [Fri, 22 Jul 2016 15:55:37 +0000 (18:55 +0300)]
Fix T26658: particles stopped or bounced by 100% permeability colliders.

There were two issues here. One is that the fix done originally for this
bug only checks for colliding with the same face as the single preceeding
hit. If the particle hits an edge or vertex of the collider, it in fact
hits two or more faces, so the loop ends up cycling between first two
of them and reaches the max collision limit.

The fix is to disable the collider for the sim step once a permeability
roll succeeds, by adding it to a skip list. Skipping just one face causes
some particles to bounce at odd angles in case of partial permeability.

The second problem was that the collider bounced back a small percentage
of particles, and the cause seemed to be that the code was set to flip
the velocity if the particle was just past the collider but still within
collision distance. Inverting both values causes a half permeable collider
to stop particles, so it seems that this if branch shouldn't bounce at all.

Test file: {F327322}

Reviewers: lukastoenne, brecht

Reviewed By: brecht

Subscribers: brecht, #physics

Maniphest Tasks: T26658

Differential Revision:

5 years agoFix wrong property type usage
Julian Eisel [Sat, 6 Aug 2016 04:32:44 +0000 (06:32 +0200)]
Fix wrong property type usage

Prints error on startup.

5 years agoCycles: Add AttributeDescriptor
Mai Lavelle [Fri, 1 Jul 2016 21:36:27 +0000 (17:36 -0400)]
Cycles: Add AttributeDescriptor

Adds a descriptor for attributes that can easily be passed around and extended
to contain more data. Will be used for attributes on subdivision meshes.

Reviewed By: brecht

Differential Revision:

5 years agoFix for Cycles particle motion blur hiding fix.
Brecht Van Lommel [Fri, 5 Aug 2016 22:38:23 +0000 (00:38 +0200)]
Fix for Cycles particle motion blur hiding fix.

My mistake in modifying the patch.

5 years agoFix T49023: Segfault when switching brushes while renaming another brush.
Bastien Montagne [Fri, 5 Aug 2016 21:33:22 +0000 (23:33 +0200)]
Fix T49023: Segfault when switching brushes while renaming another brush.

rna_GPencilBrush_name_set() was trying to use a mere bGPDbrush as a complete ToolSettings,
was doomed to fail...

5 years agoGPencil: Tweaks to layout to try and get the spacing a bit nicer
Joshua Leung [Fri, 5 Aug 2016 15:46:42 +0000 (03:46 +1200)]
GPencil: Tweaks to layout to try and get the spacing a bit nicer

Currently, the lack of spacing (or rather, odd spacing/clumping) in places
seemed a bit off.

5 years agoGPencil: Various UI name fixes
Joshua Leung [Fri, 5 Aug 2016 15:29:51 +0000 (03:29 +1200)]
GPencil: Various UI name fixes

* "Flip direction" -> "Flip Direction"
* "Show drawing direction" -> "Show Directions"
* "Grease Pencil Curves" -> "Brush Curves"
  (I was considering "Brush Response Curves" instead, but that seemed like too much
   of a mouthful)
* "X" for removing a palette. The UI there was more similar to a standard datablock
  selector, so it should use the "+X" combo instead of "+-" combo for consistency.
  (Note though, presets tend to use "+-" instead - e.g. see the Render Settings)

5 years agoGPencil: Added Ctrl-J hotkey for Joining strokes
Joshua Leung [Fri, 5 Aug 2016 14:10:27 +0000 (02:10 +1200)]
GPencil: Added Ctrl-J hotkey for Joining strokes

(Ctrl-Shift-J is for "Join and Copy")

5 years agoGPencil: "Join Strokes" tool doesn't leave gaps by default now
Joshua Leung [Fri, 5 Aug 2016 14:00:21 +0000 (02:00 +1200)]
GPencil: "Join Strokes" tool doesn't leave gaps by default now

Previously, it would insert "invisible" points after the endpoints of the strokes,
so that they wouldn't appear to be joined, but that behaviour could also get quite
confusing as you wouldn't be sure whether the strokes were really joined or not.

To keep the previous behaviour, simply enable the "Leave Gaps" option on the operator
after running it. This setting will get saved between runs of the operator.

5 years agoFix T49022: Crash in BKE_libblock_remap_locked.
Bastien Montagne [Fri, 5 Aug 2016 15:09:56 +0000 (17:09 +0200)]
Fix T49022: Crash in BKE_libblock_remap_locked.

Previous check to skip non-linkable IDs resulted in not clearing those skipped ID's newid member,
wich lead to try to remap it later in code.

5 years agoCleanup: add missing entries to library_query.c ID types switch case.
Bastien Montagne [Fri, 5 Aug 2016 14:12:44 +0000 (16:12 +0200)]
Cleanup: add missing entries to library_query.c ID types switch case.

5 years agoFix T48366: Freestyle will unnecessary exclude some linked objects.
Tamito Kajiyama [Fri, 5 Aug 2016 13:21:43 +0000 (22:21 +0900)]
Fix T48366: Freestyle will unnecessary exclude some linked objects.

Group membership testing for including/excluding feature lines was not
accounting for object names possibly further qualified by library file

Also fixed a few potential (but unlikely) references of uninitialized

A big thank to Bastien Montagne for the insight on the cause of the
problem and how to fix it.

5 years agoFreestyle: minor code cleanup (whites pace).
Tamito Kajiyama [Fri, 5 Aug 2016 07:59:47 +0000 (16:59 +0900)]
Freestyle: minor code cleanup (whites pace).

5 years agoFix T49014: Append does not work in some cases.
Bastien Montagne [Fri, 5 Aug 2016 12:45:21 +0000 (14:45 +0200)]
Fix T49014: Append does not work in some cases.

There were actually two issues, one in recent changes and one existing... forever?

I) id_make_local() would never proceed over indirectly linked data, which is required in specific 'append' context.
II) BKE_image_copy() was not setting id->newid pointer of newly copied ID.

About II: don't really know why image copy does its own cooking instead of using generaic ID copy helpers.
Think this should be changed, but that would be after 2.78 now.

5 years agoCycles: Fix embarrassing typo
Sergey Sharybin [Fri, 5 Aug 2016 12:45:54 +0000 (14:45 +0200)]
Cycles: Fix embarrassing typo

Spotted by Mai Lavelle, thanks!

5 years agoCycles: Correction to previous commit
Sergey Sharybin [Fri, 5 Aug 2016 10:16:24 +0000 (12:16 +0200)]
Cycles: Correction to previous commit

The change didn't fix difference render result on CUDA as i've hoped,
so reverting change for GPU rendering for now.

Sorry for the noise.

5 years agoCycles: Fix/workaround for wrong/noise render results with GCC6
Sergey Sharybin [Fri, 5 Aug 2016 08:48:38 +0000 (10:48 +0200)]
Cycles: Fix/workaround for wrong/noise render results with GCC6

5 years agoCurve Fitting: fix off by one error
Campbell Barton [Fri, 5 Aug 2016 08:49:56 +0000 (18:49 +1000)]
Curve Fitting: fix off by one error

In practice this wasn't likely to cause problems, but better fix.

5 years agoVSE sound strips: draw either the waveform or text label, not both.
Sybren A. Stüvel [Thu, 4 Aug 2016 19:59:35 +0000 (21:59 +0200)]
VSE sound strips: draw either the waveform or text label, not both.

Drawing both text and the wave onto a sound strip makes both hard to read,
which is a concrete issue for Hjalti at the moment. This was the simplest
fix I could think of to give him control over what he sees.

5 years agoCycles: hide particles with broken motion blur traces.
Alexander Gavrilov [Thu, 4 Aug 2016 21:24:29 +0000 (23:24 +0200)]
Cycles: hide particles with broken motion blur traces.

Currently cycles cannot correctly render motion blur for objects that appear or
disappear during the shutter window. Until that can be fixed properly, it may be
better to hide such particles rather than let them render as if they were
stationary for half of the frame.

Reviewed By: brecht

Differential Revision:

5 years agoFix python error when OSL file has wrong extension.
Brecht Van Lommel [Thu, 4 Aug 2016 22:03:28 +0000 (00:03 +0200)]
Fix python error when OSL file has wrong extension.

5 years agoAdd upstream information to curve_fit_nd library
Campbell Barton [Thu, 4 Aug 2016 22:35:12 +0000 (08:35 +1000)]
Add upstream information to curve_fit_nd library

5 years agoCurve Fitting: sync with upstream
Campbell Barton [Thu, 4 Aug 2016 22:34:23 +0000 (08:34 +1000)]
Curve Fitting: sync with upstream

Correct accidental float use

5 years agoCleanup: Use BKE_gpencil prefix
Julian Eisel [Thu, 4 Aug 2016 13:03:18 +0000 (15:03 +0200)]
Cleanup: Use BKE_gpencil prefix

This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.

5 years agoCycles: copy shader node names over in the blender sync code.
Alexander Gavrilov [Thu, 4 Aug 2016 11:48:34 +0000 (14:48 +0300)]
Cycles: copy shader node names over in the blender sync code.

This makes constant folding logs with --debug-cycles more meaningful.
A tiny fix is needed in OSL generator to match recent node refactoring.

5 years agoCycles: Report human-readable string of compilation error code
Sergey Sharybin [Thu, 4 Aug 2016 10:14:43 +0000 (12:14 +0200)]
Cycles: Report human-readable string of compilation error code

It is possible that compilation will fail without giving anything in the
log buffer. For this cases giving a tip about error code will be really

Patch by @Ilia, thanks!

5 years agoCleanup: Use bool
Julian Eisel [Thu, 4 Aug 2016 01:10:28 +0000 (03:10 +0200)]
Cleanup: Use bool

5 years agoMinor whitespace correction for eaea4ea51f665
Julian Eisel [Wed, 3 Aug 2016 23:43:01 +0000 (01:43 +0200)]
Minor whitespace correction for eaea4ea51f665

Caused by merge conflicts, slipped throug when double checking.

5 years agoFix T47782: popups with wrong size when switching from retina to non-retina on OS X.
Brecht Van Lommel [Wed, 3 Aug 2016 23:05:27 +0000 (01:05 +0200)]
Fix T47782: popups with wrong size when switching from retina to non-retina on OS X.

5 years agoUI: Correct tooltips for properties region toggle OP
Julian Eisel [Wed, 3 Aug 2016 22:26:49 +0000 (00:26 +0200)]
UI: Correct tooltips for properties region toggle OP

Now all consistent and using term "properties region" instead of "properties panel". Ideally we had a more generic operator for all those.

Fixes T49006.

5 years agoGrease Pencil v2 Branch
Antonio Vazquez [Wed, 3 Aug 2016 21:31:48 +0000 (23:31 +0200)]
Grease Pencil v2 Branch

Improve current Grease Pencil in order to get a better 2D animation tool.

More info in WIKI pages:

Reviewed By: Severin, aligorith, campbellbarton

Patch by @antoniov, with edits by @Severin.

Differential Revision:

5 years agoFix T48164: messed up interface switching between retina and non-retina display on...
Brecht Van Lommel [Wed, 3 Aug 2016 20:43:58 +0000 (22:43 +0200)]
Fix T48164: messed up interface switching between retina and non-retina display on OS X.

5 years agoBoolean modifier UI improvement
Julian Eisel [Wed, 3 Aug 2016 17:46:11 +0000 (19:46 +0200)]
Boolean modifier UI improvement

This patch improves UI of a recently added solver preference in boolean modifier:


Issue with the current UI is that it shows user unnecessary information and breaks established grid layout.

Reviewers: carter2422

Reviewed By: carter2422

Subscribers: carter2422

Tags: #user_interface, #bf_blender

Differential Revision:

5 years agoCycles: Recent SSS inline changes broke CPU tests
Sergey Sharybin [Wed, 3 Aug 2016 13:27:48 +0000 (15:27 +0200)]
Cycles: Recent SSS inline changes broke CPU tests

Very weird, but let's just fall back a bit for now.

5 years agoFix T49010: Portals don't work in recent Blender versions
Sergey Sharybin [Wed, 3 Aug 2016 10:38:25 +0000 (12:38 +0200)]
Fix T49010: Portals don't work in recent Blender versions

5 years agoCycles: Revert recent inline changes for CUDA 8 and sm_50+
Sergey Sharybin [Wed, 3 Aug 2016 09:41:58 +0000 (11:41 +0200)]
Cycles: Revert recent inline changes for CUDA 8 and sm_50+

This changes actually lead to 2x slowdown. It's getting a bit annoying
because those are the changes to make pre-maxwell cards render with the
same speed.

5 years agoFix T48283: on OS X, mouse clicks not working properly if application launch takes...
Brecht Van Lommel [Wed, 3 Aug 2016 00:39:29 +0000 (02:39 +0200)]
Fix T48283: on OS X, mouse clicks not working properly if application launch takes a long time.

5 years agoViewport: Make lights in local view behave like BI and Cycles
Julian Eisel [Tue, 2 Aug 2016 19:52:08 +0000 (21:52 +0200)]
Viewport: Make lights in local view behave like BI and Cycles

Ignore that lights are not included in local view, always render them if they are on the correct layers. BI and Cycles do this as well.

5 years agoFix T49003: Cycles volumes have wrong results after recent microdisp commits
Mai Lavelle [Tue, 2 Aug 2016 19:27:41 +0000 (15:27 -0400)]
Fix T49003: Cycles volumes have wrong results after recent microdisp commits

Problem was that sd->prim can be -1 for volumes and was causing check in subd
code to access out of bounds

5 years agoFix T43220, T47551: collider scaling or rotation causes smoke to explode.
Alexander Gavrilov [Mon, 18 Jul 2016 16:03:05 +0000 (19:03 +0300)]
Fix T43220, T47551: collider scaling or rotation causes smoke to explode.

The problem happens because smoke collides only with the surface of the
collider and uses incompressible fluid solver. This means that scaling
the collider tries to compress or decompress fluid within the volume of
the collider, which can't be handled by the simulation. Fast rotation
likely also causes transient scaling due to emulation of arcs by chords.

This can be fixed by finding compartments completely isolated by obstacles
from the rest of the domain, and forcing total divergence within each one
to be zero so that equations are solvable. Physical validity is somewhat
dubious, but without this the solver simply breaks down.

From the physics point of view, the effect of the correction should be
similar to opening a hole from every cell to another dimension that lets
an equal amount of air to pass through to balance the change in volume.

Reviewers: miikah, lukastoenne

Reviewed By: lukastoenne

Subscribers: dafassi, scorpion81, #physics

Maniphest Tasks: T43220, T47551

Differential Revision:

5 years agoFix T43782: smoke simulation problems with multiple touching colliders.
Alexander Gavrilov [Sun, 17 Jul 2016 17:42:06 +0000 (20:42 +0300)]
Fix T43782: smoke simulation problems with multiple touching colliders.

When the colliders are joined, each cell that touches them only gets
velocity contribution once. When there are multiple objects, velocities
are summed, which causes some cells to get 2x, 3x or more than the actual
object velocity.

Fix this by using the average velocity of all colliders touching a cell.

Reviewers: miikah, lukastoenne

Reviewed By: lukastoenne

Subscribers: dafassi, scorpion81, #physics

Maniphest Tasks: T43782

Differential Revision:

5 years agoCycles: log how many nodes were deduplicated for use in tests.
Alexander Gavrilov [Tue, 2 Aug 2016 16:26:57 +0000 (19:26 +0300)]
Cycles: log how many nodes were deduplicated for use in tests.

To make the number more meaningful, also skip deduplicating
obviously unused nodes with no outgoing links.

5 years agoCycles: add folding for redundant A to B to A conversions.
Alexander Gavrilov [Tue, 2 Aug 2016 09:22:43 +0000 (12:22 +0300)]
Cycles: add folding for redundant A to B to A conversions.

As a result of other folding simplifications it may happen that
two type conversion nodes end up directly connected. In some
cases it may be possible to then remove both. A realistic case
might be an optimized out Mix RGB node used to blend vectors.

It seems it's safe to optimize when B is a float3 type
(color, vector), and A is float3 or float.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

Differential Revision:

5 years agoFix T48986: Incorrect normals or tangents when using custom split normals.
Bastien Montagne [Tue, 2 Aug 2016 14:05:20 +0000 (16:05 +0200)]
Fix T48986: Incorrect normals or tangents when using custom split normals.

(Re)-setting custom normals could cause some unwanted splitting of some of them, leading
to slightly different tangent space. Simply enlarged slightly the threshold detecting
similar normals as identical ones for now, afarid this is the kind of issue that cannot
get a full complete solution for until we drop floats...

5 years agoBuildbot: Use annoying hybrid setup of two CUDA toolkits
Sergey Sharybin [Tue, 2 Aug 2016 13:32:03 +0000 (15:32 +0200)]
Buildbot: Use annoying hybrid setup of two CUDA toolkits

This is for until we'll solve issues with toolkit 8.0.

5 years agoCycles: Some more inline policy tweaks for CUDA 8
Sergey Sharybin [Tue, 2 Aug 2016 13:04:34 +0000 (15:04 +0200)]
Cycles: Some more inline policy tweaks for CUDA 8

Makes it so toolkit does exactly the same decision about what to inline,
but unfortunately it has really barely visible difference on GTX-980.

5 years agoCycles: Cleanup, trailing whitespace
Sergey Sharybin [Tue, 2 Aug 2016 09:28:20 +0000 (11:28 +0200)]
Cycles: Cleanup, trailing whitespace

5 years agoCycles: Some cleanup in CUDA device file
Sergey Sharybin [Tue, 2 Aug 2016 09:27:59 +0000 (11:27 +0200)]
Cycles: Some cleanup in CUDA device file

5 years agoCycles: Include NVCC compiler flags into md5 hash
Sergey Sharybin [Tue, 2 Aug 2016 09:24:42 +0000 (11:24 +0200)]
Cycles: Include NVCC compiler flags into md5 hash

This way we can easily switch between toolkits without worrying
whether some kernel was compiled with old or new CUDA toolkit.

It's also now possible to switch machine architecture and have
proper cached kernel detected. Not as if it happens every day,
but i did such a bitness switch back in the days :)

5 years agoFix T48998: 'header input' of rotation transform was clamped in [-PI, PI[ range.
Bastien Montagne [Tue, 2 Aug 2016 10:41:43 +0000 (12:41 +0200)]
Fix T48998: 'header input' of rotation transform was clamped in [-PI, PI[ range.

Can't see any reason for this behavior (inherited from 2.4x code), so for now just removing it.

5 years agoFix T47591: Smoke keeps both .bphys and .vdb cache files
Kévin Dietrich [Tue, 2 Aug 2016 10:20:54 +0000 (12:20 +0200)]
Fix T47591: Smoke keeps both .bphys and .vdb cache files

Delete old caches when changing cache type.

5 years agoFix T47520: Compositor Node "Filter" Outputs clear image
Kévin Dietrich [Tue, 2 Aug 2016 09:38:03 +0000 (11:38 +0200)]
Fix T47520: Compositor Node "Filter" Outputs clear image

Make 'Laplace' filter an edge filter operation, since this what it is
typically used for, and such operation does not affect the input's alpha

Reviewers: sergey, campbellbarton

Reviewed By: sergey

Differential Revision:

5 years agoCycles: tweak some folding tests to avoid unnecessary type conversion.
Alexander Gavrilov [Tue, 2 Aug 2016 09:08:04 +0000 (12:08 +0300)]
Cycles: tweak some folding tests to avoid unnecessary type conversion.

It's easy to connect a simple value to output without forcing
conversion to color by using the Strength socket of Emission.

5 years agoFix tmp screen becoming permanent after going fullscreen
Julian Eisel [Mon, 1 Aug 2016 20:57:12 +0000 (22:57 +0200)]
Fix tmp screen becoming permanent after going fullscreen

Doubt this is intentional.

5 years agoFix T48991: some particles emitted at a distance from object.
Alexander Gavrilov [Mon, 1 Aug 2016 18:45:42 +0000 (21:45 +0300)]
Fix T48991: some particles emitted at a distance from object.

The cause seems to be that despite dt_frac being computed as
1/(subframes+1) with integer subframes value, it doesn't always
add up to exactly 1.0 due to precision limitations. If the sum
is similar to 1.00000???, the last subframe is skipped, and all
particles that were supposed to be emitted in that interval are
emitted next frame, with the code working incorrectly due to
skewed time range.

To fix, separate the code from the dynamic timestep feature that
adjusts the last subframe length into a separate function, and
use it even when dynamic timestep is disabled.

5 years agoAudapsace: Make it work with Jack and no libjack-dev package installed
Sergey Sharybin [Mon, 1 Aug 2016 18:39:54 +0000 (20:39 +0200)]
Audapsace: Make it work with Jack and no libjack-dev package installed

@neXyon, mind backporting it to your upstream? :)

5 years agoBuildbot: Enable proper Pascal architecture
Sergey Sharybin [Mon, 1 Aug 2016 16:26:53 +0000 (18:26 +0200)]
Buildbot: Enable proper Pascal architecture

5 years agoFix strict compiler flags with older GCC
Sergey Sharybin [Mon, 1 Aug 2016 15:58:45 +0000 (17:58 +0200)]
Fix strict compiler flags with older GCC

5 years agoCycles: add unit tests for supported constant folding rules.
Alexander Gavrilov [Mon, 1 Aug 2016 15:53:20 +0000 (18:53 +0300)]
Cycles: add unit tests for supported constant folding rules.

Code coverage of different combinations of secondary conditions
is obviously not complete because there are so many of them, but
all main rules should be there.

The reason for CORRECT vs INVALID is that both words have the same
number of characters so calls line up, but look quite different.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: dingto, sergey, brecht

Differential Revision:

5 years agoBuildbot: Seems quotes are not really needed when passing list
Sergey Sharybin [Mon, 1 Aug 2016 14:25:03 +0000 (16:25 +0200)]
Buildbot: Seems quotes are not really needed when passing list

5 years agoBuildbot: Attempt to enable sm_60 CUDA architecture for build slaves
Sergey Sharybin [Mon, 1 Aug 2016 14:05:33 +0000 (16:05 +0200)]
Buildbot: Attempt to enable sm_60 CUDA architecture for build slaves

5 years agoCycles: Tweaks to support CUDA 8 toolkit
Sergey Sharybin [Mon, 1 Aug 2016 13:40:46 +0000 (15:40 +0200)]
Cycles: Tweaks to support CUDA 8 toolkit

All the changes are mainly giving explicit tips on inlining functions,
so they match how inlining worked with previous toolkit.

This make kernel compiled by CUDA 8 render in average with same speed
as previous kernels. Some scenes are somewhat faster, some of them are
somewhat slower. But slowdown is within 1% so far.

On a positive side it allows us to enable newer generation cards on
buildbots (so GTX 10x0 will be officially supported soon).

5 years agoFix T48901: Blender ignores xinput cursor matrix
Campbell Barton [Mon, 1 Aug 2016 03:40:59 +0000 (13:40 +1000)]
Fix T48901: Blender ignores xinput cursor matrix

5 years agoCleanup: unused vars, imports, pep8
Campbell Barton [Mon, 1 Aug 2016 01:54:02 +0000 (11:54 +1000)]
Cleanup: unused vars, imports, pep8

5 years agoReplace pep8 with flake8 checker
Campbell Barton [Mon, 1 Aug 2016 01:02:01 +0000 (11:02 +1000)]
Replace pep8 with flake8 checker

5 years agoSupport Auto-Clamped Handle for Curve-Mapping
Campbell Barton [Sun, 31 Jul 2016 23:01:43 +0000 (09:01 +1000)]
Support Auto-Clamped Handle for Curve-Mapping

This patch supports auto-clamped handles for curves,
useful since without this it can be difficult to have 'flat' sections of a curve.

5 years agoFix T48980: crash when loading a file that contains a custom node tree.
Bastien Montagne [Sun, 31 Jul 2016 18:07:33 +0000 (20:07 +0200)]
Fix T48980: crash when loading a file that contains a custom node tree.

Syupid logical mistake in own recent rB018d336cbd51...

5 years agoCorrection to 0f2ff52c0866
Julian Eisel [Sun, 31 Jul 2016 16:35:38 +0000 (18:35 +0200)]
Correction to 0f2ff52c0866

This info is shown while dragging, so should stay where it was.

5 years agoEnable Undo for "Add background Image"
Julian Eisel [Sun, 31 Jul 2016 15:33:57 +0000 (17:33 +0200)]
Enable Undo for "Add background Image"

Enabled the Undo option for the operation "Add background Image". This is to treat adding a background image like opening an image. This behavior is useful when a background image is add using 'drag and drop'.

Reviewers: Severin

Reviewed By: Severin

Subscribers: brecht

Tags: #bf_blender

Maniphest Tasks: T47050

Differential Revision: