blender.git
2 years 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.

2 years 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.

2 years 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

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

2 years 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.

2 years 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.

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

2 years 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.

2 years 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

2 years 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.

2 years 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().

2 years 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.

2 years 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).

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

2 years agoMerge branch 'blender2.7'
Campbell Barton [Tue, 15 Jan 2019 13:27:10 +0000 (00:27 +1100)]
Merge branch 'blender2.7'

2 years agoCleanup: commas at the end of enums
Campbell Barton [Tue, 15 Jan 2019 12:57:49 +0000 (23:57 +1100)]
Cleanup: commas at the end of enums

Without this clang-format may wrap them onto a single line.

2 years agoCleanup: comment line length (editors)
Campbell Barton [Tue, 15 Jan 2019 12:24:20 +0000 (23:24 +1100)]
Cleanup: comment line length (editors)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: comment line length (blenlib)
Campbell Barton [Tue, 15 Jan 2019 12:15:58 +0000 (23:15 +1100)]
Cleanup: comment line length (blenlib)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: comment line length (creator)
Campbell Barton [Tue, 15 Jan 2019 12:25:45 +0000 (23:25 +1100)]
Cleanup: comment line length (creator)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: comment line length (DNA)
Campbell Barton [Tue, 15 Jan 2019 12:14:35 +0000 (23:14 +1100)]
Cleanup: comment line length (DNA)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: commas at the end of enums
Campbell Barton [Tue, 15 Jan 2019 12:57:49 +0000 (23:57 +1100)]
Cleanup: commas at the end of enums

Without this clang-format may wrap them onto a single line.

2 years agoCleanup: rename BASE_FROMDUPLI -> BASE_FROM_DUPLI
Campbell Barton [Tue, 15 Jan 2019 12:27:54 +0000 (23:27 +1100)]
Cleanup: rename BASE_FROMDUPLI -> BASE_FROM_DUPLI

Matches `BASE_FROM_SET`.

2 years agoCleanup: comment line length (editors)
Campbell Barton [Tue, 15 Jan 2019 12:24:20 +0000 (23:24 +1100)]
Cleanup: comment line length (editors)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: comment line length (blenlib)
Campbell Barton [Tue, 15 Jan 2019 12:15:58 +0000 (23:15 +1100)]
Cleanup: comment line length (blenlib)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: comment line length (creator)
Campbell Barton [Tue, 15 Jan 2019 12:25:45 +0000 (23:25 +1100)]
Cleanup: comment line length (creator)

Prevents clang-format wrapping text before comments.

2 years agoCleanup: comment line length (DNA)
Campbell Barton [Tue, 15 Jan 2019 12:14:35 +0000 (23:14 +1100)]
Cleanup: comment line length (DNA)

Prevents clang-format wrapping text before comments.

2 years agoFix T60498: Auto IK doesn't work immediately.
Brecht Van Lommel [Tue, 15 Jan 2019 11:07:22 +0000 (12:07 +0100)]
Fix T60498: Auto IK doesn't work immediately.

2 years agoFix T60497: wrong statusbar keymap display with MMB emulation.
Brecht Van Lommel [Tue, 15 Jan 2019 10:33:50 +0000 (11:33 +0100)]
Fix T60497: wrong statusbar keymap display with MMB emulation.

2 years agoFix T60497: edgering select not available with LMB select and MMB emulation.
Brecht Van Lommel [Tue, 15 Jan 2019 10:26:15 +0000 (11:26 +0100)]
Fix T60497: edgering select not available with LMB select and MMB emulation.

This is now handled with Ctrl + double click LMB, similar to loop select.

2 years agoFix T60410: Crash adjusting torus w/ enter edit-mode preference
Campbell Barton [Tue, 15 Jan 2019 10:33:01 +0000 (21:33 +1100)]
Fix T60410: Crash adjusting torus w/ enter edit-mode preference

2 years agoCleanup: pass main instead of context w/ ED_editors_exit/flush_edits
Campbell Barton [Tue, 15 Jan 2019 10:25:22 +0000 (21:25 +1100)]
Cleanup: pass main instead of context w/ ED_editors_exit/flush_edits

Useful for calling from lower level code.

2 years agoCleanup: rename BKE_libblock_delete to BKE_id_delete.
Bastien Montagne [Mon, 14 Jan 2019 20:24:25 +0000 (21:24 +0100)]
Cleanup: rename BKE_libblock_delete to BKE_id_delete.

2 years agoCleanup: rename BKE_libblock_free_us to BKE_id_free_us.
Bastien Montagne [Mon, 14 Jan 2019 20:08:22 +0000 (21:08 +0100)]
Cleanup: rename BKE_libblock_free_us to BKE_id_free_us.

2 years agoCleanup: removed disabled 'slow but safer' piece of code in make_local process.
Bastien Montagne [Mon, 14 Jan 2019 15:24:50 +0000 (16:24 +0100)]
Cleanup: removed disabled 'slow but safer' piece of code in make_local process.

Has been disabled for nearly two years now, think we can safely assume
new, quicker code is working properly now. :)

2 years agoCleanup: Remove deprecated BKE_libblock_free(_ex) functions, document BKE_id_free...
Bastien Montagne [Mon, 14 Jan 2019 15:22:27 +0000 (16:22 +0100)]
Cleanup: Remove deprecated BKE_libblock_free(_ex) functions, document BKE_id_free(_ex) ones.

2 years agoCleanup: replace usages of deprecated BKE_libblock_free_ex by BKE_id_free_ex.
Bastien Montagne [Mon, 14 Jan 2019 15:15:15 +0000 (16:15 +0100)]
Cleanup: replace usages of deprecated BKE_libblock_free_ex by BKE_id_free_ex.

2 years agoCleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free.
Bastien Montagne [Mon, 14 Jan 2019 14:47:11 +0000 (15:47 +0100)]
Cleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free.

2 years agoCleanup BKE_id_free_ex().
Bastien Montagne [Mon, 14 Jan 2019 14:38:05 +0000 (15:38 +0100)]
Cleanup BKE_id_free_ex().

Add 'missing' bpy code from BKE_libblock_free_ex(), now both functions
do exactly the same thing, only the later is less flexible (fewer
'exotic' behaviors supported, like handling IDs outside of bmain etc.).

Next step: nuke usages of BKE_libblock_free functions, makes no sense to
have twice the same code around!

2 years agoCorrect last commit
Campbell Barton [Tue, 15 Jan 2019 07:54:43 +0000 (18:54 +1100)]
Correct last commit

2 years agoFix T60507: Constrained transform shows all axes
Campbell Barton [Tue, 15 Jan 2019 07:39:11 +0000 (18:39 +1100)]
Fix T60507: Constrained transform shows all axes

Regression in 579c01da600dd

Move values_modal_offset use out of applyMouseInput
to resolve order of initialization issue.

2 years agoRevert fix for T48901: Use of XIWarpPointer
Campbell Barton [Tue, 15 Jan 2019 05:44:08 +0000 (16:44 +1100)]
Revert fix for T48901: Use of XIWarpPointer

Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383

2 years agoRevert fix for T48901: Use of XIWarpPointer
Campbell Barton [Tue, 15 Jan 2019 05:44:08 +0000 (16:44 +1100)]
Revert fix for T48901: Use of XIWarpPointer

Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383

2 years agoFix T60504: Armature wire draw type hidden when unselected
Campbell Barton [Tue, 15 Jan 2019 02:58:40 +0000 (13:58 +1100)]
Fix T60504: Armature wire draw type hidden when unselected

2 years agoFix T60506: Menu toggle clicks pass through to area
Campbell Barton [Tue, 15 Jan 2019 00:42:07 +0000 (11:42 +1100)]
Fix T60506: Menu toggle clicks pass through to area

2 years agoCMake: Improve handling of missing TBB & OpenVDB
Guillermo S. Romero [Tue, 15 Jan 2019 00:13:31 +0000 (11:13 +1100)]
CMake: Improve handling of missing TBB & OpenVDB

2 years agoFix T60512: Weight paint brushes show weight when unused
Campbell Barton [Tue, 15 Jan 2019 00:03:33 +0000 (11:03 +1100)]
Fix T60512: Weight paint brushes show weight when unused

2 years agoCleanup: use BrushCapabilities prefix for RNA types
Campbell Barton [Mon, 14 Jan 2019 23:53:02 +0000 (10:53 +1100)]
Cleanup: use BrushCapabilities prefix for RNA types

2 years agoCleanup: style
Campbell Barton [Mon, 14 Jan 2019 21:47:04 +0000 (08:47 +1100)]
Cleanup: style

2 years agoEdit Mesh: Improve selected double vertices visibility
Clément Foucault [Mon, 14 Jan 2019 22:42:52 +0000 (23:42 +0100)]
Edit Mesh: Improve selected double vertices visibility

The issue is that the edge fix geometry goes on top of the actual drawn
points.

This commit reduce the edge fix size to the strict minimum but does not
get rid of it.

Related to T60139

2 years agoFix T59482: Creating 2 Particle systems breaks the app
Clément Foucault [Mon, 14 Jan 2019 17:48:21 +0000 (18:48 +0100)]
Fix T59482: Creating 2 Particle systems breaks the app

2 years agoUI: indent subpanel headers more.
Harley Acheson [Mon, 14 Jan 2019 18:32:58 +0000 (19:32 +0100)]
UI: indent subpanel headers more.

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

2 years agoWindows: add support for Windows Ink.
Christopher Peerman [Mon, 14 Jan 2019 16:46:49 +0000 (17:46 +0100)]
Windows: add support for Windows Ink.

Before this Blender always needed the Wintab driver. This adds support for the
native pressure API in Windows 8+, making it possible to get pressure sensitivity
on e.g. Microsoft Surface hardware without any extra drivers.

By default Blender will automatically use Wintab if available, and if not use
Windows Ink instead. There is also a new user preference to explicitly specify
which API to use if automatic detection fails.

Fixes T57869: no pressure sensitivity with Surface pen or laptop.

Code by Christopher Peerman with some tweaks by Brecht Van Lommel.

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

2 years agoCleanup: refactor GHOST wintab handling.
Brecht Van Lommel [Mon, 14 Jan 2019 18:12:02 +0000 (19:12 +0100)]
Cleanup: refactor GHOST wintab handling.

2 years agoFix T60476 Loose vertices only partially drawn
Clément Foucault [Mon, 14 Jan 2019 17:32:45 +0000 (18:32 +0100)]
Fix T60476 Loose vertices only partially drawn

Was caused by a missing vbo attachement.

Also fix said Vbo refreshing when selecting.

2 years agoObject Mode: Outlines: Add support for thicker outline
Clément Foucault [Mon, 14 Jan 2019 17:20:04 +0000 (18:20 +0100)]
Object Mode: Outlines: Add support for thicker outline

Base outline is 2px wide (because of how we detect them).
And since inflating this outline will only produce outlines that are 2*x
thick we map the UI scalling and the outline width setting to the closest
match.

Do note that thicker outlines have a performance cost since they need more
texture fetches and passes.

This fixes T60252 3D View Outline Width not working

2 years agoGPUMaterial: Cleanup
Clément Foucault [Mon, 14 Jan 2019 16:34:03 +0000 (17:34 +0100)]
GPUMaterial: Cleanup

2 years agoFix T60332: Lattice objects do not display properly in Edit mode
Clément Foucault [Mon, 14 Jan 2019 15:26:32 +0000 (16:26 +0100)]
Fix T60332: Lattice objects do not display properly in Edit mode

This was caused by wires not having alpha by default, making them disapear
with MSAA.

2 years agoFix incorrect individual origins icon in clip editor.
Sebastian Koenig [Mon, 14 Jan 2019 16:35:29 +0000 (17:35 +0100)]
Fix incorrect individual origins icon in clip editor.

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

2 years agoNLA: implement a new blending mode that intelligently combines actions.
Alexander Gavrilov [Sun, 23 Dec 2018 15:43:01 +0000 (18:43 +0300)]
NLA: implement a new blending mode that intelligently combines actions.

The existing Add and Multiply blending modes have limited usability,
because the appropriate operation for meaningfully combining values
depends on the channel. This adds a new mode that chooses the operation
automatically based on property settings:

- Axis+Angle channels are summed, effectively averaging the
  axis, but adding up the angle. Default is forced to 0.

- Quaternion channels use quaternion multiplication:

  result = prev * value ^ influence

- Scale-like multiplicative channels use multiplication:

  result = prev * (value / default) ^ influence

- Other channels use addition:

  result = prev + (value - default) * influence

Inclusion of default in the computation ensures that combining
keyframed default values of properties keeps the default state,
even if the default isn't 0 or 1.

Strips with this mode can be keyframed normally in Tweak mode,
except that for quaternion rotation keyframing always inserts
all 4 channels, and the channel value sliders on the left side
of Graph/Action editors won't insert keys without Auto Key.
Quaternion keys are also automatically normalized.

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

2 years agoKeyframing: refactor insertion code to allow property-global NLA tweaks.
Alexander Gavrilov [Tue, 8 Jan 2019 15:49:38 +0000 (18:49 +0300)]
Keyframing: refactor insertion code to allow property-global NLA tweaks.

Supporting a strip blending type that treats quaternions as a unit
also means being able to adjust all sub-channels as a unit when
inserting keyframes. This requires refactoring keyframe insertion
code to retrieve array property values for all channels at once,
before iterating over the indices being inserted.

2 years agoFix the active sequencer strip not standing out from selected ones.
Brecht Van Lommel [Mon, 14 Jan 2019 15:07:20 +0000 (16:07 +0100)]
Fix the active sequencer strip not standing out from selected ones.

Set outline contrast back to 2.7 values.

2 years agoBuild environment: fixes for Linux debug libraries build.
Brecht Van Lommel [Mon, 14 Jan 2019 14:09:48 +0000 (15:09 +0100)]
Build environment: fixes for Linux debug libraries build.

2 years agoCleanup: add begin/end iterators to Cycles NodeEnum.
Alex Fuller [Mon, 14 Jan 2019 14:42:54 +0000 (15:42 +0100)]
Cleanup: add begin/end iterators to Cycles NodeEnum.

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

2 years agoFix Cycles node definition typos and incorrect enum value.
Alex Fuller [Mon, 14 Jan 2019 14:41:24 +0000 (15:41 +0100)]
Fix Cycles node definition typos and incorrect enum value.

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

2 years agoUI: fix misaligned eyedropper icon in button.
Harley Acheson [Mon, 14 Jan 2019 14:02:49 +0000 (15:02 +0100)]
UI: fix misaligned eyedropper icon in button.

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

2 years agoUI: fix panel header contents alignment.
Harley Acheson [Mon, 14 Jan 2019 14:02:21 +0000 (15:02 +0100)]
UI: fix panel header contents alignment.

The contents is now properly centered at all zoom levels.

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

2 years agoUI: fix horizontal scrollbar overlapping last item.
Harley Acheson [Mon, 14 Jan 2019 14:01:51 +0000 (15:01 +0100)]
UI: fix horizontal scrollbar overlapping last item.

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

2 years agocleanup last commit
Jacques Lucke [Mon, 14 Jan 2019 13:13:39 +0000 (14:13 +0100)]
cleanup last commit

2 years agoFix T60304, T60301: setting error message in bevel modifier results in double free
Jacques Lucke [Mon, 14 Jan 2019 13:10:33 +0000 (14:10 +0100)]
Fix T60304, T60301: setting error message in bevel modifier results in double free

2 years agoFix T60441: entering hex color in picker gives wrong result.
Brecht Van Lommel [Mon, 14 Jan 2019 12:09:06 +0000 (13:09 +0100)]
Fix T60441: entering hex color in picker gives wrong result.

2 years agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 14 Jan 2019 11:43:34 +0000 (12:43 +0100)]
Merge branch 'blender2.7'

2 years agoFix T55589: drawing strokes with Microsoft surface pen misses first part.
Christopher Peerman [Mon, 14 Jan 2019 11:15:59 +0000 (12:15 +0100)]
Fix T55589: drawing strokes with Microsoft surface pen misses first part.

This disables touch gesture recognition in Blender, avoiding any initial delay
when drawing with grease pencil, texture paint, etc.

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

2 years agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 14 Jan 2019 11:13:10 +0000 (12:13 +0100)]
Merge branch 'blender2.7'

2 years agoFix T60450: Cycles broken GPU denoising after recent changes.
Brecht Van Lommel [Mon, 14 Jan 2019 10:42:38 +0000 (11:42 +0100)]
Fix T60450: Cycles broken GPU denoising after recent changes.

2 years agoFix toolbar accelerator w/ user defined keyconfig
Campbell Barton [Mon, 14 Jan 2019 07:59:26 +0000 (18:59 +1100)]
Fix toolbar accelerator w/ user defined keyconfig

2 years ago3D View: don't override animation template view color
Campbell Barton [Mon, 14 Jan 2019 07:09:52 +0000 (18:09 +1100)]
3D View: don't override animation template view color

D4198 by @charlie w/ edits.

2 years agoCleanup: unused function
Campbell Barton [Mon, 14 Jan 2019 07:04:10 +0000 (18:04 +1100)]
Cleanup: unused function

2 years agoAdd font selection to VSE text strips
Richard Antalik [Mon, 14 Jan 2019 05:28:07 +0000 (21:28 -0800)]
Add font selection to VSE text strips

Allows users to select a font for text strips in the video sequence editor.

Related: 3610f1fc43d0 Sequencer: refactor clipboard copy to no longer increase user count.

Reviewed by: Brecht

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

2 years agoFix crash on scene unlink
Richard Antalik [Mon, 14 Jan 2019 05:25:29 +0000 (21:25 -0800)]
Fix crash on scene unlink

Reviewed by: Brecht

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

2 years agoFix drawing metadata
Richard Antalik [Mon, 14 Jan 2019 05:23:32 +0000 (21:23 -0800)]
Fix drawing metadata

ImBuf was freed prior to drawing metadata.

Reviewed by: Brecht

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

2 years agoFix FPS meter not showing properly with no input
Richard Antalik [Mon, 14 Jan 2019 05:21:57 +0000 (21:21 -0800)]
Fix FPS meter not showing properly with no input

Reviewed by: Brecht

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

2 years agoCleanup: move comments above definitions
Campbell Barton [Mon, 14 Jan 2019 05:30:43 +0000 (16:30 +1100)]
Cleanup: move comments above definitions

For clang-format not to wrap definitions.

2 years agoCleanup: move comments above definitions
Campbell Barton [Mon, 14 Jan 2019 05:15:33 +0000 (16:15 +1100)]
Cleanup: move comments above definitions

For clang-format not to wrap definitions.

2 years agoCleanup: move comments above definitions, use enum
Campbell Barton [Mon, 14 Jan 2019 04:58:40 +0000 (15:58 +1100)]
Cleanup: move comments above definitions, use enum

For clang-format not to wrap definitions.

2 years agoFix T60248: Crash duplicating collections
Campbell Barton [Mon, 14 Jan 2019 04:36:12 +0000 (15:36 +1100)]
Fix T60248: Crash duplicating collections

2 years agoFix T57852: Mesh X Mirror option not working
Campbell Barton [Mon, 14 Jan 2019 03:59:18 +0000 (14:59 +1100)]
Fix T57852: Mesh X Mirror option not working

D3869 by @lichtwerk w/ own edits

2 years agoFix T60388: Warning entering text edit mode
Campbell Barton [Mon, 14 Jan 2019 03:16:08 +0000 (14:16 +1100)]
Fix T60388: Warning entering text edit mode

2 years agoFix message bus ID remapping
Campbell Barton [Mon, 14 Jan 2019 03:08:01 +0000 (14:08 +1100)]
Fix message bus ID remapping

2 years agoFix T60267: Assert manipulating a collection
Campbell Barton [Mon, 14 Jan 2019 02:58:38 +0000 (13:58 +1100)]
Fix T60267: Assert manipulating a collection

2 years agoCleanup: move comments above definitions
Campbell Barton [Mon, 14 Jan 2019 01:41:01 +0000 (12:41 +1100)]
Cleanup: move comments above definitions

For clang-format not to wrap definitions.

2 years agoCleanup: compiler warnings
Campbell Barton [Mon, 14 Jan 2019 00:42:28 +0000 (11:42 +1100)]
Cleanup: compiler warnings

2 years agoNLA: ignore time range when evaluating a raw action.
Alexander Gavrilov [Sat, 12 Jan 2019 11:10:09 +0000 (14:10 +0300)]
NLA: ignore time range when evaluating a raw action.

When editing an action without a strip, or tweaking a strip without
time mapping enabled or supported, the extents of the virtual strip
can't be controlled and are purely derived from keys in the action.

Thus, cutting off evaluation of the action at these arbitrary points
gets in the way of observing the natural extrapolation of the F-Curves
and thus appears to be a mis-feature.

With this change non-mapped actions are evaluated with infinite
range, exactly like they are handled without NLA, unless extend
mode is set to Nothing.

2 years agoGP: Cleanup missing brackets
Antonioya [Sat, 12 Jan 2019 07:36:00 +0000 (08:36 +0100)]
GP: Cleanup missing brackets

2 years agoViewport: Stereoscopy drawing is back
Dalai Felinto [Fri, 11 Jan 2019 15:38:18 +0000 (13:38 -0200)]
Viewport: Stereoscopy drawing is back

The viewport stereoscopy support helpers are finally ported to 2.80.

We now can scale the camera and the "stereo cameras" will scale
in the viewport as well (unlike 2.7x).

At the moment I disabled the drawing of the camera frame when
stereo is selected and you are looking through the camera.

It is to be fixed later, but for now it draws the border wrong.
In 2.79 this was not a problem because the camera frame was drawn
afterwards as a hack.

Viewport > Stereoscopy:
* Cameras
* Convergence plane
* Convergence plane alpha
* Stereoscopy volume
* Stereoscopy volume alpha

2 years agoBKE_camera_multiview_model_matrix: Add _scaled version
Dalai Felinto [Fri, 11 Jan 2019 20:58:09 +0000 (18:58 -0200)]
BKE_camera_multiview_model_matrix: Add _scaled version

For drawing it is useful to have the non-normalized version of the matrix.
So we can scale up the cameras drawing accordingly.

2 years agoDrawing API: shgroup_instance and shgroup_instance_alpha clarification
Dalai Felinto [Fri, 11 Jan 2019 19:50:45 +0000 (17:50 -0200)]
Drawing API: shgroup_instance and shgroup_instance_alpha clarification

shgroup_instance_alpha was getting a color[4] but would only use the
alpha defined upon creation of the shading group.

This was very limiting since it wouldn't allow for different instances
to have different alpha values.

Patch made with Clément Foucault (he made the code of it, while I fixed
all the parts of the code that were relying on shgroup_instance_alpha.

2 years agoFix T60328: Stereoscopy Convergence Plane broken
Dalai Felinto [Fri, 11 Jan 2019 12:47:48 +0000 (10:47 -0200)]
Fix T60328: Stereoscopy Convergence Plane broken

The original issue is that we were changing the camera shiftx
temporarily for the stereoscopic calculation. However we are using the
evaluated object when calculating the projection matrix.

Note: Camera framing drawing for stereo still seems to be broken.
But the viewport itself is now correct.

2 years agoFix T60401: Shape key's from pointer being set to evaluated CoW ID.
Bastien Montagne [Fri, 11 Jan 2019 22:13:29 +0000 (23:13 +0100)]
Fix T60401: Shape key's from pointer being set to evaluated CoW ID.

Not sure exactly why this happened for 'apply as shape' and not in other
cases (did not took time to fully trace what happens there). But in any
case, `BKE_key_evaluate_object_ex()` can be called from a fair amount of
places, including during depsgraph evaluation, so setting back key's
owner here is plain wrong in CoW era.

2 years agoFix T60402: Increased data.users value, when running: C.active_object.to_mesh(C.depsg...
Bastien Montagne [Fri, 11 Jan 2019 19:26:52 +0000 (20:26 +0100)]
Fix T60402: Increased data.users value, when running: C.active_object.to_mesh(C.depsgraph, True) - on curve.

More like a band-aid than anything else really, that code is horribly
weak and need to be fully re-written at some point (putting all those
temp data-blocks fully outside of bmain...). But for now should do.

2 years ago=Fix unused func warning in GP code...
Bastien Montagne [Fri, 11 Jan 2019 19:14:25 +0000 (20:14 +0100)]
=Fix unused func warning in GP code...