3 years agoDepsgraph: Report proper error when modifier fails to create relation link
Sergey Sharybin [Fri, 30 Sep 2016 09:05:01 +0000 (11:05 +0200)]
Depsgraph: Report proper error when modifier fails to create relation link

3 years agoCUEW: Use latest upstream version
Sergey Sharybin [Fri, 30 Sep 2016 08:36:11 +0000 (10:36 +0200)]
CUEW: Use latest upstream version

Fixes typo in README :)

Thanks to @jesterKing!

3 years agoFix T49489: Pose marker in camera action + marker bound to camera -> crash.
Bastien Montagne [Fri, 30 Sep 2016 08:11:29 +0000 (10:11 +0200)]
Fix T49489: Pose marker in camera action + marker bound to camera -> crash.

'camera' Object pointer of TimeMarkers is a 'temp' hack since Durian project...
Would need to be either made definitive now, or removed/reworked/whatever.

But since we intend to use that object pointer for other needs, and current code
could lead to crashing .blend files, for now let's fix that mess (was missing
some bits in read code, and also totally ignored in libquery code).

Should be safe for 2.78a.

3 years agoUPBGE: Fix crash when calling shade_light texture when mtex has no tex.
Ulysse Martin [Fri, 30 Sep 2016 05:40:17 +0000 (07:40 +0200)]
UPBGE: Fix crash when calling shade_light texture when mtex has no tex.

3 years agoCycles: Support earlier tile rendering termination on cancel
Sergey Sharybin [Thu, 29 Sep 2016 14:00:25 +0000 (16:00 +0200)]
Cycles: Support earlier tile rendering termination on cancel

It will discard the whole tile, but it's still kind of more friendly than
fully locked interface (sort of) for until tile is fully sampled.

Sorry if it causes PITA to merge for the opencl split work, but this issue
bothering a lot when collecting benchmarks.

3 years agoCycles: Fix typo in shader cancel routines
Sergey Sharybin [Thu, 29 Sep 2016 13:48:10 +0000 (15:48 +0200)]
Cycles: Fix typo in shader cancel routines

3 years agoAdopt referenced scene in the context when evaluating sequences within a Scene Strip
Sergey Sharybin [Thu, 29 Sep 2016 13:00:03 +0000 (15:00 +0200)]
Adopt referenced scene in the context when evaluating sequences within a Scene Strip

This change makes it so that when the sequences within a Scene strip are
evaluated, they use the Scene that they come from as the context as opposed
the Scene that the Scene strip is in. This is necessary, for example, in the
case of the MulticamSelector where it needs to reference strips in the original
Scene as opposed to the Scene where the Scene strip is located.

Patch by @Matt (HyperSphere), thanks!

3 years agoCycles: Improve OpenCL line information handling
Sergey Sharybin [Thu, 29 Sep 2016 08:20:24 +0000 (10:20 +0200)]
Cycles: Improve OpenCL line information handling

Previously it was falling back to just a path after #include
statement was finished. Now we fall back to a proper current
file name after dealing with the preprocessor statement.

3 years agoCycles: Cleanup file headers
Sergey Sharybin [Thu, 29 Sep 2016 08:11:40 +0000 (10:11 +0200)]
Cycles: Cleanup file headers

Some of the files were wrongly attributing code to some other
organizations and in few places proper attribution was missing.

This is mainly either a copy-paste error (when new file was
created from an existing one and header wasn't updated) or due
to some refactor which split non-original-BF code with purely
BF code.

Should solve some confusion around.

3 years agoUpdate source tgz builder script
Sergey Sharybin [Thu, 29 Sep 2016 08:05:42 +0000 (10:05 +0200)]
Update source tgz builder script

Was broken since splitting BKE_blender_version from BKE_blender.

3 years ago[MSVC] make.bat updates.
lazydodo [Thu, 29 Sep 2016 01:57:25 +0000 (19:57 -0600)]
[MSVC] make.bat updates.

- The build folder name used to be depended on the order of the parameters, this is now normalized to
"build_windows_[Release/Full/Lite/Headless/Cycles/Bpy]_[x86/x64]_vc[12/14]_[Release/Debug]" regardless of the order of the parameters.

-Use CUDA8 for all kernels when building the release convenience target with visual studio 2015

3 years agoRevert "[Windows/MSVC] Blosc doesn't require debug libraries."
lazydodo [Wed, 28 Sep 2016 23:27:35 +0000 (17:27 -0600)]
Revert "[Windows/MSVC] Blosc doesn't require debug libraries."

turns out it's a C++ lib now-days and it *DOES* require debug libs.

This reverts commit bde5eb8b6303d8d92b7c41d4a3f041bbb73c162d.

3 years agoFix Windows mouse wheel scroll speed
lazydodo [Wed, 28 Sep 2016 23:19:16 +0000 (17:19 -0600)]
Fix Windows mouse wheel scroll speed

In Windows, event dispatching code is throwing out the wheel scroll count value.
Despite of how many fast you move the wheel, it only make one-notch scroll event.

This patch convert wheel event to multiple 1-notch wheel events.

This also correct the handling of smooth scroll mouse wheel (which can report smaller than 1-notch wheel movement) by accumulating the small wheel delta values.

Reviewers: djnz, shadowrom, elubie, #platform:_windows, sergey, juicyfruit, brecht

Reviewed By: shadowrom, elubie, #platform:_windows, brecht

Subscribers: dingto, elubie, brachi, brecht

Differential Revision:

3 years agoFix T49478: triangulate of face hangs Blender.
Bastien Montagne [Wed, 28 Sep 2016 18:03:59 +0000 (20:03 +0200)]
Fix T49478: triangulate of face hangs Blender.

Another case of float imprecision leading to endless loop. INcreasing a bit 'noise threashold' seems to work OK.

Not a regression, but might be nice to have in 2.78a.

3 years agoCycles: Cleanup, indentation
Sergey Sharybin [Wed, 28 Sep 2016 15:05:33 +0000 (17:05 +0200)]
Cycles: Cleanup, indentation

3 years agoCycles: Fix compilation error with minimal feature set
Sergey Sharybin [Wed, 28 Sep 2016 15:03:42 +0000 (17:03 +0200)]
Cycles: Fix compilation error with minimal feature set

3 years agoFix T49471: Vertex Connect randomly broken.
Bastien Montagne [Wed, 28 Sep 2016 14:56:19 +0000 (16:56 +0200)]
Fix T49471: Vertex Connect randomly broken.

Not sure where this comes from, but code was converting BMEdge* to BMVert* to check oflags,
i.e. not accessing correct memory.

Regression, to be backported to 2.78a.

3 years agoFixes for pose library change 601ce6a89c4
Sybren A. Stüvel [Wed, 28 Sep 2016 13:40:05 +0000 (15:40 +0200)]
Fixes for pose library change 601ce6a89c4

Apparently the keying sets system doesn't support subclassing
KeyingSetInfo subclasses. I have added a note to the top of the file to
indicate this to future developers.

3 years agoCurve pinning: Allow pinning object data without animated object
Sergey Sharybin [Wed, 28 Sep 2016 13:18:15 +0000 (15:18 +0200)]
Curve pinning: Allow pinning object data without animated object

Special case, so now we can pin tricky cases like animated camera DOF
without requiring to have animation on the object level.

3 years agoFix T49460: Particle group instance 'Use Count' value gets reset on file-load.
Bastien Montagne [Wed, 28 Sep 2016 13:06:50 +0000 (15:06 +0200)]
Fix T49460: Particle group instance 'Use Count' value gets reset on file-load.

Regression caused rBbcc863993ad, write code was assuming dw->ob was always valid,
wich is no more the case right after reading file e.g.

Another good example of how bad it is to use 'hidden' dependencies between datablocks. :(
And another fix to be backported to 2.78a. :(((

3 years agoPOSELIB_OT_pose_add: only create keyframes for selected bones.
Sybren A. Stüvel [Wed, 28 Sep 2016 11:54:57 +0000 (13:54 +0200)]
POSELIB_OT_pose_add: only create keyframes for selected bones.

Previously the pose library used the WholeCharacter key set, which ignores
selection and add keys for almost all bones in the rig. This is a very
slow operation on complex rigs. With this patch, only selected bones are
keyed, defaulting to keying all bones when none are selected.

Note that this fixes the FIXME previously mentioned in the source.

3 years agoFix missing properties editor update when changing 3D View camera
Julian Eisel [Tue, 27 Sep 2016 22:44:31 +0000 (00:44 +0200)]
Fix missing properties editor update when changing 3D View camera

Actually two errors here:
* Properties editor wasn't refreshing on (NC_SCENE | ND_RENDER_OPTIONS) notifiers
* Was using notifier info bits wrongly, needs to send two separate notifiers

Decided to remove ND_RENDER_OPTIONS rather than adding properties editor scene context refresh for it, this is more than a render option change.

3 years agoDynamic Paint: Don't store duplicate adjacency links.
Alexander Gavrilov [Tue, 27 Sep 2016 09:21:44 +0000 (12:21 +0300)]
Dynamic Paint: Don't store duplicate adjacency links.

Duplicates can happen at UV seams in case of resolution mismatch
or other complications. It's better not to store them in case it
confuses some math later on.

Reviewers: mont29

Differential Revision:

3 years agoDynamic Paint: Fix adjacency computations at UV seams.
Alexander Gavrilov [Tue, 27 Sep 2016 08:13:04 +0000 (11:13 +0300)]
Dynamic Paint: Fix adjacency computations at UV seams.

1. When adding one pixel border to UV islands prefer grid directions.
   This is more logical as it means neighbor pixels will commonly
   share a border, opposed to just corners.
2. Don't subtract 0.5 when converting float UVs to int in computing
   adjacency across a UV seam. Pixels cover a square with corners
   at int positions and adding/subtracting 0.5 is only for dealing
   with the center point of a pixel.
3. Use the neighbour_pixel field from the correct pixel, and check
   it's not back to the origin point.
4. In the connected UV case, ensure that the returned index actually
   refers to a valid active pixel.

This fixes paint spread not traversing some UV seams, while at the
same time spreading to random unrelated points on other seams.
The first problem is primarily fixed by 2, while the second one
is addressed by item 4.

Differential Revision:

3 years ago[Windows/MSVC] Blosc doesn't require debug libraries.
lazydodo [Tue, 27 Sep 2016 16:24:09 +0000 (10:24 -0600)]
[Windows/MSVC] Blosc doesn't require debug libraries.

3 years agoFix T49466: Stupid typo in logicbricks new copy code from rB776a8548f03a
Bastien Montagne [Tue, 27 Sep 2016 15:55:12 +0000 (17:55 +0200)]
Fix T49466: Stupid typo in logicbricks new copy code from rB776a8548f03a

Moved that code forth and back a few times while creating rB776a8548f03a fix,
ended up forgetting to update it correctly for function where it layed down in the end.

Last-minute fixes are never a good thing... Now we already have real reason for 2.78 'a' release :(

3 years agoFix T49423: Data Preview of group containing only group instances is empty.
Bastien Montagne [Tue, 27 Sep 2016 15:03:03 +0000 (17:03 +0200)]
Fix T49423: Data Preview of group containing only group instances is empty.

Code was not getting correct boundbox in some cases (group only instancing other groups e.g.), now
compute our own bbox in those cases.

Based on patch by @lichtwerk, but extended the fix to include linked datablocks in some cases
(linked objects in local groups, linked objects in local scene, etc.), this was also broken in existing code.

Reviewers: mont29

Subscribers: duarteframos

Differential Revision:

3 years agofix Mac build for Xcode < 8
Mike Erwin [Tue, 27 Sep 2016 14:16:47 +0000 (16:16 +0200)]
fix Mac build for Xcode < 8

We need a long-term fix, but this will get 2.78 out the door.

3 years agocleanup: spacing & alignment
Mike Erwin [Tue, 27 Sep 2016 12:56:58 +0000 (14:56 +0200)]
cleanup: spacing & alignment

3 years agoFix T49461: Dynamic paint wetmap flickers.
Bastien Montagne [Tue, 27 Sep 2016 11:54:26 +0000 (13:54 +0200)]
Fix T49461: Dynamic paint wetmap flickers.

Regression from rBa4a968f, we would adjust current point's wetness without actually protecting it
in new multi-threaded context, leading to concurrent access mess.

Now delay applying wetness reduction to current point to end of function, allows us to avoid having
to lock current point twice together with neighbor one (and reducing spinlock awainting too).

To be backported to 2.78a.

3 years agoFix T49464: Data Transfer modifier slows down redraw of window.
Bastien Montagne [Tue, 27 Sep 2016 10:03:18 +0000 (12:03 +0200)]
Fix T49464: Data Transfer modifier slows down redraw of window.

Never call function that might recompute a DM in an RNA itemf callback (or any UI-related func in general)!
There was an XXX comment asking if this was OK - well, no, it was not. :P

Could be ported back to some 2.78 flavour should we need it.

3 years agoFix export image generated by export UV layout
Sergey Sharybin [Mon, 26 Sep 2016 14:43:06 +0000 (16:43 +0200)]
Fix export image generated by export UV layout

Was only happening with new dependency graph.

The issue here is that scene's depsgraph layers will be 0 unless
it was ever visible. Worked around by checking for 0 layer in the
update_tagged of new depsgraph. This currently kind of following
logic of visible_layers, but is weak.

Committing so studio is unlocked here, will re-evaluate this layer.

3 years agoFix Scene datablocks being created with a real user while never having any real datab...
Bastien Montagne [Mon, 26 Sep 2016 14:35:52 +0000 (16:35 +0200)]
Fix Scene datablocks being created with a real user while never having any real datablock user.

Now using new system dedicated to that kind of cases, id_ensure_real_user(), instead.
That way, usercount of Scenes is handled correctly at deletion time.

Reported by @sergey over IRC, thanks.

3 years agoCleanup: stereo windowmanager code
Dalai Felinto [Mon, 26 Sep 2016 13:56:45 +0000 (13:56 +0000)]
Cleanup: stereo windowmanager code

This will make the changes in blender2.8 branch simpler

3 years agoFix crash in own recent rB776a8548f03a049.
Bastien Montagne [Mon, 26 Sep 2016 07:49:34 +0000 (09:49 +0200)]
Fix crash in own recent rB776a8548f03a049.

New ID may be null, have to check this too!

Reported by @panzergame over IRC, thanks.

To be ported to 2.78 as well.

3 years agoCycles: Use correct light sampling PDF for MIS calculation with Branched Path Tracing
Lukas Stockner [Sun, 25 Sep 2016 20:11:50 +0000 (22:11 +0200)]
Cycles: Use correct light sampling PDF for MIS calculation with Branched Path Tracing

The light sampling functions calculate light sampling PDF for the case that the light has been randomly selected out of all lights.
However, since BPT handles lamps and meshlights separately, this isn't the case. So, to avoid a wrong result, the code just included the 0.5 factor in the throughput.

In theory, however, the correction should be made to the sampling probability, which needs to be doubled. Now, for the regular calculation, that's no real difference since the throughput is divided by the pdf.
However, it does matter for the MIS calculation - it's unbiased both ways, but including the factor in the PDF instead of the throughput should give slightly better results.

Reviewers: sergey, brecht, dingto, juicyfruit

Differential Revision:

3 years agoCleanup: remove unused function.
Kévin Dietrich [Sun, 25 Sep 2016 20:11:09 +0000 (22:11 +0200)]
Cleanup: remove unused function.

3 years agoAlembic: only interpolate vertices when their number don't differ
Kévin Dietrich [Sun, 25 Sep 2016 20:09:05 +0000 (22:09 +0200)]
Alembic: only interpolate vertices when their number don't differ
between samples.

This could cause some crashes.

3 years agoCycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy is enabled
Lukas Stockner [Sun, 25 Sep 2016 20:08:08 +0000 (22:08 +0200)]
Cycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy is enabled

3 years agoVolume slice settings: tweak/fix UI enabling conditions.
Kévin Dietrich [Sun, 25 Sep 2016 19:55:29 +0000 (21:55 +0200)]
Volume slice settings: tweak/fix UI enabling conditions.

It was still possible to have some properties enabled when it does not
make sense to have them so.

3 years agoSmoke debug draw: take adaptive domain position into account.
Kévin Dietrich [Sun, 25 Sep 2016 19:45:09 +0000 (21:45 +0200)]
Smoke debug draw: take adaptive domain position into account.

Eventually the various functions that deals with adaptive domain
bounding box shall de-duplicated.

3 years agoViewport smoke: fix a couple of issues in the new display settings.
Kévin Dietrich [Sun, 25 Sep 2016 15:02:46 +0000 (17:02 +0200)]
Viewport smoke: fix a couple of issues in the new display settings.

- WITH_SMOKE macro was not defined so some code was not compiled, though
it was still accessible from the UI
- some UI elements were disappearing due to bad indentation, also rework
the UI code to not hide but rather disable/grey out button in the UI
- Display thickness was not used due to bad manual merge of the code
from the patch.

3 years agoFix T49310: incorrect Cycles standalone normals with negative scale.
Brecht Van Lommel [Sun, 25 Sep 2016 03:07:38 +0000 (05:07 +0200)]
Fix T49310: incorrect Cycles standalone normals with negative scale.

3 years agoCurve Fitting: re-fitting heap pre-allocated too much
Campbell Barton [Sun, 25 Sep 2016 02:11:46 +0000 (12:11 +1000)]
Curve Fitting: re-fitting heap pre-allocated too much

3 years agoCurve Fitting: 'offset' method used sign when it shouldn't
Campbell Barton [Sun, 25 Sep 2016 02:03:10 +0000 (12:03 +1000)]
Curve Fitting: 'offset' method used sign when it shouldn't

3 years agoCurve Fitting: inline dot-product (avoid temp vector)
Campbell Barton [Sun, 25 Sep 2016 01:40:18 +0000 (11:40 +1000)]
Curve Fitting: inline dot-product (avoid temp vector)

3 years agoCurve Fitting: de-duplicate cubic evaluation
Campbell Barton [Sun, 25 Sep 2016 01:34:31 +0000 (11:34 +1000)]
Curve Fitting: de-duplicate cubic evaluation

3 years agoQuiet shadow warning
Campbell Barton [Sun, 25 Sep 2016 02:15:14 +0000 (12:15 +1000)]
Quiet shadow warning

No need to declare new iterator for second loop.

3 years agoFix compile error when building without smoke support.
Kévin Dietrich [Sat, 24 Sep 2016 22:26:21 +0000 (00:26 +0200)]
Fix compile error when building without smoke support.

Also fixes possible NULL pointer dereference.

Fixes T49445.

3 years agoViewport smoke: add options to draw velocity vectors.
Kévin Dietrich [Sat, 24 Sep 2016 20:36:54 +0000 (22:36 +0200)]
Viewport smoke: add options to draw velocity vectors.

This basically exposes to the UI a function that was only available
through a debug macro ; the purpose is obviously to help debugging
simulations. It adds ways to draw the vectors either as colored needles
or as arrows showing the direction of the vectors. The colors are based
on the magnitude of the underlying vectors.

Reviewers: plasmasolutions, gottfried

Differential Revision:

3 years agoViewport smoke: add support for axis aligned slicing.
Kévin Dietrich [Sat, 24 Sep 2016 19:41:16 +0000 (21:41 +0200)]
Viewport smoke: add support for axis aligned slicing.

Current approach uses view aligned slicing to generate polygons for GL
texturing such that the generated polygons are always facing the view
plane. Now it is also possible to use object aligned slicing, which
creates polygons by slicing the object perpendicular to whichever axis
is facing the most the view plane. It is also possible to create a
single slice for inspecting the volume, or for 2D rendering effects.

Settings for this, along with a density multiplier setting, are to be
found in a newly added "Smoke Display Settings" panel in the smoke
domain properties tab.

Reviewers: plasmasolutions, gottfried

Differential Revision:

3 years agoMesh: added default UVs for Monkey, improved UVs for UV Sphere and Icosphere.
Peter Lu [Sat, 24 Sep 2016 14:08:10 +0000 (16:08 +0200)]
Mesh: added default UVs for Monkey, improved UVs for UV Sphere and Icosphere.

Fixes T47488 and T47478.

Reviewed By: brecht

Differential Revision:

3 years agoFix T49441: Grease Pencil - pie menu - brush name field crashes blender
Joshua Leung [Sat, 24 Sep 2016 00:49:43 +0000 (12:49 +1200)]
Fix T49441: Grease Pencil - pie menu - brush name field crashes blender

Using context.active_gpencil_brush to access the active Grease Pencil brush
would result in a crash if trying to rename the brush, because the "ID" pointer
was not set.

To be backported to 2.78

3 years agoCollada: Trying to get rid of some warning messages on linux
Gaia Clary [Fri, 23 Sep 2016 23:47:55 +0000 (01:47 +0200)]
Collada: Trying to get rid of some warning messages on linux

3 years agoCollada: Trying to get rif of some warning messages on linux
Gaia Clary [Fri, 23 Sep 2016 23:27:37 +0000 (01:27 +0200)]
Collada: Trying to get rif of some warning messages on linux

3 years agoFix: Collada Importer did not import the Blender Profile information correctly when...
Gaia Clary [Fri, 23 Sep 2016 10:56:04 +0000 (12:56 +0200)]
Fix: Collada Importer did not import the Blender Profile information correctly when multiple objects are bound to same armature. This caused Bone tails to be placed wrong.

3 years agoQuiet warning.
Kévin Dietrich [Fri, 23 Sep 2016 17:45:06 +0000 (19:45 +0200)]
Quiet warning.

3 years agoAlembic: only export face sets when required by the user.
Kévin Dietrich [Fri, 23 Sep 2016 17:44:51 +0000 (19:44 +0200)]
Alembic: only export face sets when required by the user.

Also remove deprecated face set code.

3 years agoCycles: Prevent crash in special cases when object has less slots than mesh
Sergey Sharybin [Fri, 23 Sep 2016 13:57:39 +0000 (15:57 +0200)]
Cycles: Prevent crash in special cases when object has less slots than mesh

This is something what was guaranteed in give_current_material(), just
copied some range checking logic from there.

Not sure what would be a proper fix here tho.

3 years agoParticles: Prevent crash when copying to an object with subsurf modifier
Sergey Sharybin [Fri, 23 Sep 2016 13:39:33 +0000 (15:39 +0200)]
Particles: Prevent crash when copying to an object with subsurf modifier

Probably something will be remapped wrongly, but better than crash.

3 years agoParticle: Add option to duplicate settings together with particle system itself
Sergey Sharybin [Fri, 23 Sep 2016 13:33:07 +0000 (15:33 +0200)]
Particle: Add option to duplicate settings together with particle system itself

This way it's possible to copy combed hair, use it as a basis for another
particle system to do some awesome artistic stuff.

3 years agoParticle: Prevent crash duplicating hair on objects with modifiers
Sergey Sharybin [Fri, 23 Sep 2016 12:51:42 +0000 (14:51 +0200)]
Particle: Prevent crash duplicating hair on objects with modifiers

3 years agoOutliner: Fix assert failure with palette ID
Sergey Sharybin [Fri, 23 Sep 2016 12:49:55 +0000 (14:49 +0200)]
Outliner: Fix assert failure with palette ID

3 years agoParticles: Add operator to quicly duplicate active particle system to the same object
Sergey Sharybin [Fri, 23 Sep 2016 12:32:14 +0000 (14:32 +0200)]
Particles: Add operator to quicly duplicate active particle system to the same object

3 years agoFix T49430: append scene with gamelogic broken.
Bastien Montagne [Fri, 23 Sep 2016 11:05:11 +0000 (13:05 +0200)]
Fix T49430: append scene with gamelogic broken.

In fact, it was the whole remapping process that was broken in logic bricks area,
due to terrible design of links between those bricks...

Object copying was also broken in that case, fixed as well.

To be backported to 2.78.

Note that issue was actually probably there since ages, hidden behind dirty hacks
used in previous append code (though likely visible in some corner cases).

Listen kids: do not, never, ever, do what has been done for links between logic bricks. Never. Ever.
Even as pure runtime data it would have been bad, but as stored data...

3 years agoCycles: Don't sum up memory usage of all devices together for the stats
Sergey Sharybin [Fri, 23 Sep 2016 10:43:23 +0000 (12:43 +0200)]
Cycles: Don't sum up memory usage of all devices together for the stats

3 years agoCycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplaced
Mai Lavelle [Thu, 22 Sep 2016 21:34:14 +0000 (17:34 -0400)]
Cycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplaced

3 years agoClip Editor: Enable Continuous Grab for view panning
Julian Eisel [Thu, 22 Sep 2016 20:49:01 +0000 (22:49 +0200)]
Clip Editor: Enable Continuous Grab for view panning

3 years agoFix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file
Sergey Sharybin [Thu, 22 Sep 2016 15:30:31 +0000 (17:30 +0200)]
Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file

Was an integer overflow issue when calculating offsets.

3 years agoFix T49427: Drivers of Shapekeys break when Append a group.
Bastien Montagne [Thu, 22 Sep 2016 14:11:16 +0000 (16:11 +0200)]
Fix T49427: Drivers of Shapekeys break when Append a group.

Optimization attempt with BKE_library_idtype_can_use_idtype() was not taking into account
the fact that drivers may link virtually against any datablock...

Has to be rethinked, but for after 2.78 release, this commit is safe to backport.

3 years agoBuildinfo: Improve behavior with detached HEAD
Sergey Sharybin [Thu, 22 Sep 2016 13:00:23 +0000 (15:00 +0200)]
Buildinfo: Improve behavior with detached HEAD

Try real hard to detect which branch we've detached from.

3 years agoFix T49425: Freestyle in viewport keeps updating over and over.
Bastien Montagne [Thu, 22 Sep 2016 12:57:16 +0000 (14:57 +0200)]
Fix T49425: Freestyle in viewport keeps updating over and over.

Regression caused by rBb27ba26, we would always tag datablocks to update in G.main,
ignoring given bmain, now always use this one instead.

To be backported to 2.78.

3 years agoCMake: Fix copy-paste error
Sergey Sharybin [Thu, 22 Sep 2016 09:01:37 +0000 (11:01 +0200)]
CMake: Fix copy-paste error

3 years agoFix non-finite normalization factor in certain cases
Sergey Sharybin [Thu, 22 Sep 2016 08:04:51 +0000 (10:04 +0200)]
Fix non-finite normalization factor in certain cases

3 years agoFix T49422: Metadata not showing in OpenGL renders
Sergey Sharybin [Thu, 22 Sep 2016 07:42:09 +0000 (09:42 +0200)]
Fix T49422: Metadata not showing in OpenGL renders

Own regression since recent optimization.

3 years agoRNA/UI: Allow displaying in tooltip why RNA property isn't editable
Julian Eisel [Wed, 21 Sep 2016 22:10:53 +0000 (00:10 +0200)]
RNA/UI: Allow displaying in tooltip why RNA property isn't editable

This commit allows RNA properties to return additional info on their editable state which may then be displayed in tooltips. To show how it works, it also adds some info for the editable check of proxies. For generally un-editable properties or properties of a linked data-block, RNA returns default strings.

| {F362785} | {F362786} | {F362787} |

Reviewed by brecht, thanks!

Differential Revision:

3 years agoUI: Theme options for vertex/edge bevel weight colors
Philipp Oeser [Wed, 21 Sep 2016 21:04:26 +0000 (23:04 +0200)]
UI: Theme options for vertex/edge bevel weight colors

Drawing used colors for select (TH_EDGE_SELECT/TH_VERTEX_SELECT) which was inconsistent with crease, seam, sharp, .. (which all had their own them color -- also was a bit hard to read).

NOTE: UI team usually doesn't allow adding more theme options, this is an exception.

Differential Revision:

3 years agoUI: Make eyedropper shortcut configurable
Julian Eisel [Wed, 21 Sep 2016 20:20:24 +0000 (22:20 +0200)]
UI: Make eyedropper shortcut configurable

It's now possible to change the shortcut for invoking the eyedropper while hovering a button (E by default). Also removed the keymap editor entry for the modal eyedropper keymap, it's now automatically appended to the eyedropper shortcut.

3 years agoUI: Make button driver and keying set shortcuts configurable
Julian Eisel [Wed, 21 Sep 2016 18:05:49 +0000 (20:05 +0200)]
UI: Make button driver and keying set shortcuts configurable

3 years agofix for potential pitfall with glMatrixMode
Mike Erwin [Wed, 21 Sep 2016 15:41:34 +0000 (17:41 +0200)]
fix for potential pitfall with glMatrixMode

close D696 by @jwilkins

The matrix mode should always be left in modelview mode, since a lot of code assumes it is before setting a matrix.

3 years agoUI: Configurable shortcuts for keyframe operators
Julian Eisel [Wed, 21 Sep 2016 13:13:43 +0000 (15:13 +0200)]
UI: Configurable shortcuts for keyframe operators

Adds support for editing the shortcuts for inserting (I), deleting (Alt+I) and clearing (Alt+Shift+I) button keyframes.

3 years agoFFmpeg interface improvements
Sybren A. Stüvel [Wed, 21 Sep 2016 13:01:51 +0000 (15:01 +0200)]
FFmpeg interface improvements

This patch changes a couple of things in the video output encoding.


- Clearer separation between container and codec. No more "format", as this is
  too ambiguous. As a result, codecs were removed from the container list.
- Added FFmpeg speed presets, so the user can choosen from the range "Very
  slow" to "Ultra fast". By default no preset is used.
- Added Constant Rate Factor (CRF) mode, which allows changing the bit-rate
  depending on the desired quality and the input. This generally produces the
  best quality videos, at the expense of not knowing the exact bit-rate and
  file size.
- Added optional maximum of non-B-frames between B-frames (`max_b_frames`).
- Presets were adjusted for these changes, and new presets added. One of the
  new presets is [recommended](
  for reviewing videos, as it allows players to scrub through it easily. Might
  be nice in weeklies. This preset also requires control over the
  `max_b_frames` setting.

GUI-only changes:
- Renamed "MPEG" in the output file format menu with "FFmpeg", as this is more
  accurate. After all, FFmpeg is used when this option is chosen, which can
  also output non-MPEG files.
- Certain parts of the GUI are disabled when not in use:
    - bit rate options are not used when a constant rate factor is given.
    - audio bitrate & volume are not used when no audio is exported.

Note that I did not touch `BKE_ffmpeg_preset_set()`. There are currently two
preset systems for FFmpeg (`BKE_ffmpeg_preset_set()` and the Python preset
system). Before we do more work on `BKE_ffmpeg_preset_set()`, I think it's a
good idea to determine whether we want to keep it at all.

After this patch has been accepted, I'd be happy to go through the code and
remove any then-obsolete bits, such as the handling of "XVID" as a container

Reviewers: sergey, mont29, brecht

Subscribers: mpan3, Blendify, brecht, fsiddi

Tags: #bf_blender

Differential Revision:

3 years agoFix crash in space context cycling when leaving window bounds
Julian Eisel [Wed, 21 Sep 2016 12:47:40 +0000 (14:47 +0200)]
Fix crash in space context cycling when leaving window bounds

3 years agoMake space context cycling a proper screen-level OP
Julian Eisel [Wed, 21 Sep 2016 12:43:11 +0000 (14:43 +0200)]
Make space context cycling a proper screen-level OP

This is really more of a screen level operation, UI-level is more like button handling etc.

3 years agoUI: Support UI operators with configurable shortcuts
Julian Eisel [Wed, 21 Sep 2016 12:35:02 +0000 (14:35 +0200)]
UI: Support UI operators with configurable shortcuts

After all a super simple solution that allows us to get rid of hardcoded keymap items.

3 years agoCycles: Cleanup, whitespace
Sergey Sharybin [Wed, 21 Sep 2016 12:41:33 +0000 (14:41 +0200)]
Cycles: Cleanup, whitespace

3 years agoFix T49393: Baking ignores backfaces
Dalai Felinto [Tue, 20 Sep 2016 23:26:59 +0000 (23:26 +0000)]
Fix T49393: Baking ignores backfaces

For some reason (which I can't recall), backing was doing backface
culling. Since Cycles itself doesn't ignore them (nor does Blender
Internal), they should be visible.

3 years agoCycles: Make code more uniform across two versions of shadow_blocked()
Sergey Sharybin [Wed, 21 Sep 2016 09:50:11 +0000 (11:50 +0200)]
Cycles: Make code more uniform across two versions of shadow_blocked()

Just to make it easier to research ways of possible code de-duplication.

3 years agoCycles: Remove out of date comment
Sergey Sharybin [Wed, 21 Sep 2016 09:48:36 +0000 (11:48 +0200)]
Cycles: Remove out of date comment

3 years agoFix: Grease Pencil sculpting crashes when sculpting on layers without any strokes
Joshua Leung [Wed, 21 Sep 2016 05:02:17 +0000 (17:02 +1200)]
Fix: Grease Pencil sculpting crashes when sculpting on layers without any strokes

Reported by @loochmunz. I've also gone through checking for and fixing other places
where this was also occurring.

To be included in 2.78

3 years agoGPencil D+W Pie: Don't show editing operators when not in editmode
Joshua Leung [Wed, 21 Sep 2016 03:06:39 +0000 (15:06 +1200)]
GPencil D+W Pie: Don't show editing operators when not in editmode

These operators only operate on the selected strokes, but when not in editmode,
stroke vertices are not shown.

Safe for 2.78

3 years agoUI: Fix crash using drag-toggle over window bounds with button callback
Julian Eisel [Tue, 20 Sep 2016 22:29:28 +0000 (00:29 +0200)]
UI: Fix crash using drag-toggle over window bounds with button callback

Steps to reproduce:
* Go to modifier context in properties editor
* Add modifier, collapse it
* Press down LMB over collapse button of modifier, hold it
* Drag over pin-icon in properties editor (to keep fixed data-block displayed)
* Drag outside of window bounds (should crash)

Also could've solved by getting space data from callback arguments instead of context, but this fix is much nicer (though not totally un-risky).

3 years agoregression fix for 1346482d23f167fa57049128384246397fda8d27: The length of leaf bones...
Gaia Clary [Tue, 20 Sep 2016 15:32:44 +0000 (17:32 +0200)]
regression fix for 1346482d23f167fa57049128384246397fda8d27: The length of leaf bones should always be set to the length of the smallest bone. since the mentioned commit the importer did only recalculate the leaf bone length when the 'fix leaf bones' option was also enabled.

3 years agoCycles: Make regular bvh traversal functions close to each other
Sergey Sharybin [Tue, 20 Sep 2016 11:29:07 +0000 (13:29 +0200)]
Cycles: Make regular bvh traversal functions close to each other

3 years agoCycles: Re-group ifdef so we check for particular feature only once
Sergey Sharybin [Tue, 20 Sep 2016 11:21:47 +0000 (13:21 +0200)]
Cycles: Re-group ifdef so we check for particular feature only once

3 years agoAlembic: add support to interpolate transform matrices in-between
Kévin Dietrich [Tue, 20 Sep 2016 12:15:02 +0000 (14:15 +0200)]
Alembic: add support to interpolate transform matrices in-between

3 years agoCycles: Avoid conversion from bool to uint
Sergey Sharybin [Tue, 20 Sep 2016 11:00:16 +0000 (13:00 +0200)]
Cycles: Avoid conversion from bool to uint

3 years agoSmall speedup for
Dmitry Dygalo [Tue, 20 Sep 2016 10:38:54 +0000 (12:38 +0200)]
Small speedup for

Do not close and re-open the file in case it's compressed, gzip module can now directly take a file object as parameter.

Differential Revision:

3 years agoFix T49391: Texture paint is not aware of disabled color management
Sergey Sharybin [Tue, 20 Sep 2016 10:21:28 +0000 (12:21 +0200)]
Fix T49391: Texture paint is not aware of disabled color management

There might be some extra missing points here, but it's all rather
a TODO than a real bug and can be tweaked further once issues are
actually discovered.

3 years agoFix T49343: ImageFormatSettings were not setting their rna struct path correctly
Philipp Oeser [Tue, 20 Sep 2016 10:13:40 +0000 (12:13 +0200)]
Fix T49343: ImageFormatSettings were not setting their rna struct path correctly

Reviewers: brecht, mont29

Reviewed By: brecht, mont29

Subscribers: brecht, sergey

Differential Revision: