18 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Fri, 18 Jan 2019 20:00:24 +0000 (21:00 +0100)]
Merge branch 'blender2.7'

18 months agoFix T60627: Cycles render hanging on Windows with threadripper CPU.
Sergey Sharybin [Fri, 18 Jan 2019 18:45:39 +0000 (19:45 +0100)]
Fix T60627: Cycles render hanging on Windows with threadripper CPU.

18 months agoFix T60585: Cycles not using all cores on threadripper, after recent changes.
Brecht Van Lommel [Fri, 18 Jan 2019 18:15:38 +0000 (19:15 +0100)]
Fix T60585: Cycles not using all cores on threadripper, after recent changes.

18 months agoFix T60585: Cycles not using all cores on threadripper, after recent changes.
Brecht Van Lommel [Fri, 18 Jan 2019 18:15:38 +0000 (19:15 +0100)]
Fix T60585: Cycles not using all cores on threadripper, after recent changes.

18 months agoAdd miter pattern options.
Howard Trickey [Fri, 18 Jan 2019 17:54:10 +0000 (12:54 -0500)]
Add miter pattern options.

Will document the new options in release notes, then in manual.
Still a bit of work to do on the bulging shape that appears
on cube corners if using arc inner miters, but will do that later.
Also need to do something smarter in clamp overlap.

18 months agoFix T60615: Cycles baking not working with some modifiers.
Brecht Van Lommel [Tue, 15 Jan 2019 12:03:09 +0000 (13:03 +0100)]
Fix T60615: Cycles baking not working with some modifiers.

Refactors Cycles mesh export a bit to avoid unnecessary copies and to be in
sync with the Blender baker.

18 months agoGP: Guides: Fix bug with Mkey and Circular guides
Charlie Jolly [Fri, 18 Jan 2019 15:50:16 +0000 (15:50 +0000)]
GP: Guides: Fix bug with Mkey and Circular guides

Reported by @pepeland.

Adding missing events on the first point was breaking the guide behaviour.
Also, updated Ckey so it always defaults to Circular mode when guides are off.

18 months agoView 3D Grid: Improve precision and reduce code complexity
Clément Foucault [Fri, 18 Jan 2019 15:29:52 +0000 (16:29 +0100)]
View 3D Grid: Improve precision and reduce code complexity

Instead of doing manual ray-plane intersection we use normalized positions
of the grid mesh and apply scaling after interpolation so that we keep
good precision even at really far distances.

Precision is now two order of magnitude better and does not produce the
same kind of artifact at lower clip start values.

This commit also cleanup the implementation.

Fixes T58918 Grid not appearing correctly at low clip start in 2.8

18 months agoPreferences: assortment of minor layout tweaks.
Brecht Van Lommel [Fri, 18 Jan 2019 10:31:26 +0000 (11:31 +0100)]
Preferences: assortment of minor layout tweaks.

18 months agoCycles: Fixed uninitialized memory
Stefan Werner [Fri, 18 Jan 2019 14:16:11 +0000 (15:16 +0100)]
Cycles: Fixed uninitialized memory

Cryptomatte on CPU with accurate mode was hitting uninitialized variables.
This is now explicitly initializing them to NULL.

18 months agoFix/workaround: Undo erase all dyntopo changes
Campbell Barton [Fri, 18 Jan 2019 13:48:00 +0000 (00:48 +1100)]
Fix/workaround: Undo erase all dyntopo changes

Memfile undo isn't compatible with sculpt or edit-mode.

This didn't work in 2.7x, so best disable memfile undo for now in
situations where it's going to loose data or crash.

18 months agoFix loading a file saved w/ dyntopo
Campbell Barton [Fri, 18 Jan 2019 12:15:22 +0000 (23:15 +1100)]
Fix loading a file saved w/ dyntopo

Ensure ED_editors_init doesn't create any undo steps
before the initial memfile undo is written.

18 months agoFix undo push entering sculpt mode
Campbell Barton [Fri, 18 Jan 2019 12:15:00 +0000 (23:15 +1100)]
Fix undo push entering sculpt mode

18 months agoCleanup: remove unnecessary CUDA architecture sm_72, it's for Tegra chips.
Brecht Van Lommel [Fri, 18 Jan 2019 11:38:19 +0000 (12:38 +0100)]
Cleanup: remove unnecessary CUDA architecture sm_72, it's for Tegra chips.

18 months agoSubdiv CCG: Cleanup, comments
Sergey Sharybin [Fri, 18 Jan 2019 10:28:38 +0000 (11:28 +0100)]
Subdiv CCG: Cleanup, comments

18 months agoMultires: Correct averaging
Sergey Sharybin [Thu, 17 Jan 2019 17:09:47 +0000 (18:09 +0100)]
Multires: Correct averaging

Before that only normal component was averaged, which is not
really correct.

Unfortunately, the new code is somewhat slower due to more
involved math to deal properly with non-quad faces, but the
plan is to move averaging from runtime to edit time, This
means, that mdisps will always be continuous around the edges
and no averaging on every frame change of animated character
will be needed.

18 months agoMath: Make it possible to use vector for both input and output
Sergey Sharybin [Thu, 17 Jan 2019 14:41:27 +0000 (15:41 +0100)]
Math: Make it possible to use vector for both input and output

Avoids nasty code all over where such math is required, and
compilers can easily deal with such situation.

Don't prefer questionable micro-optimization which comes with
a cost of nasty actual logic code.

18 months agoMultires: Ensure continuity when reshaping from object
Sergey Sharybin [Thu, 17 Jan 2019 14:08:41 +0000 (15:08 +0100)]
Multires: Ensure continuity when reshaping from object

18 months agoSubdiv: Fix wrong corner passed to a callback
Sergey Sharybin [Thu, 17 Jan 2019 11:55:51 +0000 (12:55 +0100)]
Subdiv: Fix wrong corner passed to a callback

18 months agoMultires: Simplify reshaping code
Sergey Sharybin [Thu, 17 Jan 2019 11:06:26 +0000 (12:06 +0100)]
Multires: Simplify reshaping code

The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid

While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.

18 months agoMultires: Correct function name, to match behavior
Sergey Sharybin [Thu, 17 Jan 2019 10:17:15 +0000 (11:17 +0100)]
Multires: Correct function name, to match behavior

18 months agoMultires: Fix spike issues when sculpting on triangles
Sergey Sharybin [Thu, 17 Jan 2019 09:49:43 +0000 (10:49 +0100)]
Multires: Fix spike issues when sculpting on triangles

The boundary copy code was not dealing correct with flipping
tangent vectors, hence causing discontinuity in the final

Now we only copy boundaries for quads, where we know how to
deal with tangent vectors and where we know that this is

More clear solution could be to change the code in a way that
handles handles displacement grids of quads in the same way
as it's done for non-quad faces.

18 months agoMultires: Cleanup, move utility function to a more public place
Sergey Sharybin [Thu, 17 Jan 2019 09:47:14 +0000 (10:47 +0100)]
Multires: Cleanup, move utility function to a more public place

18 months agoMultires: Cleanup, more clear naming
Sergey Sharybin [Thu, 17 Jan 2019 09:41:40 +0000 (10:41 +0100)]
Multires: Cleanup, more clear naming

18 months agoGP: Create materials when separate active layer
Antonioya [Fri, 18 Jan 2019 09:52:38 +0000 (10:52 +0100)]
GP: Create materials when separate active layer

The materials were not created when used the active layer option of the separate operator.

18 months agoDRW: Increase frustum culling precision
Clément Foucault [Fri, 18 Jan 2019 09:22:11 +0000 (10:22 +0100)]
DRW: Increase frustum culling precision

Use normal_quad_v3 instead of normal_tri_v3 and compute the mean of all
corner distance during frustum plane extraction.

Fix T58243 Flickering of viewport when rotating and zooming

18 months agoDRW: Fix assert when using draw debug API
Clément Foucault [Fri, 18 Jan 2019 08:58:04 +0000 (09:58 +0100)]
DRW: Fix assert when using draw debug API

18 months agoFix T60608: Popup dialogs Y-axis reset after drag
Campbell Barton [Fri, 18 Jan 2019 05:55:18 +0000 (16:55 +1100)]
Fix T60608: Popup dialogs Y-axis reset after drag

Caused by fc32bd729c5b7

18 months ago3D View: Disable clipping on load
Campbell Barton [Fri, 18 Jan 2019 02:30:31 +0000 (13:30 +1100)]
3D View: Disable clipping on load

Having clipping limit selection and tools is confusing when not visible.

Disable on load until it's supported
(doing this via ifdef's isn't practical).

Fixes T59580

18 months agoCycles: Cast to correct base type when checking requested features
Lukas Stockner [Fri, 18 Jan 2019 01:56:59 +0000 (02:56 +0100)]
Cycles: Cast to correct base type when checking requested features

18 months agoCleanup: use enum for color picker types
Campbell Barton [Fri, 18 Jan 2019 01:34:11 +0000 (12:34 +1100)]
Cleanup: use enum for color picker types

18 months agoFix eye-dropper causing undo push w/o any changes
Campbell Barton [Fri, 18 Jan 2019 01:07:04 +0000 (12:07 +1100)]
Fix eye-dropper causing undo push w/o any changes

Happened when accessing the eyedropper from a popup.

18 months agoFix undo pushes w/ color picker
Campbell Barton [Fri, 18 Jan 2019 01:05:09 +0000 (12:05 +1100)]
Fix undo pushes w/ color picker

While changing RGBA or color wheel didn't add undo steps,
HSV and Hex values did.

Disable undo for these button types since an undo push happens when
exiting the picker.

18 months agoMerge branch 'blender2.7'
Lukas Stockner [Fri, 18 Jan 2019 00:47:32 +0000 (01:47 +0100)]
Merge branch 'blender2.7'

18 months agoFix T56799: Custom render passes missing when using Save Buffers
Lukas Stockner [Thu, 17 Jan 2019 23:45:21 +0000 (00:45 +0100)]
Fix T56799: Custom render passes missing when using Save Buffers

The problem here was that when a render result is allocated, the standard render passes are added according to the
pass bitfield. Then, when the render engine sets the result, it adds the additional passes which are then merged
into the main render result.

However, when using Save Buffers, the EXR is created before the actual render starts, so it's missing all those
additional passes.

To fix that, we need to query the render engine for a list of additional passes so they can be added before the EXR
is created. Luckily, there already is a function to do that for the node editor.

The same needs to be done when the EXR is loaded back.

Due to how that is implemented though (Render API calls into engine, engine calls back for each pass), if we have
multiple places that call this function there needs to be a way to tell which one the call came from in the pass
registration callback. Therefore, the original caller now provides a callback that is called for each pass.

18 months agoRender API: Fix detection of duplicate render passes
Lukas Stockner [Thu, 17 Jan 2019 23:40:05 +0000 (00:40 +0100)]
Render API: Fix detection of duplicate render passes

18 months agoUI: only reset eyedropper on cancel when set
Campbell Barton [Thu, 17 Jan 2019 22:31:39 +0000 (09:31 +1100)]
UI: only reset eyedropper on cancel when set

18 months agoFix color picker cancel setting the color to black
Campbell Barton [Thu, 17 Jan 2019 22:29:47 +0000 (09:29 +1100)]
Fix color picker cancel setting the color to black

18 months agoCleanup: style
Campbell Barton [Thu, 17 Jan 2019 21:59:41 +0000 (08:59 +1100)]
Cleanup: style

18 months agoAudaspace: porting changes from upstream.
Jörg Müller [Thu, 17 Jan 2019 20:17:30 +0000 (21:17 +0100)]
Audaspace: porting changes from upstream.

- Silence some warnings.
- Fix: Python API memory leak.
- Fix for T54490: VSE breaks when I insert or remove headphones

18 months agoPhysically based defaults for Eevee Bloom and Shutter
Clément Foucault [Thu, 17 Jan 2019 18:54:49 +0000 (19:54 +0100)]
Physically based defaults for Eevee Bloom and Shutter

Some of Eevee's Bloom defaults are not very good for physically based rendering. This patches addresses this issue.

This picture shows one of the problems with current default. Bloom looks very foggy:
Even worse, light emitters much dimmer than the Sun can make everything equally hazy if Clamp is set to 1.0 and intensity to 0.8 (current default). Artists often forget to adjust Clamp value and do not know what value to use for realistic intensity. Also, currently both Clamp and Intensity do not have good UI ranges. This is why often Eevee renders end up very hazy and bloom often does not look right.

Bloom effect plays important role to help to distinguish between bright and relatively dim light sources. With current defaults this is broken because Clamp set to 1.0. Also, it cannot be disabled if set to 0 like expected. This patch fixes this and sets it to 0 by default. If users need to clamp, they can do so easily with UI range up to 1000. This range is good enough for most cases and provides enough precision to control lower values, and the highest value helps to limit bloom from the Sun if necessary and will leave untouched most other light emitters. If needed, much higher values for Clamp can be entered manually up to 100000. 10000 is still affects the Sun, but up to 100000 highest limit allows to clamp anything that is much brighter than the Sun if user needs to limit bloom in such cases (for example, bright explosion in the sky or anything else very bright).

I propose new default for bloom Intensity - 0.05 and UI range to suggests realistic values. Bloom Intensity > 0.1 is not realistic for clean lens but the user can enter manually much larger values if needed.

For comparison, here is a my own photo with and without bloom caused by the Sun (on second photo the Sun was occluded with an object).
In real life bloom is much more subtle and does not look hazy. If Clamp is disabled, then out of 0.1, 0.05 and 0.025 values I have tried, 0.05 looks most similar to the photo. Here is test render with and without bloom with the Sun in similar position like on the photo:
Using color probe 27x27 I compared lightness below the horizon under the Sun. In rendered by Eevee images lightness difference was 17. In case of the photos lightness difference in similar place was 11. I then compared leftmost spot (also below the horizon) and lightness difference was approximately 2 between two photos and 1 between rendered images. In other words, with these settings bloom effect is not too strong and is not too weak. Visually it may seem like decreasing bloom intensity may increase photorealism, but then bloom effect would be too localized even for the Sun.

Besides this single test, I tested in many other scenes as well, with and without the Sun, with different HDRIs, and as far as I can tell 0.05 intensity turned out to be good default - it produces bloom strong enough to be noticeable and not too hazy.

In Cycles shutter default value is 0.50, so for consistency set to 0.5 by default in Eevee too. Besides, 0.5 is typical standard for real cameras, and values higher than 0.5 usually are needed only if very strong motion blur is desired.

Here is summary of all changes:

Bloom Intensity: 0.8 > 0.05
Bloom Intensity UI range: 0-10 > 0-0.1
Bloom Clamp: 1.0 > 0.0 (disabled by default)
Bloom Clamp manual range: 0-1000 > 0-100000
Bloom Clamp UI range: 0-10 > 0-1000
Shutter: 1.0 > 0.5

This patch is related to the discussion in this thread, there are more examples of what bloom will look like with 0.05 intensity by me and others:

Reviewers: fclem

Reviewed By: fclem

Subscribers: pablovazquez, billreynish, rboxman

Tags: #eevee

Differential Revision:

18 months agoGPUInterface: Add builtin check in uniform location request.
Clément Foucault [Thu, 17 Jan 2019 18:42:17 +0000 (19:42 +0100)]
GPUInterface: Add builtin check in uniform location request.

This is a compile time option to remove the unecessary uniform queries.

18 months agoDRW: Make missing uniform debuging print only once
Clément Foucault [Thu, 17 Jan 2019 18:39:27 +0000 (19:39 +0100)]
DRW: Make missing uniform debuging print only once

18 months agoDRW: Use name buffer to request uniform location before drawing.
Clément Foucault [Thu, 17 Jan 2019 17:33:08 +0000 (18:33 +0100)]
DRW: Use name buffer to request uniform location before drawing.

This is in order to avoid GL call during the "cache creation" phase and
support multithreading.

18 months agoFix T60545: Buffer overflow in selection batch creation
Clément Foucault [Thu, 17 Jan 2019 13:37:59 +0000 (14:37 +0100)]
Fix T60545: Buffer overflow in selection batch creation

Use loose_edges and loose_verts buffer instead of detecting them manually.

18 months agoGPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
Clément Foucault [Wed, 16 Jan 2019 03:41:27 +0000 (04:41 +0100)]
GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure

This is in order to make the API more multithread friendly inside the
draw manager.

GPU_shader_get_uniform will only serve to query the shader interface and
not do any GL call, making it threadsafe.

For now it only print a warning if the uniform was not queried before.

18 months agoGP: Make Close fill strokes visible
Antonioya [Thu, 17 Jan 2019 18:33:39 +0000 (19:33 +0100)]
GP: Make Close fill strokes visible

18 months agoFix T60558: Cycles viewport render mismatch when the camera is a light.
Brecht Van Lommel [Thu, 17 Jan 2019 15:28:43 +0000 (16:28 +0100)]
Fix T60558: Cycles viewport render mismatch when the camera is a light.

18 months agoPreferences: fit a little better when opened in place of properties editor.
Brecht Van Lommel [Thu, 17 Jan 2019 13:31:18 +0000 (14:31 +0100)]
Preferences: fit a little better when opened in place of properties editor.

18 months agoFix wrong placement of allow negative frames preference.
Brecht Van Lommel [Thu, 17 Jan 2019 11:41:38 +0000 (12:41 +0100)]
Fix wrong placement of allow negative frames preference.

18 months agoFix T60580: depsgraph object instance 'matrix_world' always returns identity matrix.
Bastien Montagne [Thu, 17 Jan 2019 11:28:50 +0000 (12:28 +0100)]
Fix T60580: depsgraph object instance 'matrix_world' always returns identity matrix.

While form a strict consistency point of view it could make sense to
return identity matrix for non-instance items, it can be very handy to
get that info (common to both instances and regular objects) directly in
all cases.

18 months agoAdd experimental batch-delete of hierarchy to Outliner.
Bastien Montagne [Thu, 17 Jan 2019 11:09:07 +0000 (12:09 +0100)]
Add experimental batch-delete of hierarchy to Outliner.

This uses the same command as regular hierarchy delete, and is only
activated when debug value is set to 666 for now.

Here on file from T60419, it gives about 20% speed-up (from 5.5s to 4.4s).

18 months agoRNA Depsgraĥ: add a warning about not using object_instances as a sequence.
Bastien Montagne [Thu, 17 Jan 2019 10:56:56 +0000 (11:56 +0100)]
RNA Depsgraĥ: add a warning about not using object_instances as a sequence.

Due to how this is generated, each item is freed when steping iteration
to the next one, which means that subscriptions etc. will make blender

18 months agoFix misleading autokeyframing preference, it's only for new scenes.
Brecht Van Lommel [Thu, 17 Jan 2019 11:00:18 +0000 (12:00 +0100)]
Fix misleading autokeyframing preference, it's only for new scenes.

18 months agoPreferences: add new Viewport, Animation, Navigation, Save & Load sections.
Brecht Van Lommel [Wed, 16 Jan 2019 17:49:31 +0000 (18:49 +0100)]
Preferences: add new Viewport, Animation, Navigation, Save & Load sections.

This further changes the preferences organization, to avoid grouping unrelated
settings together. With more sections we can also expand more panels by default,
making it possible to quickly go through sections and see the settings of each.

Panels with less used settings are still collapsed by default, to keep all panel
headers visible without scrolling.

Differential Revision:

18 months agoPreferences: tweaks to lights section layout.
Brecht Van Lommel [Wed, 16 Jan 2019 18:12:51 +0000 (19:12 +0100)]
Preferences: tweaks to lights section layout.

18 months agoPreferences: tweak themes/addons/keyamps buttons at the top.
Brecht Van Lommel [Wed, 16 Jan 2019 17:42:26 +0000 (18:42 +0100)]
Preferences: tweak themes/addons/keyamps buttons at the top.

Make layouts more consistent between them, give more room for search field.
Addon online resources links were removed as the links are dead.

18 months agoRevert "Preferences: enable interface translation by default, not just tooltips."
Brecht Van Lommel [Thu, 17 Jan 2019 02:19:04 +0000 (03:19 +0100)]
Revert "Preferences: enable interface translation by default, not just tooltips."

This reverts commit c1762b1a085246a29f532b24463a236f347b7dd1, as this was
intentional since interface translations are often incomplete or use unusual

18 months agoFix preferences layout not shrinking properly on high DPI display.
Brecht Van Lommel [Thu, 17 Jan 2019 01:01:58 +0000 (02:01 +0100)]
Fix preferences layout not shrinking properly on high DPI display.

18 months agoFix UI not fully updating while resizing window on Windows and macOS.
Brecht Van Lommel [Thu, 17 Jan 2019 00:59:32 +0000 (01:59 +0100)]
Fix UI not fully updating while resizing window on Windows and macOS.

This is still not fully correct, since the event loop is blocked by GHOST
and no timer events are happening for animation while the mouse is still.
But for the most part it looks ok.

18 months agoFix T60554: Missing undo push changing color
Campbell Barton [Thu, 17 Jan 2019 05:39:38 +0000 (16:39 +1100)]
Fix T60554: Missing undo push changing color

Operators don't have a good way to skip undo,
for now check the button undo flag & return cancelled.

18 months agoCleanup: logic for eyedropper free on failure
Campbell Barton [Thu, 17 Jan 2019 04:43:00 +0000 (15:43 +1100)]
Cleanup: logic for eyedropper free on failure

Although currently unused, if exec was called and failed it would leak.

18 months agoCleanup: remove duplicate color picker operator
Campbell Barton [Thu, 17 Jan 2019 04:27:24 +0000 (15:27 +1100)]
Cleanup: remove duplicate color picker operator

Use internal boolean option to disable accumulation for crypto-matte.

18 months agoT60560: Render border gizmo doesn't update display
Campbell Barton [Thu, 17 Jan 2019 03:48:46 +0000 (14:48 +1100)]
T60560: Render border gizmo doesn't update display

18 months agoBMesh: keep selection history when removing doubles
Campbell Barton [Thu, 17 Jan 2019 01:34:05 +0000 (12:34 +1100)]
BMesh: keep selection history when removing doubles

Auto-merge would loose the active vertex.

18 months agoBMesh: Remove doubles now merges face-flags
Campbell Barton [Thu, 17 Jan 2019 01:32:12 +0000 (12:32 +1100)]
BMesh: Remove doubles now merges face-flags

18 months agoCleanup: variable names
Campbell Barton [Thu, 17 Jan 2019 01:28:02 +0000 (12:28 +1100)]
Cleanup: variable names

18 months agoCleanup: de-duplicate loose vert/edge checks
Campbell Barton [Thu, 17 Jan 2019 02:20:44 +0000 (13:20 +1100)]
Cleanup: de-duplicate loose vert/edge checks

18 months agoFix T60578: Crash selecting after hiding vertices
Campbell Barton [Thu, 17 Jan 2019 02:02:07 +0000 (13:02 +1100)]
Fix T60578: Crash selecting after hiding vertices

18 months agoBMesh: keep selection history when removing doubles
Campbell Barton [Thu, 17 Jan 2019 01:34:05 +0000 (12:34 +1100)]
BMesh: keep selection history when removing doubles

Auto-merge would loose the active vertex.

18 months agoBMesh: Remove doubles now merges face-flags
Campbell Barton [Thu, 17 Jan 2019 01:32:12 +0000 (12:32 +1100)]
BMesh: Remove doubles now merges face-flags

18 months agoCleanup: variable names
Campbell Barton [Thu, 17 Jan 2019 01:28:02 +0000 (12:28 +1100)]
Cleanup: variable names

18 months agoCleanup: unused code
Campbell Barton [Thu, 17 Jan 2019 00:17:45 +0000 (11:17 +1100)]
Cleanup: unused code

18 months agoFix T60261: Crash pasting a material without a nodetree
Philipp Oeser [Wed, 16 Jan 2019 21:59:02 +0000 (08:59 +1100)]
Fix T60261: Crash pasting a material without a nodetree

18 months agoPyAPI: minor change to exception handling
Campbell Barton [Wed, 16 Jan 2019 21:46:36 +0000 (08:46 +1100)]
PyAPI: minor change to exception handling

Use error from int conversion function.

18 months agoPyAPI: Avoid redundant prefix for PyC_Err_Format_Prefix
Campbell Barton [Wed, 16 Jan 2019 21:43:57 +0000 (08:43 +1100)]
PyAPI: Avoid redundant prefix for PyC_Err_Format_Prefix

Only show the exception value type when it's not a string.

18 months agoPyAPI: add PyC_Err_SetString_Prefix for internal use
Campbell Barton [Wed, 16 Jan 2019 21:38:59 +0000 (08:38 +1100)]
PyAPI: add PyC_Err_SetString_Prefix for internal use

18 months agoGP: Display Stroke for Fill Alt mode always
Antonioya [Wed, 16 Jan 2019 19:04:27 +0000 (20:04 +0100)]
GP: Display Stroke for Fill Alt mode always

When use the Alt mode to draw close strokes, if the color had the stroke diabled, the stroke was not visiblle while drawing.

Now, it's visible while drawing, but it's hidden again when the stoke is finished. To display close strokes, enable stroke mode in material or enter in edit mode.

18 months agoCleanup/sanitize usages of G.debug_value.
Bastien Montagne [Wed, 16 Jan 2019 18:41:29 +0000 (19:41 +0100)]
Cleanup/sanitize usages of G.debug_value.

There was no documentation at all, some very bad practices (like using
G.debug_value > 0 as some sort of global debug print switch), and even
an overlapping use of '1' value...

Also, python setter did not check for valid range (since this is a
short, not an int).

18 months agoCleanup: get rid of -666 debug value.
Bastien Montagne [Wed, 16 Jan 2019 16:55:43 +0000 (17:55 +0100)]
Cleanup: get rid of -666 debug value.

That one was used to allow specifying in system console a new path for
missing libraries, when loading a .blend file.

We now have a much more easy and user-friendly way of repairing missing
linked datablocks/libraries, so this is not needed anymore.

18 months agoCleanup: remove dead code in softbody forces evaluation.
Bastien Montagne [Wed, 16 Jan 2019 16:50:10 +0000 (17:50 +0100)]
Cleanup: remove dead code in softbody forces evaluation.

This code has been disabled (hidden behind a specific debug value) for
over 10 years now! More than time to get rid of it...

18 months agoFix too narrow buttons in addon preferences.
Brecht Van Lommel [Wed, 16 Jan 2019 18:32:10 +0000 (19:32 +0100)]
Fix too narrow buttons in addon preferences.

18 months agoPreferences: enable interface translation by default, not just tooltips.
Brecht Van Lommel [Wed, 16 Jan 2019 17:44:50 +0000 (18:44 +0100)]
Preferences: enable interface translation by default, not just tooltips.

Translation as a whole is still disabled by default as before.

18 months agoFix outdated user preference descriptions.
Brecht Van Lommel [Wed, 16 Jan 2019 17:48:58 +0000 (18:48 +0100)]
Fix outdated user preference descriptions.

18 months agoFix broken weight painting colorband in default preferences.
Brecht Van Lommel [Wed, 16 Jan 2019 17:44:16 +0000 (18:44 +0100)]
Fix broken weight painting colorband in default preferences.

18 months agoGP: Use multiframe falloff in Shear transform
Antonioya [Wed, 16 Jan 2019 10:30:06 +0000 (11:30 +0100)]
GP: Use multiframe falloff in Shear transform

18 months agoGP: Use multiframe falloff for Bend transformation
Antonioya [Wed, 16 Jan 2019 10:25:12 +0000 (11:25 +0100)]
GP: Use multiframe falloff for Bend transformation

18 months agoOutilner: pass userdata void pointer to outliner_do_object_operation_ex().
Bastien Montagne [Wed, 16 Jan 2019 16:34:31 +0000 (17:34 +0100)]
Outilner: pass userdata void pointer to outliner_do_object_operation_ex().

Even though it is not used currently, an _ex() func should not ignore
that, it is kind of mandatory for many advanced/complex behaviors.

18 months agoPreferences: remove OpenGL select method preference.
Brecht Van Lommel [Wed, 16 Jan 2019 14:18:44 +0000 (15:18 +0100)]
Preferences: remove OpenGL select method preference.

Deprecated GL_SELECT no longer works in OpenGL core profile, so there is no
reason to have this.

18 months agoPreferences: remove unnecessary 16 bit textures preference.
Brecht Van Lommel [Wed, 16 Jan 2019 14:24:43 +0000 (15:24 +0100)]
Preferences: remove unnecessary 16 bit textures preference.

This is a leftover from a time when these were not supported on all GPUs.

18 months agoPreferences: always do GPU accelerated mipmapping, remove preference.
Brecht Van Lommel [Wed, 16 Jan 2019 14:10:19 +0000 (15:10 +0100)]
Preferences: always do GPU accelerated mipmapping, remove preference.

This setting was added long ago to be cautious in case some GPUs did not
support this propertly, no reason to have it anymore.

18 months agoFix BKE_id_copy_ex() being able to 'return' garbage in copied ID.
Bastien Montagne [Wed, 16 Jan 2019 15:14:10 +0000 (16:14 +0100)]
Fix BKE_id_copy_ex() being able to 'return' garbage in copied ID.

Reported/noted in D4178, it would return immediatly in case of NULL
source ID, without ensuring that return 'copied' ID was properly

18 months agoMerge branch 'blender2.7'
Sergey Sharybin [Wed, 16 Jan 2019 13:58:53 +0000 (14:58 +0100)]
Merge branch 'blender2.7'

18 months agoCycles: Report whether camera was detected inside volume or not
Sergey Sharybin [Wed, 16 Jan 2019 13:51:30 +0000 (14:51 +0100)]
Cycles: Report whether camera was detected inside volume or not

18 months agoMultires: Cleanup, comments
Sergey Sharybin [Wed, 16 Jan 2019 10:56:52 +0000 (11:56 +0100)]
Multires: Cleanup, comments

18 months agoExpose batch IDs deletion in python API.
Bastien Montagne [Wed, 16 Jan 2019 10:58:11 +0000 (11:58 +0100)]
Expose batch IDs deletion in python API.

Follow-up to previous commit.

18 months agoAdd experimental batch IDs deletion.
Bastien Montagne [Wed, 16 Jan 2019 10:50:20 +0000 (11:50 +0100)]
Add experimental batch IDs deletion.

Main idea is to remove IDs to be deleted from Main, to avoid looping on
them to remove other deleted IDs usage (this is the most expensive
process in ID deletion, by far).

Speed improvements when deleting a large amount of IDs from a Main
containing a lot of them is quite significant, some examples for Objects:
* Removing 1k from 10k: 32% quicker (2.5s to 1.7s).
* Removing 10k from 20k: 60% quicker (59s to 23s).
* Removing 20k from 20k: 99.5% quicker (82s to 0.4s)!

Note however that this process is more risky/touchy, since we by-pass
some safety checks from regular ID removal here.
So will only give access to that code from python API for now (in
separate commit), so that it gets really tested. Also still need to
think about how to hook it up in UI (probably mostly for Outliner),
since we often do higher-level operations there...

18 months agoFix crash creating new file after modifications
Sergey Sharybin [Wed, 16 Jan 2019 10:39:30 +0000 (11:39 +0100)]
Fix crash creating new file after modifications

Seems to be caused by cae3750 which changed free() function used
by bmain free to the one which does dependency graph tag. We do
no want to do any tags here.

18 months agoCleanup: Spelling in comment
Sergey Sharybin [Wed, 16 Jan 2019 10:36:54 +0000 (11:36 +0100)]
Cleanup: Spelling in comment

18 months agoMultires: Prepare for cached topology
Sergey Sharybin [Wed, 16 Jan 2019 09:58:35 +0000 (10:58 +0100)]
Multires: Prepare for cached topology

Note that the actual caching is still disabled, since
more tests is needed with more production-looking files.