blender.git
2 months ago3D View: move gizmo draw options out of overlays
Campbell Barton [Sat, 13 Apr 2019 10:23:07 +0000 (12:23 +0200)]
3D View: move gizmo draw options out of overlays

Gizmo's now have their own popover in preparation
for making transform gizmos accessible without having to use tools

See: T63518

2 months agoCleanup: add trailing commas to wrapped args
Campbell Barton [Sat, 13 Apr 2019 10:44:34 +0000 (12:44 +0200)]
Cleanup: add trailing commas to wrapped args

2 months agoUI: remove popover button text in viewport header
William Reynish [Sat, 13 Apr 2019 10:14:12 +0000 (12:14 +0200)]
UI: remove popover button text in viewport header

Makes room in the header for other buttons to be added.

2 months agoGPencil: Implement Opacity transform
Antonioya [Sat, 13 Apr 2019 08:47:38 +0000 (10:47 +0200)]
GPencil: Implement Opacity transform

Add Shift+F to transform points opacity in Edit mode

2 months agoreadme: initial minimal readme
Campbell Barton [Sat, 13 Apr 2019 08:37:52 +0000 (10:37 +0200)]
readme: initial minimal readme

Useful to link official resources when the repository is accessed via
3rd party hosting.

2 months agoGPencil: Remove script console warning when object is None
Antonioya [Sat, 13 Apr 2019 07:46:36 +0000 (09:46 +0200)]
GPencil: Remove script console warning when object is None

2 months agoCleanup: style, use braces for the window manager
Campbell Barton [Sat, 13 Apr 2019 07:15:15 +0000 (09:15 +0200)]
Cleanup: style, use braces for the window manager

2 months agoFix T61935 Crash when importing Alembic from Meshroom
Sybren A. Stüvel [Fri, 12 Apr 2019 12:51:17 +0000 (14:51 +0200)]
Fix T61935 Crash when importing Alembic from Meshroom

The Alembic importer can now deal with XForm-less objects. Apparently
MeshLab exports point clouds without parent transformation matrix (XForm in
Alembic-speak). We shouldn't warn about this, but handle it properly
instead.

2 months agoBuild system: disable Draco when not installing python.
Bastien Montagne [Fri, 12 Apr 2019 12:26:17 +0000 (14:26 +0200)]
Build system: disable Draco when not installing python.

Draco py binding needs to be installed somewhere, when not installing
Python itself it's breaking the installation (since it creates a fake
empty py install, which will crash when trying to start Blender).

We could fix that in some smarter way maybe, but for now it's simpler to
just not care about Draco when we are not installing Python.

2 months agoFix T63504: Python Template 'ui_previews_dynamic_enum' error
Philipp Oeser [Fri, 12 Apr 2019 12:00:57 +0000 (14:00 +0200)]
Fix T63504: Python Template 'ui_previews_dynamic_enum' error

thx @nacioss for the fix

2 months agoRename Label instead of Name in Node editor using F2 key
Campbell Barton [Fri, 12 Apr 2019 11:50:33 +0000 (13:50 +0200)]
Rename Label instead of Name in Node editor using F2 key

Previously reverted change without RNA changes.

2 months agoRevert "Rename Label instead of Name in Node editor using F2 key"
Campbell Barton [Fri, 12 Apr 2019 10:58:31 +0000 (12:58 +0200)]
Revert "Rename Label instead of Name in Node editor using F2 key"

This reverts commit 98b06c20a0d4a66e2d9f4496c788f3d0902ea7c6.

RNA properties should give predictable results,
the desired behavior can be added only in operator logic.

2 months agoCleanup: add back semicolons to DefNode
Campbell Barton [Thu, 11 Apr 2019 16:14:05 +0000 (02:14 +1000)]
Cleanup: add back semicolons to DefNode

Causes extra-semicolon warning,
we'll need to disable clang-format for this file since it
won't format properly.

Reverts b389bb5ef8a

2 months agoUI: Re-order Properties tabs to follow the data hierarchy
William Reynish [Fri, 12 Apr 2019 10:04:59 +0000 (12:04 +0200)]
UI: Re-order Properties tabs to follow the data hierarchy

- Group tabs together based on the data-flow
- Puts Physics and Particles next to Modifiers, with which they interrelate

See D4612

Reviewers: pablovazquez

2 months agoFix T63452: View Port/render artifacts while camera movement in
Antonioya [Fri, 12 Apr 2019 07:09:37 +0000 (09:09 +0200)]
Fix T63452: View Port/render artifacts while camera movement in

Patch provided by @matc

2 months agoFix T63341: Xray mode makes some shading popover options grayed out despite them...
Sebastian Parborg [Thu, 11 Apr 2019 17:43:06 +0000 (19:43 +0200)]
Fix T63341: Xray mode makes some shading popover options grayed out despite them working

Do not gray out shading items if the xray alpha value is 1.
They are rendered correctly in viewport so there is no reason to mark
them as disabled in the shading menu.

2 months agoFix T63467: Edge/vertex selection isnt working properly with X-ray set to 1
Sebastian Parborg [Thu, 11 Apr 2019 16:28:20 +0000 (18:28 +0200)]
Fix T63467: Edge/vertex selection isnt working properly with X-ray set to 1

Edit mode shows the mesh elements in X-ray mode even if alpha is set to
1. Now the code takes this into account so that you can still select
visible mesh elements in X-ray edit mode.

view3d_draw_legacy need to be updated with the new XRAY flag macros to
avoid crashes. Additional cleanup of the XRAY macro flags were done.

2 months agoFix 'static override' message showing in ID template tooltip.
Bastien Montagne [Thu, 11 Apr 2019 15:46:10 +0000 (17:46 +0200)]
Fix 'static override' message showing in ID template tooltip.

We only want to show that when library overrides are enabled.

2 months agoFix (unreported) potential infinite loop over collections' parents pointers.
Bastien Montagne [Wed, 3 Apr 2019 09:05:16 +0000 (11:05 +0200)]
Fix (unreported) potential infinite loop over collections' parents pointers.

It is crucial to properly tag as loopback that kind of pointers,
otherwise some users of libquery's foreach_ID might end up in infinite
loops.

2 months agoCleanup: comments
Campbell Barton [Thu, 11 Apr 2019 14:58:54 +0000 (00:58 +1000)]
Cleanup: comments

2 months agoCleanup: remove unused code
Campbell Barton [Thu, 11 Apr 2019 14:58:42 +0000 (00:58 +1000)]
Cleanup: remove unused code

This variable was never used.

2 months agocurve_fit_nd: fix assert caused by too small epsilon
Campbell Barton [Thu, 11 Apr 2019 14:58:15 +0000 (00:58 +1000)]
curve_fit_nd: fix assert caused by too small epsilon

Curve decimate would assert in some cases.

2 months agoAlembic export: free depsgraph after use
Sybren A. Stüvel [Thu, 11 Apr 2019 14:21:43 +0000 (16:21 +0200)]
Alembic export: free depsgraph after use

2 months agoFix T62664: Exporting Metaballs as Alembic crashes Blender
Sybren A. Stüvel [Thu, 11 Apr 2019 13:03:08 +0000 (15:03 +0200)]
Fix T62664: Exporting Metaballs as Alembic crashes Blender

The `AbcMetaballWriter` now subclasses `AbcGenericMeshWriter` instead of
wrapping an `AbcMeshWriter`. `AbcGenericMeshWriter` was created for this
purpose (writing non-mesh objects as mesh to Alembic) and performs the work
in a cleaner and, more importantly, not crashing way.

2 months agoAlembic export: always consider metaballs animated
Sybren A. Stüvel [Thu, 11 Apr 2019 12:56:32 +0000 (14:56 +0200)]
Alembic export: always consider metaballs animated

The metaball 'mesh' is animated whenever any of its components are animated.
However, it's not easily possible to visit all its components (AFAIK it
requires a full scan of all objects in the scene and comparing names), so
due to the blobby nature of the metaballs I now simply assume they'll be
animated.

This fixes an issue where a metaball was considered static when the base
ball was static. For example, MBall static but MBall.001 animated would
be considered 'not animated'.

2 months agoFix: Build issue with draco on mac.
Ray Molenkamp [Thu, 11 Apr 2019 13:47:33 +0000 (07:47 -0600)]
Fix: Build issue with draco on mac.

somehow missed mac in my last commit

2 months agoFix: Build issue with draco.
Ray Molenkamp [Thu, 11 Apr 2019 13:20:14 +0000 (07:20 -0600)]
Fix: Build issue with draco.

DRACO_LIB_NAME was undefined, better use the proper cmake variable for it.

2 months agoFix: Build error with msvc2019.
Ray Molenkamp [Thu, 11 Apr 2019 12:56:15 +0000 (06:56 -0600)]
Fix: Build error with msvc2019.

2 months agoRename Label instead of Name in Node editor using F2 key
Antonioya [Thu, 11 Apr 2019 11:10:10 +0000 (13:10 +0200)]
Rename Label instead of Name in Node editor using F2 key

See D4631 for more details

Reviewers: @brecht @billreynish

2 months ago3D View: Show the camera frame when Extra's is off
Campbell Barton [Thu, 11 Apr 2019 12:00:38 +0000 (14:00 +0200)]
3D View: Show the camera frame when Extra's is off

2 months agoFix T63451: selected objects not highlighted in outliner scene view.
Harley Acheson [Thu, 11 Apr 2019 10:57:02 +0000 (12:57 +0200)]
Fix T63451: selected objects not highlighted in outliner scene view.

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

2 months agoglTF: add Draco shared library for mesh compression.
Benjamin Schmithüsen [Thu, 11 Apr 2019 09:26:23 +0000 (11:26 +0200)]
glTF: add Draco shared library for mesh compression.

Draco is added as a library under extern/ and builds a shared library that is
installed into the Python site-packages. This is then loaded by the glTF add-on
to do mesh compression.

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

2 months agoCleanup: suppress some warnings in external libraries.
Brecht Van Lommel [Thu, 11 Apr 2019 10:04:31 +0000 (12:04 +0200)]
Cleanup: suppress some warnings in external libraries.

2 months agoFix T63464: Multi UV Maps limited to three with eevee
Philipp Oeser [Thu, 11 Apr 2019 07:34:54 +0000 (09:34 +0200)]
Fix T63464: Multi UV Maps limited to three with eevee

this was very similar to T60684 (and the UV case was actually reported
back then as well), so the fix goes hand in hand with rBbd8039399575

Reviewers: fclem

Maniphest Tasks: T63464

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

2 months agoAnnotations: Make all 2D editors locked to View
Antonioya [Wed, 10 Apr 2019 15:32:44 +0000 (17:32 +0200)]
Annotations: Make all 2D editors locked to View

Before, there was a hacky code for Image editor when the image was empty.

Now, all 2D editors are locked to view and when you Move or Zoom, the stroke moves.

This is a fix of T63402.

Still pending if we add more options to 2D editors, but at least now,  we have something consistent.

2 months agoIndustry Compat Keymap: Add Sculpt Mode keys
William Reynish [Wed, 10 Apr 2019 14:10:07 +0000 (16:10 +0200)]
Industry Compat Keymap: Add Sculpt Mode keys

2 months agoIndustry Compatible Keymap: initial keymap
William Reynish [Wed, 10 Apr 2019 10:49:51 +0000 (12:49 +0200)]
Industry Compatible Keymap: initial keymap

This is the initial implementation.

It's fully functional for object and edit mode,
but requires more work in Sculpt and Paint modes.

See T54963

2 months agoFix T62449: Subsurf+hidden faces
Jeroen Bakker [Wed, 10 Apr 2019 07:49:02 +0000 (09:49 +0200)]
Fix T62449: Subsurf+hidden faces

When using subsurf (and other modifiers) the edit flags are not
propagated correctly. Currently we assume to read the edit flags
from the original object which is kind off hinding the real issue.

Modifiers use `mesh_new_nomain_from_template_ex` to create a copy
from an existing mesh. this method is only used by modifiers. So
by placing this we will make sure that editmesh is propagated.

Reviewed By: fclem, sergey

Maniphest Tasks: T62449

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

2 months agoKeyframing: add operators that use keying-set ID's
Campbell Barton [Wed, 10 Apr 2019 09:27:32 +0000 (11:27 +0200)]
Keyframing: add operators that use keying-set ID's

Unfortunately we can't use insert/delete_keyframe operators in keymaps
because the enums aren't known at the time of keymap registration
and the keying sets are dynamic and use a poll function.

Add a version of insert/delete operators that takes a string
instead of an enum. Needed for D4626.

Also extract int to keying-set into a utility function.

2 months agoFix T63455: Legacy GPencil settings in Annotations
Antonioya [Wed, 10 Apr 2019 09:31:37 +0000 (11:31 +0200)]
Fix T63455: Legacy GPencil settings in Annotations

2 months agoFix T63347: No longer supported disable-ffserver option in install_deps script.
Bastien Montagne [Wed, 10 Apr 2019 08:19:25 +0000 (10:19 +0200)]
Fix T63347: No longer supported disable-ffserver option in install_deps script.

FFMPEG removed ffserver and that option alltogether three years ago.

2 months agoFix T63441: Cycles applies modifiers twice
Sergey Sharybin [Wed, 10 Apr 2019 07:57:55 +0000 (09:57 +0200)]
Fix T63441: Cycles applies modifiers twice

Was a mistake in df26f28835f, which caused access uninitialized variable.

2 months agoCleanup: rename old -> versioning
Campbell Barton [Wed, 10 Apr 2019 07:41:13 +0000 (09:41 +0200)]
Cleanup: rename old -> versioning

The term 'old' isn't very meaningful, follow naming for existing
code that updates data.

2 months agoCleanup: use STR_ELEM macro
Campbell Barton [Wed, 10 Apr 2019 07:36:06 +0000 (09:36 +0200)]
Cleanup: use STR_ELEM macro

2 months agoBLI_string: Add STR_ELEM macro
Campbell Barton [Wed, 10 Apr 2019 07:24:40 +0000 (09:24 +0200)]
BLI_string: Add STR_ELEM macro

A string comparison version of the ELEM macro,
add to avoid verbose & repetitive strcmp/STREQ usage.

2 months agoCleanup: order simple check before function call
Campbell Barton [Wed, 10 Apr 2019 07:05:06 +0000 (09:05 +0200)]
Cleanup: order simple check before function call

2 months agoCleanup: spelling
Campbell Barton [Wed, 10 Apr 2019 06:40:49 +0000 (08:40 +0200)]
Cleanup: spelling

2 months agoCleanup: style, shadow warning
Campbell Barton [Wed, 10 Apr 2019 06:34:24 +0000 (08:34 +0200)]
Cleanup: style, shadow warning

2 months agoFix T63427: Annotations don'twork with 2.79 settings
Antonioya [Tue, 9 Apr 2019 18:12:21 +0000 (20:12 +0200)]
Fix T63427: Annotations don'twork with 2.79 settings

The problem was the colors were not converted and the annotation flag was not enabled.

Note: For Scene data (View3D) there is a convert operator.

2 months agoCleanup: Use higher level function
Sergey Sharybin [Tue, 9 Apr 2019 15:06:32 +0000 (17:06 +0200)]
Cleanup: Use higher level function

This kind of abstracts OpenGL details, and this is what is used in
other areas as well.

2 months agoCleanup: spelling
Campbell Barton [Tue, 9 Apr 2019 14:06:53 +0000 (00:06 +1000)]
Cleanup: spelling

2 months agoCleanup: style
Campbell Barton [Tue, 9 Apr 2019 13:16:11 +0000 (23:16 +1000)]
Cleanup: style

2 months agoImage draw: Fix/workaround image corruption on draw
Sergey Sharybin [Tue, 9 Apr 2019 10:44:04 +0000 (12:44 +0200)]
Image draw: Fix/workaround image corruption on draw

Was mainly visible with high-res image. Not entirely clear why it is
only happening on macOS. While the entire function should be re-written
to make float images displayed faster, still nice to fix the drawing.

Reviewers: fclem

Reviewed By: fclem

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

2 months agoFix T62114: Wireframe mode selection: selects backside objects when clicking frontsid...
Sebastian Parborg [Tue, 9 Apr 2019 10:29:02 +0000 (12:29 +0200)]
Fix T62114: Wireframe mode selection: selects backside objects when clicking frontside object in 3d-window

Now the depth order of objects when trying to select them is only used when not in X-ray mode.
Before, this was only the case in wireframe mode regardless of X-ray settings.

I've also unified the usage of V3D_XRAY and XRAY_FLAG as they were basically copies of each other.

Reviewed By: Clément

Differential Revision: http://developer.blender.org/D4504

2 months agoCleanup: BKE_gpencil naming
Campbell Barton [Tue, 9 Apr 2019 07:22:46 +0000 (09:22 +0200)]
Cleanup: BKE_gpencil naming

- The ambiguous term 'handle' was used where 'ensure'
  is typically used (get or add when missing).
- Rename `current` to `active`, all `current` functions which were
  also ensuring.
- Clarify what is being operated on, using `BKE_gpencil_object_*` for
  objects, `BKE_gpencil_brush_*` for brushes.

2 months agoCleanup: style
Campbell Barton [Tue, 9 Apr 2019 06:44:06 +0000 (08:44 +0200)]
Cleanup: style

2 months agoMistake in 1be2888bf021
Jeroen Bakker [Tue, 9 Apr 2019 06:37:00 +0000 (08:37 +0200)]
Mistake in 1be2888bf021

String compare renderengines.

2 months agoFix T63326: absolute shape keys inserted from Python in wrong order.
Arno Mayrhofer [Mon, 8 Apr 2019 21:54:37 +0000 (23:54 +0200)]
Fix T63326: absolute shape keys inserted from Python in wrong order.

2 months agoFix T63386: text editor footer added multiple times.
George Vogiatzis [Mon, 8 Apr 2019 20:35:55 +0000 (22:35 +0200)]
Fix T63386: text editor footer added multiple times.

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

2 months agoFix T63399: Obj exporter does not respect "Apply Modifiers" settings
Sergey Sharybin [Mon, 8 Apr 2019 19:21:09 +0000 (21:21 +0200)]
Fix T63399: Obj exporter does not respect "Apply Modifiers" settings

2 months agoFix T60821: highlighting issues in Dope Sheet
Philipp Oeser [Thu, 28 Mar 2019 12:39:50 +0000 (13:39 +0100)]
Fix T60821: highlighting issues in Dope Sheet

replaced check for (obsolete in 2.8) objects 'SELECT' flag with check for
bases 'BASE_SELECTED' flag

Reviewers: brecht

Maniphest Tasks: T60821

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

2 months agoGPencil: Mark Object gpd field as Deprecated
Antonioya [Mon, 8 Apr 2019 14:23:58 +0000 (16:23 +0200)]
GPencil: Mark Object gpd field as Deprecated

This field is only used to read old files, but it's not used anymore, so it's better mark as deprecated to avoid wrong uses.

2 months agoFix T63340: Transform Snap Object: Simulate occlusion only when `use_occlusion_test...
mano-wii [Mon, 8 Apr 2019 13:49:15 +0000 (10:49 -0300)]
Fix T63340: Transform Snap Object: Simulate occlusion only when `use_occlusion_test` is true.

And cleanup.

2 months agocleanup: typo in comment
Philipp Oeser [Mon, 8 Apr 2019 10:41:57 +0000 (12:41 +0200)]
cleanup: typo in comment

2 months agoGPencil: Cleanup unused code
Antonioya [Mon, 8 Apr 2019 09:28:53 +0000 (11:28 +0200)]
GPencil: Cleanup unused code

2 months agoGPencil: Fix wrong Brush texture for pinned materials
Antonioya [Sun, 7 Apr 2019 15:02:13 +0000 (17:02 +0200)]
GPencil: Fix wrong Brush texture for pinned materials

If the Brush had a pinned material with texture, but the material slot was in a different material, the texture was not working.

The material was not recovered from brush, but from object.

2 months agoQuick Explode: update for recent eevee shadow refactor
Philipp Oeser [Sun, 7 Apr 2019 10:43:20 +0000 (12:43 +0200)]
Quick Explode: update for recent eevee shadow refactor

see rBd6747f310f12 'transparent_shadow_method' -> 'shadow_method'

2 months agoCleanup: add comments about dual quaternion scale handling.
Brecht Van Lommel [Sun, 7 Apr 2019 09:29:31 +0000 (11:29 +0200)]
Cleanup: add comments about dual quaternion scale handling.

Ref T63327

2 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Sun, 7 Apr 2019 09:24:28 +0000 (11:24 +0200)]
Merge branch 'blender2.7'

2 months agoFix for GCC9 new OpenMP data sharing
Robert-André Mauchin [Tue, 2 Apr 2019 23:36:52 +0000 (01:36 +0200)]
Fix for GCC9 new OpenMP data sharing

GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
default clause or when using default(shared), this makes no difference, but
if using default(none), previously the choice was not specify the const
qualified variables on the construct at all, or specify in firstprivate
clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
to be specified on constructs in which they are used, either in shared or
in firstprivate clause. Specifying them in firstprivate clause is one way to
achieve compatibility with both older GCC versions and GCC 9,
another option is to drop the default(none) clause.

This patch thus drops the default(none) clause.

See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2 months agoGPencil: Set layer channel custom color to all line in Dopesheet
Antonioya [Fri, 5 Apr 2019 14:20:31 +0000 (16:20 +0200)]
GPencil: Set layer channel custom color to all line in Dopesheet

See D4645 for more details

2 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Sun, 7 Apr 2019 00:42:38 +0000 (02:42 +0200)]
Merge branch 'blender2.7'

2 months agoFix build error with Visual Studio, appears to be a compiler bug
Brecht Van Lommel [Sun, 7 Apr 2019 00:38:03 +0000 (02:38 +0200)]
Fix build error with Visual Studio, appears to be a compiler bug

It's not clear that "if (0 &&" was introduced intentionally, but this test
only seems to have been an insignificant optimization anyway.

Fixes T63329

2 months agoFix T59014: black/corrupted viewport with Intel HD on Windows 7/8.
Brecht Van Lommel [Sat, 6 Apr 2019 12:23:25 +0000 (14:23 +0200)]
Fix T59014: black/corrupted viewport with Intel HD on Windows 7/8.

Work around bug in the Intel driver:
https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/550740

2 months agoGHOST: tweak warning message about OpenGL 3.3.
Brecht Van Lommel [Sat, 6 Apr 2019 12:08:08 +0000 (14:08 +0200)]
GHOST: tweak warning message about OpenGL 3.3.

2 months agoDRW: Opti: Fix hotspot in DRW_mesh_batch_cache_get_surface_shaded
Clément Foucault [Fri, 5 Apr 2019 23:55:21 +0000 (01:55 +0200)]
DRW: Opti: Fix hotspot in DRW_mesh_batch_cache_get_surface_shaded

The hotspot was generated by mesh_cd_layers_type_overlap who was testing
way more data than it should have.

Here we reduce the whole CD layer mask to a 32bit bitflag that is easily
or'ed and tested.

Bonus point: We use atomic operation to merge the mask in order to allow
future multi-threading. (this was a TODO)

In the scene attached to T58188 this removes 5% of CPU time.

2 months agoGPU: Fix typo
Clément Foucault [Fri, 5 Apr 2019 18:46:13 +0000 (20:46 +0200)]
GPU: Fix typo

2 months agoDRW: Opti: Replace bound tex/ubo tracking array by bitfields
Clément Foucault [Fri, 5 Apr 2019 18:45:32 +0000 (20:45 +0200)]
DRW: Opti: Replace bound tex/ubo tracking array by bitfields

release_texture_slots() and release_ubo_slots() were one hotspot when
drawing taking ~9% of total CPU counters for no reason.

This was because of the loops using GPU_max_textures that was overkill and
slow.

Replace those by a simple 64bit bitwise OR operation.

2 months agoCleanup: Fix compiler warning
Antonioya [Fri, 5 Apr 2019 16:50:13 +0000 (18:50 +0200)]
Cleanup: Fix compiler warning

2 months agoFix T61035 Draw manager crash opening file with curves
Clément Foucault [Fri, 5 Apr 2019 15:48:14 +0000 (17:48 +0200)]
Fix T61035 Draw manager crash opening file with curves

Move free callback call to GPU_batch_discard to prevent the crash.

The issue was that clearing can happen after referencing to an instance
buffer and that's perfectly legal.

2 months agoFix T63281: Drivers inside nodegroups inside nodegroups don't show up in Driver Editor
Sebastian Parborg [Fri, 5 Apr 2019 14:28:34 +0000 (16:28 +0200)]
Fix T63281: Drivers inside nodegroups inside nodegroups don't show up in Driver Editor

Recurse into node groups when looking for drivers.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4653

2 months agoEEVEE: Fix compilation
Jeroen Bakker [Fri, 5 Apr 2019 13:02:55 +0000 (15:02 +0200)]
EEVEE: Fix compilation

Introduced by f0d6879f5c7998be98ac406bd6ddaa5104961206

2 months agoFix T63283: Second subdivision modifier does not ignore crease
Sergey Sharybin [Fri, 5 Apr 2019 12:13:05 +0000 (14:13 +0200)]
Fix T63283: Second subdivision modifier does not ignore crease

This is something where there is no single correct behavior,
sometimes it's needed to ignore the crease to make mesh more
smooth. But sometimes crease is to be considered after first
subdivision surface: for example, when adding extra subdivisions
for render-time displacement.

Made it an option whether modifier needs to take crease into
account or not.

Existing files should be openable in the 2.7 compatible way,
to re-create an old behavior the options is to be manually
disabled in the modifier settings.

Reviewers: brecht

Reviewed By: brecht

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

2 months agoGPU not able to allocate texture
Jeroen Bakker [Fri, 5 Apr 2019 10:53:26 +0000 (12:53 +0200)]
GPU not able to allocate texture

In the case of the report a GL_PROXY_TEXTURE_2D_ARRAY of 2509x2509x1 failed to be allocated.
This is a work around as the GL_PROXY_TEXTURE_* is not reliable.

Reviewed By: brecht, fclem

Maniphest Tasks: T63223

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

2 months agoFix T62892 EEVEE HDRI lightning glitch
Clément Foucault [Fri, 5 Apr 2019 12:37:38 +0000 (14:37 +0200)]
Fix T62892 EEVEE HDRI lightning glitch

Clamp the texture at sampling time. This is not the best way to do it but
this is the fastest/simplest. The cost is rather negligeable.

2 months agoInterface: New region type 'Footer', used by text editor
George Vogiatzis [Fri, 5 Apr 2019 11:48:26 +0000 (13:48 +0200)]
Interface: New region type 'Footer', used by text editor

* It can be hidden by dragging it up/down.
* It can be at the top or bottom, independent of the header.
* It uses the color theme from the header.
* It does not change its color, when the area becomes active.

Currently, it is used in the text editor to display the file path.

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

2 months agoCleanup: Replace deprecated finite with isfinite
Simon [Fri, 5 Apr 2019 11:41:28 +0000 (13:41 +0200)]
Cleanup: Replace deprecated finite with isfinite

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

2 months agoCleanup: Spelling
Sergey Sharybin [Fri, 5 Apr 2019 10:52:57 +0000 (12:52 +0200)]
Cleanup: Spelling

2 months agoFix T60390: add Cycles texture node mapping settings to node editor sidebar
Brecht Van Lommel [Fri, 5 Apr 2019 10:47:34 +0000 (12:47 +0200)]
Fix T60390: add Cycles texture node mapping settings to node editor sidebar

These were missing from the UI previously.

2 months agoFix T63292: Crash Workbench Texture Drawing
Jeroen Bakker [Fri, 5 Apr 2019 09:26:48 +0000 (11:26 +0200)]
Fix T63292: Crash Workbench Texture Drawing

2 months agoGPencil: Improve drawing feeling in big files
Antonioya [Fri, 5 Apr 2019 09:26:04 +0000 (11:26 +0200)]
GPencil: Improve drawing feeling in big files

When drawing in big files, the first points of the stroke were not smooth because the system was doing a copy of the depsgraph datablock.

Now, the depsgraph is not updated at the beginning and the feeling is far better, especially for big files.

To avoid the copy, the original datablock is used while drawing, because it's faster the lookup of the original data, than a full datablock copy.

Also some cleanup of the code.

2 months agoFix T60379: Cycles viewport adaptive subdivision hangs after updates.
Brecht Van Lommel [Thu, 4 Apr 2019 18:06:22 +0000 (20:06 +0200)]
Fix T60379: Cycles viewport adaptive subdivision hangs after updates.

The camera world to raster computation was using wrong values. Also fixes
update when changing subdivision scene settings.

2 months agoWorkbench: Support Transparency + Textures
Jeroen Bakker [Thu, 4 Apr 2019 11:47:18 +0000 (13:47 +0200)]
Workbench: Support Transparency + Textures

When texture drawing was enabled the fallback materials were not transparent.
The reason was that the solid material was requested. This patch will requesting
in this case the material from the forward renderer.

Fix: T63077

Reviewed By: fclem

Maniphest Tasks: T63077

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

2 months agoFix T63108 Eevee: Wrong Reflection plane matrix if camera view is not centered
Clément Foucault [Thu, 4 Apr 2019 16:08:42 +0000 (18:08 +0200)]
Fix T63108 Eevee: Wrong Reflection plane matrix if camera view is not centered

Invert X axis of the Window Matrix (AKA Projection matrix) instead of the
View matrix.

2 months agoFix T63198 Eevee: Indirect lighting settings arent not updating in Lookdev
Clément Foucault [Thu, 4 Apr 2019 15:58:35 +0000 (17:58 +0200)]
Fix T63198 Eevee: Indirect lighting settings arent not updating in Lookdev

This was caused by a missing check for those option.

2 months agoFix T63278 Eevee: LookDev: Volumetric on even if Scene World is off
Clément Foucault [Thu, 4 Apr 2019 15:17:40 +0000 (17:17 +0200)]
Fix T63278 Eevee: LookDev: Volumetric on even if Scene World is off

2 months agoFix segfault when audio system cannot be initialised
Sybren A. Stüvel [Thu, 4 Apr 2019 15:58:13 +0000 (17:58 +0200)]
Fix segfault when audio system cannot be initialised

`PyInit_aud()` can return `NULL` for variour reasons. When that happens,
we shouldn't continue.

2 months agoFix T61830: Remove option to add new keymap item in search mode
Jacques Lucke [Thu, 4 Apr 2019 15:37:24 +0000 (17:37 +0200)]
Fix T61830: Remove option to add new keymap item in search mode

This was not working well, because the search text was removed
after pressing this button. Finding the item that was inserted
was not easy.

Removing the option seems to be the best solution for now.

2 months agoEEVEE+Workbench: Show partsys in final rendering
Jeroen Bakker [Thu, 4 Apr 2019 13:07:30 +0000 (15:07 +0200)]
EEVEE+Workbench: Show partsys in final rendering

In final rendering mode the display type was tested for
visibility flag. This should only occus when doing viewport
rendering

Reviewed By: fclem

Maniphest Tasks: T63056

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

2 months agoFix T63256: Make Dupli Face was broken since there are collections
Jacques Lucke [Thu, 4 Apr 2019 14:37:55 +0000 (16:37 +0200)]
Fix T63256: Make Dupli Face was broken since there are collections