blender.git
4 months agoFix T59622: dependency problems with Spline IK.
Alexander Gavrilov [Sun, 14 Apr 2019 10:44:12 +0000 (13:44 +0300)]
Fix T59622: dependency problems with Spline IK.

The bug is caused by problems in the dependency graph. Unfortunately,
fixing is not just a matter of fixing the graph, because correct
dependencies would cause a cycle here and in other reasonable use
cases. The real fix thus requires refactoring Spline IK to require
curve data only in the actual evaluation phase, and not in POSE_INIT_IK.

In addition, this separates the normal bone evaluation loop from
Spline IK computations for two reasons:

- That still needs to be done even if spline IK can't evaluate
  due to missing curve data.

- It should reduce issues with induced shearing, as Spline IK now
  controls how parent-child relations are handled in the chain, and
  can take care to only carry over rotation and location.

4 months agoComplete the set of matrix multiplication functions.
Alexander Gavrilov [Sun, 14 Apr 2019 15:13:39 +0000 (18:13 +0300)]
Complete the set of matrix multiplication functions.

Also, mul_m3_m3m4 was named incorrectly.

4 months agoFix add_search node operator to show custom nodes
Miguel Porces [Sun, 14 Apr 2019 14:59:01 +0000 (16:59 +0200)]
Fix add_search node operator to show custom nodes

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

4 months agoUI: Remember the last display mode in file browser
Sharan Ranjit [Sun, 14 Apr 2019 14:33:59 +0000 (16:33 +0200)]
UI: Remember the last display mode in file browser

See also T57688.

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

4 months agoUI: Do not show full action range
Jacques Lucke [Sun, 14 Apr 2019 14:18:48 +0000 (16:18 +0200)]
UI: Do not show full action range

Reviewers: brecht

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

4 months agoCMake: prepare for BLENDER_SORTED_LIBS removal
Campbell Barton [Sun, 14 Apr 2019 13:18:44 +0000 (15:18 +0200)]
CMake: prepare for BLENDER_SORTED_LIBS removal

No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.

4 months agoDopesheet: enable Show Keyframes and Interpolation by default.
Alexander Gavrilov [Sun, 14 Apr 2019 13:34:06 +0000 (16:34 +0300)]
Dopesheet: enable Show Keyframes and Interpolation by default.

Make the option enabled by default, and enable it in old files,
unless Show Extremes is enabled.

However, suppress it for the Timeline, because its View menu
doesn't include the option.

Reviewers: billreynish, brecht

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

4 months agoExplain the Local With Parent coordinate space better.
Alexander Gavrilov [Sun, 14 Apr 2019 13:26:47 +0000 (16:26 +0300)]
Explain the Local With Parent coordinate space better.

Just saying "parent transformation added" doesn't really explain
what this coordinate space does. Thus it seems almost nobody used
it and serious bugs like T61981 went unnoticed.

4 months agoFix T61981: Local With Parent broken as constraint own space.
Alexander Gavrilov [Sun, 14 Apr 2019 12:50:49 +0000 (15:50 +0300)]
Fix T61981: Local With Parent broken as constraint own space.

Specifically, matrix multiplication order in Local With Parent
to Pose space conversion was wrong, compared with Pose to LWP.

4 months agoMissed version bump in recent commit
Campbell Barton [Sun, 14 Apr 2019 11:29:06 +0000 (13:29 +0200)]
Missed version bump in recent commit

4 months agoKeymap: toggle context gizmo instead of the tool gizmo
Campbell Barton [Sun, 14 Apr 2019 11:21:44 +0000 (13:21 +0200)]
Keymap: toggle context gizmo instead of the tool gizmo

When a tool is activated in many cases the gizmo is needed so toggling
them isn't so useful.

Change behavior to use the active object instead so users who prefer
to enable gizmos in the popover can toggle them.

Also remove duplicate keymap item.

4 months agoGizmo: individual toggles for 3D view gizmos
Campbell Barton [Sun, 14 Apr 2019 11:11:17 +0000 (13:11 +0200)]
Gizmo: individual toggles for 3D view gizmos

The popover for displaying gizmos now has options for
empty, light & camera gizmos.

Transform toggles are now checkboxes, which has the advantage that it's
more obvious they can be mixed however changing from one to another now
uses 3x clicks instead of a single click-drag action.
We might need a faster way to switch between transform types.

4 months agoDepsgraph: fix debug print crash on IK constraint without target.
Alexander Gavrilov [Sun, 14 Apr 2019 08:31:51 +0000 (11:31 +0300)]
Depsgraph: fix debug print crash on IK constraint without target.

4 months agoCleanup: rename 'ObData' to 'Object Data'
Campbell Barton [Sun, 14 Apr 2019 09:19:09 +0000 (11:19 +0200)]
Cleanup: rename 'ObData' to 'Object Data'

4 months agoFix T63587: 3D View clipping region crashes
Campbell Barton [Sun, 14 Apr 2019 09:04:34 +0000 (11:04 +0200)]
Fix T63587: 3D View clipping region crashes

4 months agoCleanup: doxy comments
Campbell Barton [Sun, 14 Apr 2019 08:48:42 +0000 (10:48 +0200)]
Cleanup: doxy comments

Use doxy references to function and enums,
also correct some names which became out of sync.

4 months agoCleanup: move operator constants out of DNA
Campbell Barton [Sun, 14 Apr 2019 07:58:40 +0000 (09:58 +0200)]
Cleanup: move operator constants out of DNA

Also use doxy struct member references.

4 months agoGizmo: move transform to a persistent option
Campbell Barton [Sat, 13 Apr 2019 18:36:53 +0000 (20:36 +0200)]
Gizmo: move transform to a persistent option

Based on feedback from animators, this is useful to keep as a view
option (as in 2.7x).

Now the transform gizmos can be enabled from the popover,
the tools still work for location/scale/rotation.
The transform tool has been removed.

See T63518

4 months agoKeymap: warn when running poll on empty keymaps
Campbell Barton [Sat, 13 Apr 2019 17:22:08 +0000 (19:22 +0200)]
Keymap: warn when running poll on empty keymaps

4 months agoFix T62048: crash when turning off curve path animation with Spline IK.
Alexander Gavrilov [Sat, 13 Apr 2019 14:36:57 +0000 (17:36 +0300)]
Fix T62048: crash when turning off curve path animation with Spline IK.

Both fix missing depsgraph flag, and gracefully give up on missing data.

4 months agoFix T37500: implement Bendy bone segment deformation interpolation.
Alexander Gavrilov [Fri, 5 Apr 2019 15:40:59 +0000 (18:40 +0300)]
Fix T37500: implement Bendy bone segment deformation interpolation.

Previously B-Bone deformation mapped every vertex to just one
B-Bone segment. This results in abrupt transformation differences
between the sides of each threshold plane, reducing the quality
of B-Bone deformation and making the use of shape keys impractical.

This commit replaces this approach with a linear blend between
the two closest segment transformations, effectively representing
the B-Bone as two weight-blended plain bones for each vertex.

In order to distribute the interpolation more evenly along the
bone, segment matrices for deformation are now computed at points
between the segments and at the ends of the B-Bone. The computation
also uses the true tangents of the Bezier curve for the orientation.
The nodes at the end of the bone require some special handling to
deal with zero-length Bezier handles caused by a zero ease value.

The Copy Transforms constraint now also smoothly interpolates
rotation and scaling along the bone shape when enabled.

The initial version of the patch was submitted by @Sam200.

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

4 months agoCleanup: add View3D_Runtime struct
Campbell Barton [Sat, 13 Apr 2019 13:20:15 +0000 (15:20 +0200)]
Cleanup: add View3D_Runtime struct

Also remove 'matcap_icon'

4 months agoreadme: separate development links
Brecht Van Lommel [Sat, 13 Apr 2019 12:42:52 +0000 (14:42 +0200)]
readme: separate development links

Add development links and place under own heading.

4 months agoFix T63563: Grease pencil not visible when contained in a collection instanced in...
Antonioya [Sat, 13 Apr 2019 11:03:22 +0000 (13:03 +0200)]
Fix T63563: Grease pencil not visible when contained in a collection instanced in a foreign scene.

The check of DUPLI object was used, but as the original object was not in the scene, the VBO data was not available and the draw was empty.

Now, the function checks if the original data is in the scene, and set the object as not Dupli to generate the VBO data.

4 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

4 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

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

4 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

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

4 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

4 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

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

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

4 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

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

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

4 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

4 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

4 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

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

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

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

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

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

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

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

4 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

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

4 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'.

4 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

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

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

4 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

4 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

4 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

4 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

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

4 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

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

4 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

4 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

4 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

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

4 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

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

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

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

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

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

4 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

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

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

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

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

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

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

4 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

4 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

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

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

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

String compare renderengines.

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

4 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

4 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

4 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

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

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

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

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

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

4 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'

4 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

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

4 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>
4 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

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

4 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

4 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

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

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