blender-staging.git
10 months agoFix build error on Windows 32 bit. master
Brecht Van Lommel [Tue, 20 Mar 2018 16:11:14 +0000 (17:11 +0100)]
Fix build error on Windows 32 bit.

10 months agoRemove debug only code from previous commit
Sergey Sharybin [Tue, 20 Mar 2018 15:54:50 +0000 (16:54 +0100)]
Remove debug only code from previous commit

10 months agoMemory allocator: Clarify consistency check function
Sergey Sharybin [Tue, 20 Mar 2018 15:51:33 +0000 (16:51 +0100)]
Memory allocator: Clarify consistency check function

Also make it to return truth when everything is good and
false otherwise.

10 months agoMSVC: Fix lite build.
Ray Molenkamp [Tue, 20 Mar 2018 14:26:11 +0000 (08:26 -0600)]
MSVC: Fix lite build.

MSVC still defines __cplusplus as 199711L until it's in full conformance with the newer c++ standards, however the things we need from the standard are fully supported, hence a check for the msvc version was needed.

10 months agoFixed: cache clearing when using multiple Alembic files.
Sybren A. Stüvel [Tue, 20 Mar 2018 11:54:48 +0000 (12:54 +0100)]
Fixed: cache clearing when using multiple Alembic files.

10 months agoFix BLI_assert for MSVC
Campbell Barton [Tue, 20 Mar 2018 10:49:33 +0000 (11:49 +0100)]
Fix BLI_assert for MSVC

Also use `_BLI_ASSERT` prefix for internal defines.

10 months agoFix missing ID pointer handling in materials in ID remapping code.
Bastien Montagne [Tue, 20 Mar 2018 10:28:02 +0000 (11:28 +0100)]
Fix missing ID pointer handling in materials in ID remapping code.

10 months agoFix missing array duplication when copying material
Sergey Sharybin [Tue, 20 Mar 2018 10:22:47 +0000 (11:22 +0100)]
Fix missing array duplication when copying material

Texture paint slots were copied as a pointer, causing double-free.

10 months agoFix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined...
Joshua Leung [Tue, 20 Mar 2018 03:03:43 +0000 (16:03 +1300)]
Fix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined functions

ERROR: blenlib/intern/math_base_inline.c:371 - '__func__' : undeclared identifier (C:\blenderdev\master2\blender\source\blender\editors\lattice\editlattice_tools.c)  [C2065]

10 months agoFix T54019: copying and linking bugs with custom ID pointer properties.
Bogdan Nagirniak [Mon, 19 Mar 2018 21:12:55 +0000 (22:12 +0100)]
Fix T54019: copying and linking bugs with custom ID pointer properties.

10 months agoFix T54240: automatic node link moving should take into account type.
Matthias Ellerbeck [Mon, 19 Mar 2018 20:30:33 +0000 (21:30 +0100)]
Fix T54240: automatic node link moving should take into account type.

Without this a "Clearcoat" link could be moved to "Clearcoat Normal"
for example, which doesn't make much sense.

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

10 months agoFix T54317: overlapping volume render bug after recent changes.
Brecht Van Lommel [Mon, 19 Mar 2018 19:20:01 +0000 (20:20 +0100)]
Fix T54317: overlapping volume render bug after recent changes.

Increasing the samplig dimensions like this is not optimal, I'm looking
into some deeper changes to reuse the random number and change the RR
probabilities, but this should fix the bug for now.

10 months agoFix T54356: volume rendering bug using just color attribute.
Brecht Van Lommel [Mon, 19 Mar 2018 19:18:24 +0000 (20:18 +0100)]
Fix T54356: volume rendering bug using just color attribute.

10 months agoCleanup: use utility header for particle looping
Campbell Barton [Mon, 19 Mar 2018 17:16:27 +0000 (18:16 +0100)]
Cleanup: use utility header for particle looping

10 months agoCleanup: move particle undo into own file
Campbell Barton [Mon, 19 Mar 2018 16:46:49 +0000 (17:46 +0100)]
Cleanup: move particle undo into own file

Also avoid extern declarations which can get out of sync.

10 months agoCleanup: move armature undo into own file
Campbell Barton [Mon, 19 Mar 2018 16:10:07 +0000 (17:10 +0100)]
Cleanup: move armature undo into own file

10 months agoCleanup: move metaball undo into own file
Campbell Barton [Mon, 19 Mar 2018 15:46:48 +0000 (16:46 +0100)]
Cleanup: move metaball undo into own file

10 months agoCleanup: move curve undo into own file
Campbell Barton [Mon, 19 Mar 2018 15:30:53 +0000 (16:30 +0100)]
Cleanup: move curve undo into own file

10 months agoCleanup: split lattice into own library
Campbell Barton [Mon, 19 Mar 2018 13:49:59 +0000 (14:49 +0100)]
Cleanup: split lattice into own library

Was mixed with object functionality.

10 months agoCleanup: type conversion warning
Campbell Barton [Mon, 19 Mar 2018 07:48:12 +0000 (08:48 +0100)]
Cleanup: type conversion warning

10 months agoFixed typo Python API
Jeroen Bakker [Mon, 19 Mar 2018 07:19:48 +0000 (08:19 +0100)]
Fixed typo Python API

`mathutils.geometry.barycentric_transform` used `tri_a[1-3]` for the
target triangle, but in fact they are `tri_b[1-3]`

11 months agoFix ugly recursive pattern in RNA PointCache data layout.
Bastien Montagne [Sun, 18 Mar 2018 14:37:23 +0000 (15:37 +0100)]
Fix ugly recursive pattern in RNA PointCache data layout.

PointCache was having a collection of items of PointCache type, having a
collection of items of PointCache type, having...

Nuff said.

For now, chose the 'ugly' way to fix it, that is, the one that changes
nothing to API and scripts using it: we define another 'PointCacheItem'
RNA type for items of our point cache collection, which has exact same
interface as PointCache except for the collection.

This is doomed to be rewritten at some point anyway, not worth spending
time trying to define a really correct data layout for now.

11 months agoCMake: disable boost for lite builds
Campbell Barton [Sun, 18 Mar 2018 04:10:02 +0000 (05:10 +0100)]
CMake: disable boost for lite builds

11 months agoCleanup: kdopbvh, only set parent nodes once
Campbell Barton [Sun, 18 Mar 2018 04:07:14 +0000 (05:07 +0100)]
Cleanup: kdopbvh, only set parent nodes once

11 months agoCleanup: use MEM_SAFE_FREE
Campbell Barton [Sun, 18 Mar 2018 04:03:42 +0000 (05:03 +0100)]
Cleanup: use MEM_SAFE_FREE

11 months agomathutils: replace interp w/ blend when standalone
Campbell Barton [Sun, 18 Mar 2018 04:01:30 +0000 (05:01 +0100)]
mathutils: replace interp w/ blend when standalone

11 months agobuild_environment: remove msvc compiler warning from boost.
Ray Molenkamp [Sat, 17 Mar 2018 18:47:17 +0000 (12:47 -0600)]
build_environment: remove msvc compiler warning from boost.

Even the boost people have given up trying to keep up with the rapid release
of new msvc versions, and have removed the warn for now see: https://github.com/boostorg/config/commit/5ad0730630188b55e2ee554dec53b5498fc0a030#diff-eac863c1d46c77471e54e8818aab7534

11 months agoMSVC: ignore warning c4828 The file contains a character that is illegal.
Ray Molenkamp [Sat, 17 Mar 2018 18:45:27 +0000 (12:45 -0600)]
MSVC: ignore warning c4828 The file contains a character that is illegal.

The only place this warning is coming from is from comments in headers of 3rd party libs. we can safely repress this warning for now.

11 months agoRefactor: Collada: remove param, changed order of params in Function call
Gaia Clary [Sat, 17 Mar 2018 13:16:19 +0000 (14:16 +0100)]
Refactor: Collada: remove param, changed order of params in Function call

* In the Collada Module parameters are typically ordered
  in a similar way. I changed this to:

    extern std::string get_joint_id(Object *ob, Bone *bone);

* The Object parameter was not used in get_joint_sid().
  I changed this to:

extern std::string get_joint_sid(Bone *bone);

11 months agoAdd an assert to BKE_icon_changed() that we are actually dealing with ID icon.
Bastien Montagne [Fri, 16 Mar 2018 16:17:19 +0000 (17:17 +0100)]
Add an assert to BKE_icon_changed() that we are actually dealing with ID icon.

Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to
a vast amount of bad things.

11 months agoFix T54310: Assert when enable Brush custom icon.
Bastien Montagne [Fri, 16 Mar 2018 16:06:43 +0000 (17:06 +0100)]
Fix T54310: Assert when enable Brush custom icon.

We had a mix of two issues here actually:
* First, Brush are currently using their own sauce for custom previews,
this is not great, but moving them to use common ImagePreview system of
IDs is a low-priority TODO. For now, they should totally ignore their
own ImagePreview.
* Second, BKE_icon_changed() would systematically create a PreviewImage
for ID types supporting it, which does not really makes sense, this
function is merely here to 'tag' previews as outdated. Actual creation
of previews is deferred to later, when we actually need them.

11 months agoCleanup: naming and const parameter.
Bastien Montagne [Fri, 16 Mar 2018 15:44:23 +0000 (16:44 +0100)]
Cleanup: naming and const parameter.

11 months agoDepsgraph: Support colored addresses in debug prints
Sergey Sharybin [Fri, 16 Mar 2018 11:24:08 +0000 (12:24 +0100)]
Depsgraph: Support colored addresses in debug prints

Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.

Thanks Bastien for review!

11 months agoAdd Truecolor ANSI console constants
Sergey Sharybin [Fri, 16 Mar 2018 11:16:29 +0000 (12:16 +0100)]
Add Truecolor ANSI console constants

They are used to start and end colored output in console.
Use with care, it is up to you to check that console actually
supports Truecolor ANSII.

In thew future we can extend this to other consoles and platforms.

11 months agoHash: Add utility function to convert address to rgb values
Sergey Sharybin [Fri, 16 Mar 2018 11:11:55 +0000 (12:11 +0100)]
Hash: Add utility function to convert address to rgb values

Some magic hashing, will become handy to make debug messages
easier to follow.

11 months agoDepsgraph: Move evaluation debug prints to depsgraph
Sergey Sharybin [Fri, 16 Mar 2018 10:14:38 +0000 (11:14 +0100)]
Depsgraph: Move evaluation debug prints to depsgraph

This way we can easily control format and keep it consistent.

And also possibly do other trickery, like coloring addresses!

11 months agoCleanup: move mesh mirror functions to own file
Campbell Barton [Fri, 16 Mar 2018 12:14:07 +0000 (23:14 +1100)]
Cleanup: move mesh mirror functions to own file

11 months agoCleanup: doxy sections for editmesh files.
Campbell Barton [Fri, 16 Mar 2018 09:46:14 +0000 (20:46 +1100)]
Cleanup: doxy sections for editmesh files.

11 months agoFix T54326: Import Alembic stuck in edit mode
Kévin Dietrich [Fri, 16 Mar 2018 03:06:18 +0000 (04:06 +0100)]
Fix T54326: Import Alembic stuck in edit mode

Switch to object mode before doing the import.

11 months agoFix T53971: single layer render showing the wrong render layer in image editor.
Cheryl Chen [Thu, 15 Mar 2018 22:36:15 +0000 (23:36 +0100)]
Fix T53971: single layer render showing the wrong render layer in image editor.

Original patch Cheryl Chen, extra fixes by Brecht.

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

11 months agoCode refactor: move OIIO image buffer writing outside session, into callback.
Guillaume Chereau [Thu, 15 Mar 2018 21:07:37 +0000 (22:07 +0100)]
Code refactor: move OIIO image buffer writing outside session, into callback.

Original patch by Guillaume, modifications by Brecht.

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

11 months agoGHOST: Support Unity taskbar progress API
Lukas Stockner [Thu, 15 Mar 2018 19:43:08 +0000 (20:43 +0100)]
GHOST: Support Unity taskbar progress API

Unity itself is deprecated, but the API is also supported by KDE and the GNOME Dock extension,
which means that it will be useful for a wide variety of distributions.

To get a progress bar, the system must have a blender.desktop file and libunity installed.

The need for libunity is annoying, but the only alternative would be to integrate a DBus library...

Reviewers: campbellbarton, brecht

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

11 months agoBLI_assert: extract from BLI_utildefines
Campbell Barton [Thu, 15 Mar 2018 19:03:29 +0000 (06:03 +1100)]
BLI_assert: extract from BLI_utildefines

BLI_utildefines is quite large, defining many unrelated things.
Add BLI_assert to include in inline headers, so math defines don't
pull in too much.

11 months agoMissed last commit
Campbell Barton [Thu, 15 Mar 2018 00:16:32 +0000 (11:16 +1100)]
Missed last commit

11 months agoBLI_math: don't use asserts in inline API
Campbell Barton [Thu, 15 Mar 2018 00:10:11 +0000 (11:10 +1100)]
BLI_math: don't use asserts in inline API

Requires BLI_utildefines.h to be included first,
(already noted in other inline code).

Possible alternative could be to move BLI_assert into own header.

11 months agoStyle cleanup.
Bastien Montagne [Wed, 14 Mar 2018 17:05:09 +0000 (18:05 +0100)]
Style cleanup.

11 months agoFix (unreported) broken IDarray case in IDP_EqualsProperties_ex.
Bastien Montagne [Wed, 14 Mar 2018 16:53:29 +0000 (17:53 +0100)]
Fix (unreported) broken IDarray case in IDP_EqualsProperties_ex.

For IDProps IDarray, IDP_EqualsProperties was called for each item,
instead of IDP_EqualsProperties_ex, discarding value of `is_strict`
option.

Probably not an issue with current code, though.

11 months agoFix T54319: Crash after double-clicking baked F-curve
Sergey Sharybin [Wed, 14 Mar 2018 14:57:14 +0000 (15:57 +0100)]
Fix T54319: Crash after double-clicking baked F-curve

11 months agoCleanup: rename BLI_array_count -> len
Campbell Barton [Wed, 14 Mar 2018 14:42:44 +0000 (01:42 +1100)]
Cleanup: rename BLI_array_count -> len

Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.

11 months agoUpdated bpy.props getter/setter example
Sybren A. Stüvel [Wed, 14 Mar 2018 10:42:36 +0000 (11:42 +0100)]
Updated bpy.props getter/setter example

- The common name in computer science are 'getters' and 'setters', so by
  adding these names to the documentation (while 'get' and 'set are still
  also mentioned) we improve findability. Having 'Getters/Setters' as a
  title also makes it clearer that this example is not just about
  getting or setting the property value.
- Added a little prefix to each printed value, so that print statement,
  expected output, and real output can be matched easier.

11 months agoFix T54286: bpy.props operator example misses property access
Sybren A. Stüvel [Wed, 14 Mar 2018 10:31:14 +0000 (11:31 +0100)]
Fix T54286: bpy.props operator example misses property access

The old example had two downsides:

- It promoted a blocking UI design, where the user is shown a popup
  before actually executing the operator.
- It didn't show how to actually use the property values.

The new code avoids these mistakes. The properties are also shown in the
redo panel in the 3D view.

Note that I also changed the bl_idname, as this is an example about
properties, not about dialogue boxes, and changed the class name to use
the standard operator naming convention.

I also extended the example to include a panel that sets multiple
properties of the operator, since I see questions about this relatively
frequently.

11 months agoCleanup: use sections for editmesh tools/select
Campbell Barton [Wed, 14 Mar 2018 06:25:23 +0000 (17:25 +1100)]
Cleanup: use sections for editmesh tools/select

11 months agoAPI generating script: give better version for releases builds.
Bastien Montagne [Tue, 13 Mar 2018 18:49:39 +0000 (19:49 +0100)]
API generating script: give better version for releases builds.

Was giving '2.62.1 <sha1>' even for releases, now rather giving nicer
'2.62a <sha1>' in that case.

11 months agoCleanup: pass selectmode directly
Campbell Barton [Tue, 13 Mar 2018 15:02:05 +0000 (02:02 +1100)]
Cleanup: pass selectmode directly

Pass instead of editmesh or toolsettings.
Needed for multi edit-mode

11 months agoCleanup: doxygen comments
Campbell Barton [Tue, 13 Mar 2018 14:58:46 +0000 (01:58 +1100)]
Cleanup: doxygen comments

11 months agoFix T54302 - Wrong added scene when adding a scene strip to the Sequencer
Joshua Leung [Tue, 13 Mar 2018 10:04:58 +0000 (23:04 +1300)]
Fix T54302 - Wrong added scene when adding a scene strip to the Sequencer

When adding scene strips to the sequencer, the wrong scenes were
getting getting added if some were skipped. For example:
Given 4 scenes (A, B, C, D) if you're trying to add the last 3 scenes
(B, C, D) as strips to the first scene (A), it would ended up adding
"A, B, C" instead of "B, C, D" as expected.

Fix provided by Andrew (signal9).

11 months agoUse Action datablock's own icon (instead of Animation Data's one) for File Browser...
Joshua Leung [Mon, 12 Mar 2018 12:44:03 +0000 (01:44 +1300)]
Use Action datablock's own icon (instead of Animation Data's one) for File Browser's lib icons

11 months agoCleanup: long lines, use doxy sections
Campbell Barton [Tue, 13 Mar 2018 07:06:05 +0000 (18:06 +1100)]
Cleanup: long lines, use doxy sections

11 months agoFix T54299: crash rendering objects with motion blur disabled, after recent changes.
Brecht Van Lommel [Mon, 12 Mar 2018 16:33:46 +0000 (17:33 +0100)]
Fix T54299: crash rendering objects with motion blur disabled, after recent changes.

11 months agoCycles: reorganize tests in more evenly distributed groups.
Brecht Van Lommel [Sun, 11 Mar 2018 21:43:15 +0000 (22:43 +0100)]
Cycles: reorganize tests in more evenly distributed groups.

11 months agoCycles: add constant folding to displacement nodes.
Brecht Van Lommel [Sun, 11 Mar 2018 21:42:38 +0000 (22:42 +0100)]
Cycles: add constant folding to displacement nodes.

11 months agoFix type in comment
Sergey Sharybin [Mon, 12 Mar 2018 16:03:54 +0000 (17:03 +0100)]
Fix type in comment

11 months agoDepsgraph: Make timing profile a command line option
Sergey Sharybin [Mon, 12 Mar 2018 16:01:02 +0000 (17:01 +0100)]
Depsgraph: Make timing profile a command line option

This way we can add even more statistics, even one which will be print
to the console.

Would be nice if we also have verbosity level control.

11 months agoFix T54296: Cycles viewport render stuck on constant re-render
Sergey Sharybin [Mon, 12 Mar 2018 09:49:07 +0000 (10:49 +0100)]
Fix T54296: Cycles viewport render stuck on constant re-render

Need Clear ID recalc flag on load. Otherwise it's possible to have
some IDs considered always updated by Cycles, when they were saved
in a tagged-for-update state.

Thanks Bastien for feedback and review!

11 months agoCleanup: remove misleading array size
Campbell Barton [Mon, 12 Mar 2018 05:37:26 +0000 (16:37 +1100)]
Cleanup: remove misleading array size

11 months agoCleanup: typo
Campbell Barton [Mon, 12 Mar 2018 05:35:31 +0000 (16:35 +1100)]
Cleanup: typo

11 months agoCleanup: sync EDBM_uv_* functions w/ 2.8
Campbell Barton [Mon, 12 Mar 2018 03:51:45 +0000 (14:51 +1100)]
Cleanup: sync EDBM_uv_* functions w/ 2.8

They're nearly the same, so keep names matching to avoid conflicts.

11 months agoUV: internal changes to picking
Campbell Barton [Mon, 12 Mar 2018 02:46:25 +0000 (13:46 +1100)]
UV: internal changes to picking

Nothing user visible, only things needed for multi-object support,
making picking functions more flexible too.

- Support passing in an initialized hit-struct,
  so it's possible to do multiple nearest calls on the same hit data.
- Replace manhattan distance w/ squared distance
  so they can be compared.
- Return success to detect changes to a hit-data
  which might already be initialized (also more readable).

11 months agofix Collada: wrong usage of pointer and hidden redeclaration
Gaia Clary [Sun, 11 Mar 2018 19:32:47 +0000 (20:32 +0100)]
fix Collada: wrong usage of pointer and hidden redeclaration

* Suspicious usage of pointer:

  short *type = 0; // this creates a null pointer

When this is later used for anything then blender would crash.
After following the code and check what happens i strongly believe
the author wanted to use a short and not a pointer to a short here.

* local variable where reused later in same function
While this did no harm, i still felt it was better to use a different
name here to make things more separated:

- moved variable declaraiotns into loop (for int a=0; ...)
- renamed uv_images to uv_image_set
- renamed index variable from i to j in inner loop that
  reused same index name from outer loop

11 months agoCleanup Collada: Removed duplicate variable setting
Gaia Clary [Sun, 11 Mar 2018 19:15:44 +0000 (20:15 +0100)]
Cleanup Collada: Removed duplicate variable setting

11 months agoCleanup: avoid redeclaration of iterator in same function
Gaia Clary [Sun, 11 Mar 2018 19:12:55 +0000 (20:12 +0100)]
Cleanup: avoid redeclaration of iterator in same function

The iterator was redeclared 3 times. I fixed this to avoid future issues.
I commit separately because so the changes are less cluttered all over
the place.

11 months agoCleanup Collada: Avoid unintentional reuse of previous defined variable
Gaia Clary [Sun, 11 Mar 2018 19:09:26 +0000 (20:09 +0100)]
Cleanup Collada: Avoid unintentional reuse of previous defined variable

The variable child was redeclared multiple times in the same function.
While this has not created any issues i still changed this to avoid
confusion and keep the usage of the variables more local.

11 months agoFix Collada: Avoid unnecessary and even wrong check on unavailable data
Gaia Clary [Sun, 11 Mar 2018 19:00:46 +0000 (20:00 +0100)]
Fix Collada: Avoid unnecessary and even wrong check on unavailable data

The function validateConstraints() potentially causes a null pointer
exception. I changed this so that the function returns a failure as soon
as the validation fails. This avoids falling into the null pointer trap.

11 months agoCleanup Collada: Make sure index variables are not reused
Gaia Clary [Sun, 11 Mar 2018 18:57:40 +0000 (19:57 +0100)]
Cleanup Collada: Make sure index variables are not reused

The variables i and j have been declared before in the same function.
I changed the names to mi and mj to keep things clear.

11 months agoCleanup Collada: make sure float array is initialised
Gaia Clary [Sun, 11 Mar 2018 18:51:16 +0000 (19:51 +0100)]
Cleanup Collada: make sure float array is initialised

This is just to silence a compiler warning and keeping
the code clean. The actual code never uses uninitialised
array elements.

11 months agoRefactor Collada: combined 2 almost identical functions into one
Gaia Clary [Sun, 11 Mar 2018 11:44:02 +0000 (12:44 +0100)]
Refactor Collada: combined 2 almost identical functions into one

The 2 methods add_bezt() and create_bezt() do almost the same.
I combined them both into add_bezt() and added the optional parameter
eBezTriple_Interpolation ipo

11 months agoFix T54274, and rename option --window-borderless to --window-fullscreen
Arto Kitula [Sun, 11 Mar 2018 10:26:43 +0000 (12:26 +0200)]
Fix T54274, and rename option --window-borderless to --window-fullscreen

11 months agoCleanup: long lines
Campbell Barton [Sun, 11 Mar 2018 04:50:07 +0000 (15:50 +1100)]
Cleanup: long lines

11 months agoCycles: add roughness baking support, using squared roughness convention.
Brecht Van Lommel [Sat, 10 Mar 2018 17:18:05 +0000 (18:18 +0100)]
Cycles: add roughness baking support, using squared roughness convention.

11 months agoCycles: switch to squared roughness convention for all nodes.
Brecht Van Lommel [Sat, 10 Mar 2018 15:09:22 +0000 (16:09 +0100)]
Cycles: switch to squared roughness convention for all nodes.

This was already done for the Principled BSDF to be compatible with typical
baked roughness maps in PBR workflows.

11 months agoCode cleanup: fix compiler warning.
Brecht Van Lommel [Sat, 10 Mar 2018 05:51:52 +0000 (06:51 +0100)]
Code cleanup: fix compiler warning.

11 months agoFix T54279: viewport update bug with volume meshes.
Brecht Van Lommel [Sat, 10 Mar 2018 05:10:14 +0000 (06:10 +0100)]
Fix T54279: viewport update bug with volume meshes.

Meshes without vertex normals were not handled correctly.

11 months agoCode refactor: reduce number of loops over meshes.
Brecht Van Lommel [Sat, 10 Mar 2018 04:45:49 +0000 (05:45 +0100)]
Code refactor: reduce number of loops over meshes.

11 months agoFix T54278: volume artifacts with small density and color after recent changes.
Brecht Van Lommel [Sat, 10 Mar 2018 04:03:03 +0000 (05:03 +0100)]
Fix T54278: volume artifacts with small density and color after recent changes.

11 months agoFix T54269: saved EXR file files unreadable some editors in Blender.
Brecht Van Lommel [Sat, 10 Mar 2018 03:33:14 +0000 (04:33 +0100)]
Fix T54269: saved EXR file files unreadable some editors in Blender.

Don't write the multichannel metadata when there is only a single layer,
and don't unnecessarily consider single layer images with Blender metadata
as multi layer.

11 months agoCode cleanup: use spaces for aligned indentation.
Brecht Van Lommel [Sat, 10 Mar 2018 02:57:18 +0000 (03:57 +0100)]
Code cleanup: use spaces for aligned indentation.

11 months agoCycles: support arbitrary number of motion blur steps for objects.
Brecht Van Lommel [Thu, 8 Mar 2018 03:04:52 +0000 (04:04 +0100)]
Cycles: support arbitrary number of motion blur steps for objects.

11 months agoCycles: support arbitrary number of motion blur steps for cameras.
Brecht Van Lommel [Sat, 10 Mar 2018 00:36:09 +0000 (01:36 +0100)]
Cycles: support arbitrary number of motion blur steps for cameras.

11 months agoCode refactor: motion blur cleanups, preparing for next commit.
Brecht Van Lommel [Fri, 9 Mar 2018 23:37:07 +0000 (00:37 +0100)]
Code refactor: motion blur cleanups, preparing for next commit.

11 months agoCode refactor: don't expose UpdateObjectTransformState in header.
Brecht Van Lommel [Sat, 10 Mar 2018 00:15:02 +0000 (01:15 +0100)]
Code refactor: don't expose UpdateObjectTransformState in header.

11 months agoCode refactor: make Transform always affine, dropping last row.
Brecht Van Lommel [Thu, 8 Mar 2018 05:48:14 +0000 (06:48 +0100)]
Code refactor: make Transform always affine, dropping last row.

This save a little memory and copying in the kernel by storing only a 4x3
matrix instead of a 4x4 matrix. We already did this in a few places, and
those don't need to be special exceptions anymore now.

11 months agoCode refactor: add DecomposedTransform.
Brecht Van Lommel [Thu, 8 Mar 2018 05:19:17 +0000 (06:19 +0100)]
Code refactor: add DecomposedTransform.

This is in preparation of making Transform affine only, and also gives us
a little extra type safety so we don't accidentally treat it as a regular
4x4 matrix.

11 months agoCode refactor: add ProjectionTransform separate from regular Transform.
Brecht Van Lommel [Thu, 8 Mar 2018 04:33:55 +0000 (05:33 +0100)]
Code refactor: add ProjectionTransform separate from regular Transform.

This is in preparation of making Transform affine only.

11 months agoCode refactor: avoid motion transform copy, remove unused curved code.
Brecht Van Lommel [Wed, 7 Mar 2018 22:52:26 +0000 (23:52 +0100)]
Code refactor: avoid motion transform copy, remove unused curved code.

The purpose of the previous code refactoring is to make the code more readable,
but combined with this change benchmarks also render about 2-3% faster with an
NVIDIA Titan Xp.

11 months agoCode refactor: use KernelShader and KernelParticle instead of float arrays.
Stefan Werner [Wed, 7 Mar 2018 23:35:24 +0000 (00:35 +0100)]
Code refactor: use KernelShader and KernelParticle instead of float arrays.

Original patch by Stefan with modifications by Brecht.

11 months agoCode refactor: use KernelLight instead of float4 arrays.
Stefan Werner [Wed, 7 Mar 2018 23:15:41 +0000 (00:15 +0100)]
Code refactor: use KernelLight instead of float4 arrays.

Original patch by Stefan with modifications by Brecht.

11 months agoCode refactor: use KernelOject struct instead of float4 array.
Stefan Werner [Wed, 7 Mar 2018 21:19:56 +0000 (22:19 +0100)]
Code refactor: use KernelOject struct instead of float4 array.

Original patch by Stefan with modifications by Brecht.

11 months agoDon't add "Report a Bug" button for official tracker to non-official add-ons
Julian Eisel [Fri, 9 Mar 2018 20:17:43 +0000 (21:17 +0100)]
Don't add "Report a Bug" button for official tracker to non-official add-ons

If no custom URL was set, add-ons would get a "Report a Bug" button opening
the default developer.blender.org bug tracker. Now we only add this default
button if the add-on is bundled and not installed by the user.

11 months agoFix Pose Lib: pose is applied when selected bones don't overlap with pose
Sybren A. Stüvel [Fri, 9 Mar 2018 18:03:29 +0000 (19:03 +0100)]
Fix Pose Lib: pose is applied when selected bones don't overlap with pose

Premise: When pose bones are selected, applying a pose library should
only affect the selected bones.

This commit fixes a bug where the pose was also applied when there was
no overlap between the selected bones and the bones in the pose. For
example, applying a pose which contains only keyframes for the left
hand, while only right-hand bones are selected, would apply the pose
to the left hand anyway.

The code is now also slightly more efficient; the removed 'selcount'
counter was only used as a binary (i.e. zero or non-zero). It's now
stored as a bitflag instead.

11 months agoFFmpeg: Add regression tests
Sergey Sharybin [Mon, 5 Mar 2018 14:32:49 +0000 (15:32 +0100)]
FFmpeg: Add regression tests

Currently only covering handful of files from reports about wrong fps detected.

It will need D3083 applied first to get tests passed, also tests themselves
are to be committed to svn.

But there are some python code which needs to be reviewed, like blendfile
passed to run_blender().

Reviewers: sybren, mont29

Reviewed By: sybren, mont29

Subscribers: mont29

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