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

5 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.

5 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

5 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

5 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

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

5 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

5 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:
{F6280495}
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).
{F6280500}
{F6280492}
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:
{F6280496}
{F6280494}
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:
https://devtalk.blender.org/t/eevee-needs-to-have-physically-based-defaults/4700

Reviewers: fclem

Reviewed By: fclem

Subscribers: pablovazquez, billreynish, rboxman

Tags: #eevee

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

5 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.

5 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

5 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.

5 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.

5 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.

5 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

5 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.

5 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.

5 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.

5 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.

5 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).

5 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
crash.

5 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.

5 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: https://developer.blender.org/D4216

5 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.

5 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.

5 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
terms.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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

5 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.

5 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

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

5 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

5 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

5 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.

5 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

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

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

5 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

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

Use error from int conversion function.

5 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.

5 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

5 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.

5 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).

5 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.

5 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...

5 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.

5 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.

5 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.

5 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.

5 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

5 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

5 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.

5 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.

5 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.

5 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.

5 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
initialized.

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

5 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

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

5 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.

5 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...

5 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.

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

5 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.

5 months agoOpenSubdiv: Remove topology orientation code
Sergey Sharybin [Wed, 16 Jan 2019 09:21:31 +0000 (10:21 +0100)]
OpenSubdiv: Remove topology orientation code

It is no longer used and has some issues in corner cases
which are not handled in a way which OpenSubdiv expects.

5 months agoSubdiv: Reset evaluator creation statistics
Sergey Sharybin [Wed, 16 Jan 2019 09:15:25 +0000 (10:15 +0100)]
Subdiv: Reset evaluator creation statistics

Makes it more clear to see what was exactly happening at
the last invocation of subsurf modifier.

5 months agoOpenSubdiv: Implement UV topology comparison
Sergey Sharybin [Tue, 15 Jan 2019 15:15:46 +0000 (16:15 +0100)]
OpenSubdiv: Implement UV topology comparison

5 months agoSubdiv: Initial implementation of topology cache
Sergey Sharybin [Tue, 15 Jan 2019 14:34:11 +0000 (15:34 +0100)]
Subdiv: Initial implementation of topology cache

This commit makes it so OpenSubdiv's topology refiner is kept
in memory and reused for until topology changes. There are the
following modifications which causes topology refiner to become
invalid:

- Change in a mesh topology (for example, vertices, edges, and
  faces connectivity).
- Change in UV islands (adding new islands, merging them and
  so on),
- Change in UV smoothing options.
- Change in creases.
- Change in Catmull-Clark / Simple subdivisions.

The following limitations are known:

- CPU evaluator is not yet cached.
- UV islands topology is not checked.

The UV limitation is currently a stopper for making this cache
enabled by default.

5 months agoOpenSubdiv: Correct topology cpmparator
Sergey Sharybin [Tue, 15 Jan 2019 13:00:57 +0000 (14:00 +0100)]
OpenSubdiv: Correct topology cpmparator

This fixes following errors:

- The code didn't work correctly for edges reconstructed by
  the OpenSubdiv's topology refiner (due to indexing
  difference).

- Sharpness of non-manifold and boundary edges was not
  working correctly.

5 months agoOpenSubdiv: Use own utility header
Sergey Sharybin [Tue, 15 Jan 2019 10:08:33 +0000 (11:08 +0100)]
OpenSubdiv: Use own utility header

Replaces direct access to std.

5 months agoOpenSubdiv: Cleanup, indentation
Sergey Sharybin [Mon, 14 Jan 2019 16:09:44 +0000 (17:09 +0100)]
OpenSubdiv: Cleanup, indentation

5 months agoSubdiv: Cleanup, pass mesh by const pointer
Sergey Sharybin [Mon, 14 Jan 2019 10:15:57 +0000 (11:15 +0100)]
Subdiv: Cleanup, pass mesh by const pointer

5 months agoSubdiv: Cleanup, comments
Sergey Sharybin [Mon, 14 Jan 2019 10:11:42 +0000 (11:11 +0100)]
Subdiv: Cleanup, comments

5 months agoAlembic: C++11 doesn't need the space between '> >'
Sybren A. Stüvel [Tue, 15 Jan 2019 17:50:24 +0000 (18:50 +0100)]
Alembic: C++11 doesn't need the space between '> >'

C++11 doesn't need the space between '> >' in a nested templated
declaration, so instead of `std::vector<std::pair<a, b> >` we can now
write `std::vector<std::pair<a, b> >`.

5 months agoAlembic export: write curve/NURBS as mesh
Sybren A. Stüvel [Tue, 15 Jan 2019 15:45:12 +0000 (16:45 +0100)]
Alembic export: write curve/NURBS as mesh

It's now possible to export curves and NURBS as mesh data to Alembic.
This allows artists to do any crazy thing on curves and export the
visual result to Alembic for interoperability with other software (or
caching for later use, etc.). It's an often-requested feature.

This works around T60503 and the fixes export part of T51311.

Note that exporting zero-width curves is currently not supported, as
exporting a faceless mesh (e.g. just edges and vertices) is not
supported by the mesh writer at all.

To test, create a curve with thickness (for example extruded), export to
Alembic and check the 'Curves to Mesh' checkbox in the export options.

Reviewers: sergey

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

5 months agoAlembic export: separated "writing Alembic mesh" from "writing mesh object"
Sybren A. Stüvel [Tue, 15 Jan 2019 14:16:39 +0000 (15:16 +0100)]
Alembic export: separated "writing Alembic mesh" from "writing mesh object"

I moved most of the `AbcMeshWriter` code to a new class
`AbcGenericMeshWriter`. The latter is an abstract class and does not
make any assumptions about the type of Blender object being written.
This makes it possible to write metaballs, curves, nurbs surfaces, etc.
as mesh to Alembic files.

The `AbcMeshWriter` class now is the concrete implementation of
`AbcGenericMeshWriter` for writing mesh objects.

Reviewers: sergey

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

5 months agoFix uninitialized cursor w/ setting object origin
Campbell Barton [Wed, 16 Jan 2019 08:57:58 +0000 (19:57 +1100)]
Fix uninitialized cursor w/ setting object origin

5 months agoFix T52354: Origin to Geometry uses Bounds w/ Median Center is set
Campbell Barton [Wed, 16 Jan 2019 07:32:09 +0000 (18:32 +1100)]
Fix T52354: Origin to Geometry uses Bounds w/ Median Center is set

5 months agoLogging: add '--log-show-timestamp' option.
Campbell Barton [Wed, 16 Jan 2019 05:29:40 +0000 (16:29 +1100)]
Logging: add '--log-show-timestamp' option.

Part of D4214 by @sobakasu w/ edits.

5 months agoBMesh: prevent weld-verts bmop creating selected+hidden verts/edges
Campbell Barton [Wed, 16 Jan 2019 04:26:16 +0000 (15:26 +1100)]
BMesh: prevent weld-verts bmop creating selected+hidden verts/edges

Related to error exposed by T59640
Would have fixed crash too, but we want to ignore hidden verts.

5 months agoBMesh: prevent weld-verts bmop creating selected+hidden verts/edges
Campbell Barton [Wed, 16 Jan 2019 04:26:16 +0000 (15:26 +1100)]
BMesh: prevent weld-verts bmop creating selected+hidden verts/edges

Related to error exposed by T59640
Would have fixed crash too, but we want to ignore hidden verts.

5 months agoFix T59640: Transform w/ auto-merge & hidden verts crashes
Campbell Barton [Wed, 16 Jan 2019 03:54:52 +0000 (14:54 +1100)]
Fix T59640: Transform w/ auto-merge & hidden verts crashes

5 months agoFix T59640: Transform w/ auto-merge & hidden verts crashes
Campbell Barton [Wed, 16 Jan 2019 03:54:52 +0000 (14:54 +1100)]
Fix T59640: Transform w/ auto-merge & hidden verts crashes

5 months agoFix uninitialized variable use w/ kdopbvh ray projection
Campbell Barton [Wed, 16 Jan 2019 04:00:32 +0000 (15:00 +1100)]
Fix uninitialized variable use w/ kdopbvh ray projection

Snapping verts for eg would use these values uninitialized.

5 months agoObject: avoid calling operators in ED_editors_init
Campbell Barton [Wed, 16 Jan 2019 00:46:55 +0000 (11:46 +1100)]
Object: avoid calling operators in ED_editors_init

Don't call operator when entering sculpt modes.

5 months agoCleanup: de-duplicate rotation mode enum
Campbell Barton [Wed, 16 Jan 2019 00:16:15 +0000 (11:16 +1100)]
Cleanup: de-duplicate rotation mode enum

5 months agoCleanup: use max frame define
Campbell Barton [Wed, 16 Jan 2019 00:09:51 +0000 (11:09 +1100)]
Cleanup: use max frame define

5 months agoGP: Use weight in noise modifier for all types
Antonioya [Tue, 15 Jan 2019 19:24:07 +0000 (20:24 +0100)]
GP: Use weight in noise modifier for all types

The weight was used only for position.

5 months agoFix T59826: grease pencil crash with empty material slot.
Brecht Van Lommel [Tue, 15 Jan 2019 17:17:53 +0000 (18:17 +0100)]
Fix T59826: grease pencil crash with empty material slot.

5 months agoMerge branch 'blender2.7'
Sergey Sharybin [Tue, 15 Jan 2019 17:42:37 +0000 (18:42 +0100)]
Merge branch 'blender2.7'

5 months agoSequencer: Restore change menu
Sergey Sharybin [Tue, 15 Jan 2019 17:33:37 +0000 (18:33 +0100)]
Sequencer: Restore change menu

It was still used by C-key menu, and is very handy to have
when working on a complex edit files.

Was initially removed by e9d06f086698.

5 months agoFix T60383: mesh merge type callback returned NULL
Jacques Lucke [Tue, 15 Jan 2019 17:27:21 +0000 (18:27 +0100)]
Fix T60383: mesh merge type callback returned NULL

5 months agoFix T60246: crash with Cycles baking while in edit mode.
Brecht Van Lommel [Tue, 15 Jan 2019 15:53:35 +0000 (16:53 +0100)]
Fix T60246: crash with Cycles baking while in edit mode.

5 months agoAlembic: removed declaration of non-existing functions
Sybren A. Stüvel [Tue, 15 Jan 2019 13:09:06 +0000 (14:09 +0100)]
Alembic: removed declaration of non-existing functions

Removed AbcMeshWriter::getMeshInfo() and AbcMeshWriter::getMaterialIndices().

5 months agoMarked TODOs with the actual string TODO
Sybren A. Stüvel [Tue, 15 Jan 2019 11:20:55 +0000 (12:20 +0100)]
Marked TODOs with the actual string TODO

There are some things that need to be done in Alembic for Blender 2.8 to
make all the 'visible/renderable/selected only' options work.

5 months agoAlembic export: fixed memory leak
Sybren A. Stüvel [Tue, 15 Jan 2019 15:14:05 +0000 (16:14 +0100)]
Alembic export: fixed memory leak

If the triangulated mesh was in itself a new mesh that should be freed this
should happen before the function returns (as it only returns a single mesh,
and thus the caller can only free one).

5 months agoMerge branch 'blender2.7'
Campbell Barton [Tue, 15 Jan 2019 13:28:46 +0000 (00:28 +1100)]
Merge branch 'blender2.7'