blender.git
3 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 25 Feb 2019 09:28:40 +0000 (10:28 +0100)]
Merge branch 'blender2.7'

3 months agoFix T61891: Cycles light use nodes button greyed out.
Brecht Van Lommel [Mon, 25 Feb 2019 09:24:40 +0000 (10:24 +0100)]
Fix T61891: Cycles light use nodes button greyed out.

3 months agoFix T60880: Assert deleting grease pencil object from outliner
Campbell Barton [Mon, 25 Feb 2019 05:51:59 +0000 (16:51 +1100)]
Fix T60880: Assert deleting grease pencil object from outliner

3 months agowritefile: disable buffering when writing ZLIB
Campbell Barton [Mon, 25 Feb 2019 02:21:26 +0000 (13:21 +1100)]
writefile: disable buffering when writing ZLIB

While Buffering output is useful for file writing and memfile
compression it's redundant when the output is already buffered.
It doesn't make a significant difference for ZLIB
however it makes a moderate improvement for LZ4, see T56162.

3 months agoreadfile: re-enable read on demand for WIN32
Campbell Barton [Sun, 24 Feb 2019 21:54:10 +0000 (08:54 +1100)]
readfile: re-enable read on demand for WIN32

Revert workaround for T61855. It's likely this was caused by slow seek
for compressed files since the same behavior happens on Linux T61880.

3 months agoGP: Don't set cache as dirty with Onion
Antonioya [Sun, 24 Feb 2019 16:00:12 +0000 (17:00 +0100)]
GP: Don't set cache as dirty with Onion

3 months agoGP: Disable Onion calculation when Overlay is OFF
Antonioya [Sun, 24 Feb 2019 15:03:03 +0000 (16:03 +0100)]
GP: Disable Onion calculation when Overlay is OFF

Now, it's not required to disable the Onion in Overlay panel.

3 months agoreadfile: minor changes to support other compression formats
Campbell Barton [Sun, 24 Feb 2019 12:42:05 +0000 (23:42 +1100)]
readfile: minor changes to support other compression formats

Allow different readers to re-use the file descriptor.

3 months agoreadfile: Disable delayed data reading for compressed blend files
Campbell Barton [Sun, 24 Feb 2019 01:47:48 +0000 (12:47 +1100)]
readfile: Disable delayed data reading for compressed blend files

Seeking gzip files is very slow, disable it.

Resolves T61880

3 months agoreadfile: use regular file access when not a gzip
Campbell Barton [Sun, 24 Feb 2019 01:34:41 +0000 (12:34 +1100)]
readfile: use regular file access when not a gzip

Allows for different behavior w/ compressed files,
will also make it simpler to support other compression types,
see: T56162

3 months agoCleanup: de-duplicate readfile file opening
Campbell Barton [Sat, 23 Feb 2019 23:46:26 +0000 (10:46 +1100)]
Cleanup: de-duplicate readfile file opening

3 months agoGPUBuffer: Fix fast navigate in on smoooth multires grid
Clément Foucault [Sat, 23 Feb 2019 21:35:53 +0000 (22:35 +0100)]
GPUBuffer: Fix fast navigate in on smoooth multires grid

3 months agoFix strips text offset when zooming VSE timeline
Richard Antalik [Sat, 23 Feb 2019 19:37:24 +0000 (11:37 -0800)]
Fix strips text offset when zooming VSE timeline

Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw

This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].

3 months agoRevert "Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but...
Richard Antalik [Sat, 23 Feb 2019 19:33:48 +0000 (11:33 -0800)]
Revert "Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw"

Accidentaly committed unwanted changes.

This reverts commit 6bcdcc96c2548e0ee5e18acc37915aedee6329e0.

3 months ago fix T61122 : Collada Importer: Added support for transparency for Materials.
Gaia Clary [Sat, 23 Feb 2019 18:35:31 +0000 (19:35 +0100)]
 fix T61122 : Collada Importer: Added support for transparency for Materials.

 This fix sets the Base color in the principled BSDF Shader and in
 the Material->r,g,b,a values. So the transparency and color are the
 same when switching the "use nodes" option for the material

3 months agofix T61122 : Added support for Materials with Nodes disabled.
Gaia Clary [Sat, 23 Feb 2019 17:15:21 +0000 (18:15 +0100)]
fix T61122 : Added support for Materials with Nodes disabled.

- The Collada exporter did not take care of
  material transparency when nodes are turned off.

- recent change to use ma->alpha_threshold seems to have
  been wrong. transparency is now taken from ma->a when
  nodes are turned off.

3 months agofix T59951: View all sequences does not take into account region overlap
Richard Antalik [Sat, 23 Feb 2019 14:16:52 +0000 (06:16 -0800)]
fix T59951: View all sequences does not take into account region overlap
fix centering preview

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4388

3 months agoGlyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is requir...
Richard Antalik [Sat, 23 Feb 2019 14:14:44 +0000 (06:14 -0800)]
Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw

This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4389

3 months agoCleanup: GCC redundant declarations
Campbell Barton [Sat, 23 Feb 2019 11:16:32 +0000 (22:16 +1100)]
Cleanup: GCC redundant declarations

Previous waning suppression was only tested with clang.

3 months agoGP: Define new Draw Mode
Antonioya [Sat, 23 Feb 2019 10:34:23 +0000 (11:34 +0100)]
GP: Define new Draw Mode

Add a new Draw Mode to display panel in order to define the z-.depth order of the strokes using the real 3D position and not the 2D layer position.

This change makes possible to use VR with grease pencil drawings because the depth of the strokes change with camera position. Also, provide an alternative solution to tasks: T57859, T60325,

The parameter only works with 3D space depth ordering. The Back and Front depths are incompatible with 3D Space mode.

Options are:
- Back
- Front
- 3D Space->2D Layers (default)
-3D Space->3D Location (new mode)

3 months agoCleanup: quiet undeclared variable warnings
Campbell Barton [Sat, 23 Feb 2019 08:17:30 +0000 (19:17 +1100)]
Cleanup: quiet undeclared variable warnings

3 months agoCleanup: quiet undeclared variable warning
Campbell Barton [Sat, 23 Feb 2019 08:16:28 +0000 (19:16 +1100)]
Cleanup: quiet undeclared variable warning

3 months agoCleanup: quiet undeclared variable warning
Campbell Barton [Sat, 23 Feb 2019 07:31:45 +0000 (18:31 +1100)]
Cleanup: quiet undeclared variable warning

Also move view_ubo into G_draw.

3 months agoCleanup: quiet undeclared variable warning
Campbell Barton [Sat, 23 Feb 2019 07:29:03 +0000 (18:29 +1100)]
Cleanup: quiet undeclared variable warning

Move bpy_context_module declaration to bpy_rna.h.

3 months agoCleanup: use specific names for global variables
Campbell Barton [Sat, 23 Feb 2019 06:47:33 +0000 (17:47 +1100)]
Cleanup: use specific names for global variables

hash & hashsizes are generic names, be more specific & define the
generic names locally.

Quiet undeclared variable warnings.

3 months agoCleanup: use function instead of extern variable
Campbell Barton [Sat, 23 Feb 2019 06:23:03 +0000 (17:23 +1100)]
Cleanup: use function instead of extern variable

Quiet undeclared variable warning.

3 months agomake.bat: Preliminary Visual Studio 2019 support.
Ray Molenkamp [Sat, 23 Feb 2019 03:49:22 +0000 (20:49 -0700)]
make.bat: Preliminary Visual Studio 2019 support.

VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre

3 months agoMake.bat: Fix sub-module detection
Ray Molenkamp [Sat, 23 Feb 2019 03:02:45 +0000 (20:02 -0700)]
Make.bat: Fix sub-module detection

3 months agomake.bat: Preliminary Visual Studio 2019 support.
Ray Molenkamp [Sat, 23 Feb 2019 03:49:22 +0000 (20:49 -0700)]
make.bat: Preliminary Visual Studio 2019 support.

VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre

3 months agoMake.bat: Fix sub-module detection
Ray Molenkamp [Sat, 23 Feb 2019 03:02:45 +0000 (20:02 -0700)]
Make.bat: Fix sub-module detection

3 months agoCleanup: move variable declarations to headers
Campbell Barton [Sat, 23 Feb 2019 01:58:39 +0000 (12:58 +1100)]
Cleanup: move variable declarations to headers

Quiet undeclared variable warning.

3 months agoreadfile: disable delayed data reading for WIN32
Campbell Barton [Fri, 22 Feb 2019 22:21:12 +0000 (09:21 +1100)]
readfile: disable delayed data reading for WIN32

Seeking the file causes slow down on Windows.

Resolves T61855

3 months agoFix: Workbench assert on non-image texture node
Dalai Felinto [Fri, 22 Feb 2019 21:00:45 +0000 (18:00 -0300)]
Fix: Workbench assert on non-image texture node

This was not report, but it would happen if you open the sample file
from T61858 and changed to solid view with texture.

3 months agoCleanup: Remove redudant function call
Dalai Felinto [Fri, 22 Feb 2019 19:40:57 +0000 (16:40 -0300)]
Cleanup: Remove redudant function call

BKE_main_id_clear_newpoints is already called from copy_object_set_idnew().

3 months agoFix T61837: Assert in Eevee multiresolution modfier in sculpt mode
Clément Foucault [Fri, 22 Feb 2019 16:14:08 +0000 (17:14 +0100)]
Fix T61837: Assert in Eevee multiresolution modfier in sculpt mode

Note that this commit remove the support (that was not really working)
for shadows in sculpt mode.

3 months agoMultires: Support smooth shading when sculpting
Sergey Sharybin [Fri, 22 Feb 2019 15:56:54 +0000 (16:56 +0100)]
Multires: Support smooth shading when sculpting

On CCG side it is done similar to displacement, where we have
a dedicated functor which evaluates displacement. Might be seemed
as an overkill, but allows to decouple SubdivCCG from mesh entirely,
and maybe even free up coarse mesh in order to save some memory.

Some weak-looking aspect is the call to update normals from the
draw manager. Ideally, the manager will only draw what is already
evaluated. But it's a bit tricky to find a best place for this since
we avoid dependency graph updates during sculpt as much as possible.
The new code mimics the old code, this is how it was in 2.7.

Fix shading part of T58307.

3 months agoFix T55921: Toggling visibility for collections doesn't work in Pose
Dalai Felinto [Fri, 22 Feb 2019 15:33:24 +0000 (12:33 -0300)]
Fix T55921: Toggling visibility for collections doesn't work in Pose

It is always dangerous to add more shortcuts those days. But this way it
is consistent with 2.79 to a point.

When in edit mode (mesh, greasepencil, ...) 1-3 to change submode still
has priority.

When in posemode or greasepencil draw mode however, 1-9 can still be
used to temporarily get some collections out of the way.

3 months agoWireframe: Add object and random coloring option in wireframe mode
Clément Foucault [Fri, 22 Feb 2019 15:06:13 +0000 (16:06 +0100)]
Wireframe: Add object and random coloring option in wireframe mode

The option is separated from the solid mode color option.

Random color uses the same method as solid mode.

Selection state is indicated by a brighter color that is outside the
brightness range of the unselected state colors. The active state is
indicated by the outlines that is, now, still drawn in wireframe mode.

Coloring of the selection / active outline is not optimal because it
can look ugly in some cases of color combination. But the outline color
is using index range coloring so it's not trivial to change the color of
the outline per object. For now we use the same outline color used in solid
mode for consistency and also still add an emphasis on the selected objects.

The Single color option uses the theme color. Maybe it would be nice to
change the name of it in a latter commit to avoid confusion.

3 months agoFix T61788: Hidden objects reappear after rendering
Dalai Felinto [Fri, 22 Feb 2019 14:13:36 +0000 (11:13 -0300)]
Fix T61788: Hidden objects reappear after rendering

The change in outliner and viewport visibility (897e047374fa) was made
assuming the bases of the render and viewport depsgraph were
independent. Thus we were deliberately setting base visibility when
rendering:

```
/* When rendering, visibility is controlled by the enable/disable option. */
if (mode == DAG_EVAL_RENDER) {
    base->flag |= BASE_VISIBLE;
}
```

However, we were syncing data back to the original depsgraph, leading to
hidden viewport objects to re-appear.

Reviewers: sergey

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

3 months agoMerge branch 'blender2.7'
Sergey Sharybin [Fri, 22 Feb 2019 14:53:44 +0000 (15:53 +0100)]
Merge branch 'blender2.7'

3 months agoFix previous commit
Sergey Sharybin [Fri, 22 Feb 2019 14:52:42 +0000 (15:52 +0100)]
Fix previous commit

Somehow quote got missing the last moment.

3 months agoMerge branch 'blender2.7'
Sergey Sharybin [Fri, 22 Feb 2019 14:50:36 +0000 (15:50 +0100)]
Merge branch 'blender2.7'

3 months agoAlways show version when running in background mode
Sergey Sharybin [Fri, 22 Feb 2019 14:47:54 +0000 (15:47 +0100)]
Always show version when running in background mode

The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.

3 months agoFix T61600: Physics properties inactive when appending objects
Dalai Felinto [Tue, 19 Feb 2019 22:33:31 +0000 (19:33 -0300)]
Fix T61600: Physics properties inactive when appending objects

This problem existed in 2.79 as well. The rigid body setting is related
to the scene the object was created.

We now clear all the rigid body properties of the appended objects to
prevent them from lingering in this state where they have settings yet
cannot be used in the simulation.

Reviewers: mont29, brecht

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

3 months agoMultires: Don't force smooth shading
Sergey Sharybin [Fri, 22 Feb 2019 13:45:32 +0000 (14:45 +0100)]
Multires: Don't force smooth shading

There is still work needed to be done from multires side to fully
support smooth shading. So can't just always have smooth shading.

Roll back to a proper code in GPU side, the rest will be handled
from CCG side.

3 months agoMultires: Fix ownership problem causing crashes
Sergey Sharybin [Fri, 22 Feb 2019 12:33:16 +0000 (13:33 +0100)]
Multires: Fix ownership problem causing crashes

Fixes crash when leaving multires mode.

Fixes T61836: Saving while in multires makes blender crash

3 months agoRevert "makesrna: Fix build error on windows."
Campbell Barton [Fri, 22 Feb 2019 08:43:21 +0000 (19:43 +1100)]
Revert "makesrna: Fix build error on windows."

This reverts commit 8b235dd2e3995a61e2a7db1ac2bc9eefe1394456.

3 months agoC logging: make pthread use optional
Campbell Barton [Fri, 22 Feb 2019 08:36:36 +0000 (19:36 +1100)]
C logging: make pthread use optional

There is no need for threading for makesrna/makesdna,
disable it to avoid hassles linking build time utilities.

3 months agoCleanup: function wrapping, spelling
Campbell Barton [Fri, 22 Feb 2019 07:35:07 +0000 (18:35 +1100)]
Cleanup: function wrapping, spelling

3 months agoComments: add doxy sections to readfile.c
Campbell Barton [Fri, 22 Feb 2019 07:15:56 +0000 (18:15 +1100)]
Comments: add doxy sections to readfile.c

Some minor changes to arrange code into useful sections too.

3 months agoreadfile: support blend files over 2gb
Campbell Barton [Fri, 22 Feb 2019 05:56:22 +0000 (16:56 +1100)]
readfile: support blend files over 2gb

Should work for 4gb+ files too however I wasn't able to test that.

3 months agoreadfile: reduce memory usage at load time
Campbell Barton [Fri, 22 Feb 2019 03:42:22 +0000 (14:42 +1100)]
readfile: reduce memory usage at load time

Delay loading all DATA sections of the blend file until they're needed.

Loading all data-blocks caused high peak memory usage especially with
libraries - since a lot of data may exist which isn't used directly.

In one test (spring project: 10_010_A.anim.blend),
peaked at ~12.5gig, dropping back to ~2.5gig once loaded.
With this change peaks memory usage reaches ~2.7gig while loading.

Besides this there are some minor gains from not having to read data
from the file-system and we can skip an alloc + memcpy reading data
written with the same version of Blender.

3 months agoCleanup: rename seek to file_offset
Campbell Barton [Fri, 22 Feb 2019 03:04:05 +0000 (14:04 +1100)]
Cleanup: rename seek to file_offset

Prepare for seek callback to be added.

3 months agoSculpt Overlay: Fix mask drawn as flat shaded when smooth shading enabled
Clément Foucault [Fri, 22 Feb 2019 03:03:22 +0000 (04:03 +0100)]
Sculpt Overlay: Fix mask drawn as flat shaded when smooth shading enabled

Removes the flat shader variant since the attrib is specified for each vert
loop in flat shaded mode. It was something leftover from the previous
implementation.

3 months agoGPUBuffers: Fix/cleanup multires implementation
Clément Foucault [Fri, 22 Feb 2019 03:00:19 +0000 (04:00 +0100)]
GPUBuffers: Fix/cleanup multires implementation

The multires sculpt drawing was a not working in smooth mode.
Also hidding was not supported by the wireframe overlay and flat shaded
faces.

Codewise it is cleaner and index buffers are only updated if the
smoothing changes.

3 months agoCleanup: make BHeadN private in readfile.c
Campbell Barton [Fri, 22 Feb 2019 02:46:44 +0000 (13:46 +1100)]
Cleanup: make BHeadN private in readfile.c

Also add macro for accessing BHeadN from BHead.

3 months agoMissed last commit
Campbell Barton [Thu, 21 Feb 2019 23:40:17 +0000 (10:40 +1100)]
Missed last commit

Harmless but not renamed as intended.

3 months agoCleanup: rename readfile API functions
Campbell Barton [Thu, 21 Feb 2019 23:31:17 +0000 (10:31 +1100)]
Cleanup: rename readfile API functions

- blo_bhead_first (was blo_firstbhead)
- blo_bhead_next (was blo_nextbhead)
- blo_bhead_prev (was blo_prevbhead)
- blo_bhead_id_name (was bhead_id_name)
- blo_filedata_free (was blo_freefiledata)
- blo_filedata_from_file (was blo_openblenderfile)
- blo_filedata_from_memory (was blo_openblendermemory)
- blo_filedata_from_memfile (was blo_openblendermemory)

3 months agoMissed last commit
Campbell Barton [Thu, 21 Feb 2019 22:34:00 +0000 (09:34 +1100)]
Missed last commit

3 months agoCleanup: comments, use bool for 'eof' variable
Campbell Barton [Thu, 21 Feb 2019 22:21:23 +0000 (09:21 +1100)]
Cleanup: comments, use bool for 'eof' variable

Also remove unused members headerdone, inbuffer & filedes,
use typed enum for file data flags.

3 months agoTransform: redo resize now constrains axis values
Campbell Barton [Thu, 21 Feb 2019 21:42:08 +0000 (08:42 +1100)]
Transform: redo resize now constrains axis values

Before 1bfbfa281046b this wasn't essential because the constraints
prevented the axes from being applied.

Now redo ignores constraints - the input values must be constrained.

3 months agomakesrna: Remove usage of dynamically linked pthreads4w
Ray Molenkamp [Thu, 21 Feb 2019 21:21:31 +0000 (14:21 -0700)]
makesrna: Remove usage of dynamically linked pthreads4w

With pthreads now being static, there is no more reason to copy the dll.

3 months agoWindows: Use static pthreads library.
Ray Molenkamp [Thu, 21 Feb 2019 21:16:26 +0000 (14:16 -0700)]
Windows: Use static pthreads library.

3 months agoWindows: Use static pthreads library.
Ray Molenkamp [Thu, 21 Feb 2019 21:16:26 +0000 (14:16 -0700)]
Windows: Use static pthreads library.

3 months agoUI: enum property menus now expand down, consistent with other menus.
Mikhail Rachinskiy [Thu, 21 Feb 2019 17:16:25 +0000 (18:16 +0100)]
UI: enum property menus now expand down, consistent with other menus.

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

3 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Thu, 21 Feb 2019 17:04:02 +0000 (18:04 +0100)]
Merge branch 'blender2.7'

3 months agoUI: better widget drawing with thick line width.
Harley Acheson [Thu, 21 Feb 2019 16:34:48 +0000 (17:34 +0100)]
UI: better widget drawing with thick line width.

When the line width was larger than the UI scale, there was not enough
space for thicker widget outlines to draw properly. Now widgets are made
a little larger to accommodate the thicker outlines.

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

3 months agoUI: improve corner splitting feedback by showing custom cursors.
Harley Acheson [Thu, 21 Feb 2019 16:22:51 +0000 (17:22 +0100)]
UI: improve corner splitting feedback by showing custom cursors.

* Two cursors for horizontal and vertical split.
* Four cursors for each join direction.
* One cursor to indicate when splitting is not possible.

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

3 months agoUI: increase corner splitting hit area to include screen edges.
Harley Acheson [Thu, 21 Feb 2019 16:04:20 +0000 (17:04 +0100)]
UI: increase corner splitting hit area to include screen edges.

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

3 months agomakesrna: Fix windows build.
Ray Molenkamp [Thu, 21 Feb 2019 17:02:54 +0000 (10:02 -0700)]
makesrna: Fix windows build.

makesrna requires the pthread dll to be available before it can run.

3 months agoFix T60646: From instancer texture coordinate doesn't work in viewport
Sergey Sharybin [Thu, 21 Feb 2019 16:25:34 +0000 (17:25 +0100)]
Fix T60646: From instancer texture coordinate doesn't work in viewport

Made it so that generated coordinate is always calculated.

Ideally, it will only be done depending on a current  shading,
but code is quite deep, and doing smarter thing here will end
up in way bigger refactor.

First, make things working, and then make them fast if they
pop up in a profiles.

3 months agoFix T61810: Cycles OpenCL denoising broken after recent changes.
Brecht Van Lommel [Thu, 21 Feb 2019 15:46:42 +0000 (16:46 +0100)]
Fix T61810: Cycles OpenCL denoising broken after recent changes.

3 months agoCycles OpenCL: Motion Blur Compile Directives
Jeroen Bakker [Thu, 21 Feb 2019 12:31:52 +0000 (13:31 +0100)]
Cycles OpenCL: Motion Blur Compile Directives

When using preview rendering through a camera or final rendering
the `scene.render.use_motion_blur` was not respected when building
the compile directives.

This patch will when building the compile directives check if
motion blur is enabled at all. This should lead to more efficient
kernels when no motion blur is needed.

Tags: #cycles

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

3 months agoFix for Fix (c) T61787: Duplicating a collection instance does not duplicate the...
Bastien Montagne [Thu, 21 Feb 2019 15:14:34 +0000 (16:14 +0100)]
Fix for Fix (c) T61787: Duplicating a collection instance does not duplicate the dupli_group.

Wrong logic in bitflags handling in own previous commit...

3 months agoFix (unreported) Broken DataTransfer modifier when source object is in Edit mode.
Bastien Montagne [Thu, 21 Feb 2019 14:48:29 +0000 (15:48 +0100)]
Fix (unreported) Broken DataTransfer modifier when source object is in Edit mode.

Just use common API func to get evaluated mesh of other object in
modifiers, instead of doing our own cooking. ;)

3 months agoFix T61787: Duplicating a collection instance does not duplicate the dupli_group.
Bastien Montagne [Thu, 21 Feb 2019 14:37:28 +0000 (15:37 +0100)]
Fix T61787: Duplicating a collection instance does not duplicate the dupli_group.

Transfomr init code called just after duplication (presumably before
regular depsgraph update is executed) would erase new objects'
transflags.

This is more like a hack than a real fix, but since that transform piece
of code is already a hack... Other solution would have been to force DEG
to run after object duplication, think it's better to go with that
solution for now.

Not to mention to fact that dupli flags are put into transflag... ;)

3 months agoCleanup: typos in comments.
Bastien Montagne [Thu, 21 Feb 2019 14:32:52 +0000 (15:32 +0100)]
Cleanup: typos in comments.

3 months agoFix T59338: Blender crashes immediately after loading attached file in ~80% of my...
Bastien Montagne [Wed, 20 Feb 2019 15:59:04 +0000 (16:59 +0100)]
Fix T59338: Blender crashes immediately after loading attached file in ~80% of my attempts.

Issue was a concurrent modification of an evaluated mesh by two
other meshes using it as source for custom normals data transfer.

Note that this fixes the crash (modifiers are strictly forbidden to modify
any data besides their own!), but now will have to add a new CD type to
be able to specifically request 'computed' clnors data layer, and not
only 'encoded' one, for source mesh...

3 months agoMerge branch 'blender2.7'
Sergey Sharybin [Thu, 21 Feb 2019 14:33:07 +0000 (15:33 +0100)]
Merge branch 'blender2.7'

3 months agoFix T61802: EXR preview JPEGs don't have the correct color
Sergey Sharybin [Thu, 21 Feb 2019 14:29:02 +0000 (15:29 +0100)]
Fix T61802: EXR preview JPEGs don't have the correct color

Missing color management, probably from the very beginnings of
the OCIO integration.

3 months agoSubdiv: Enable topology cache for animation
Sergey Sharybin [Thu, 21 Feb 2019 14:15:10 +0000 (15:15 +0100)]
Subdiv: Enable topology cache for animation

This commit makes it so both Subdivision Surface and Multiresolution
modifiers are caching OpenSubdiv topology. This cuts down evaluation
time quite a bit, especially for meshes which don't have many extra
ordinary verticies.

Only working for animation. Other modifications like edit mode needs
more work to make topology cache preserved by copy-on-write.

3 months agoFix: Missing closing brackets in include
Jeroen Bakker [Thu, 21 Feb 2019 13:36:51 +0000 (14:36 +0100)]
Fix: Missing closing brackets in include

3 months agoFix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.
John Quillan [Thu, 21 Feb 2019 12:26:22 +0000 (13:26 +0100)]
Fix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.

It was copying the alpha from the foreground instead of background image,
which is not usually what is needed and inconsistent with the compositor.

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

3 months agoFix T61791: Motion path step is not taken into account
Jacques Lucke [Thu, 21 Feb 2019 12:28:21 +0000 (13:28 +0100)]
Fix T61791: Motion path step is not taken into account

3 months agoFix T61786: local view not exiting correctly after recent changes.
Brecht Van Lommel [Thu, 21 Feb 2019 10:32:52 +0000 (11:32 +0100)]
Fix T61786: local view not exiting correctly after recent changes.

3 months agoTransform: remove constraints from the redo panel
Campbell Barton [Thu, 21 Feb 2019 10:52:56 +0000 (21:52 +1100)]
Transform: remove constraints from the redo panel

Constraint options had confusing behavior:

- When non were pressed, the orientation was ignored.
- When any were pressed, the orientation was used,
  but only unconstrained axed could be adjusted.

Now constraining is only used for modal execution
so there is no need to show these in the interface.

When an orientation is selected, the XYZ values always transform
using that space.

Note, transform system should be refactored to support different
orientations w/o having to use constraints.

Addresses T57204

3 months agoCleanup: Line wrapping
Sergey Sharybin [Thu, 21 Feb 2019 10:08:33 +0000 (11:08 +0100)]
Cleanup: Line wrapping

3 months agoClip: Check memory allocation during prefetch
Sergey Sharybin [Thu, 21 Feb 2019 09:52:03 +0000 (10:52 +0100)]
Clip: Check memory allocation during prefetch

Aimed to make prefetching more stable for cases when
it causes Blender to run out of memory.

3 months agoCodestyle: Indentation
Jeroen Bakker [Thu, 21 Feb 2019 07:52:04 +0000 (08:52 +0100)]
Codestyle: Indentation

3 months agoFix: OpenCL Displacement and light sampling
Jeroen Bakker [Thu, 21 Feb 2019 07:11:02 +0000 (08:11 +0100)]
Fix: OpenCL Displacement and light sampling

The bake kernels are also used during mesh displacement and light
importance sampling. We disabled the implementation of these kernels
when baking was not enabled.

3 months agoFix redo regression w/ transform constraints
Campbell Barton [Thu, 21 Feb 2019 06:51:02 +0000 (17:51 +1100)]
Fix redo regression w/ transform constraints

Adjusting a constrained transform would always use global space.

3 months agoFix transform reading all ob-data as a mesh
Campbell Barton [Thu, 21 Feb 2019 06:27:57 +0000 (17:27 +1100)]
Fix transform reading all ob-data as a mesh

3 months agoTool: Use scale keymap for scale cage tool
Campbell Barton [Thu, 21 Feb 2019 05:42:59 +0000 (16:42 +1100)]
Tool: Use scale keymap for scale cage tool

Needed so clicking anywhere performs uniform scale.

3 months agoTheme: update blender-light theme clipping border
Campbell Barton [Thu, 21 Feb 2019 05:08:44 +0000 (16:08 +1100)]
Theme: update blender-light theme clipping border

Color was too dark compared to the background color.

3 months agomakesrna: Fix build error on windows.
Ray Molenkamp [Thu, 21 Feb 2019 04:56:11 +0000 (21:56 -0700)]
makesrna: Fix build error on windows.

rB94f83a4ebd929e7c4f405b1c78d9db842dfe1689 introduced a dependency on pthreads
but did not add it to the linker inputs.

3 months agoKeymap: add context menus for paint modes
Campbell Barton [Thu, 21 Feb 2019 04:43:39 +0000 (15:43 +1100)]
Keymap: add context menus for paint modes

These are place-holders with only a few items in each, as with the rest
of the context menus they need to be populated & organized.

Weight Paint 'weight' shortcut has been changed from W to Ctrl-F,
to co-exist w/ the context menu shortcut.

3 months agoFix assert w/ multi-dimensional array printing
Campbell Barton [Thu, 21 Feb 2019 03:46:54 +0000 (14:46 +1100)]
Fix assert w/ multi-dimensional array printing

Own oversight adding assert, result from MEM_allocN_len may be padded.

3 months agoKeymap: Ctrl-Home/End to set start/end frame
Campbell Barton [Thu, 21 Feb 2019 03:37:14 +0000 (14:37 +1100)]
Keymap: Ctrl-Home/End to set start/end frame

New shortcuts for the dope-sheet.

3 months agoFix T61563: Info space prints matrices as flat tuple
Sebastian Parborg [Thu, 21 Feb 2019 01:30:47 +0000 (12:30 +1100)]
Fix T61563: Info space prints matrices as flat tuple

Add support for printing multi-dimensional arrays.

3 months agoFix T61765: thread-unsafe logging used
Campbell Barton [Thu, 21 Feb 2019 00:31:00 +0000 (11:31 +1100)]
Fix T61765: thread-unsafe logging used