2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 29 Nov 2018 08:35:39 +0000 (09:35 +0100)]
Merge branch 'master' into blender2.8

2 years agoAtomic: Avoid conflicts with definitions in other areas
Sergey Sharybin [Thu, 29 Nov 2018 08:33:50 +0000 (09:33 +0100)]
Atomic: Avoid conflicts with definitions in other areas

While atomics library was trying to use "user-space" defined
LIKELY() and UNLIKELY(), this is not always true that user
code was checking for those macro coming from an unrelated

2 years agoUI: menu items for Ctrl-Tab dope sheet/graph switching
Campbell Barton [Thu, 29 Nov 2018 08:07:00 +0000 (19:07 +1100)]
UI: menu items for Ctrl-Tab dope sheet/graph switching

Make this shortcut discoverable.

2 years agoUI: update shortcut display to check space cycling
Campbell Barton [Thu, 29 Nov 2018 07:45:37 +0000 (18:45 +1100)]
UI: update shortcut display to check space cycling

2 years agoKeymap: cycle space-subtypes on successive presses
Campbell Barton [Thu, 29 Nov 2018 07:13:01 +0000 (18:13 +1100)]
Keymap: cycle space-subtypes on successive presses

Some space types are exposed as multiple space types,
previously the key binding to set the space type would use the last
used space-type.

Now pressing the key again cycles to the next space sub-type.

Without this, shortcut display is confusing since some space types share
a key. Keymap display will need to be updated to support this.

2 years agoUI: support enum key shortcut detection
Campbell Barton [Thu, 29 Nov 2018 06:32:35 +0000 (17:32 +1100)]
UI: support enum key shortcut detection

Shows shortcuts in space-selector.

2 years agoFix paint initialization, incorrect pointer checks
Campbell Barton [Thu, 29 Nov 2018 04:19:29 +0000 (15:19 +1100)]
Fix paint initialization, incorrect pointer checks

2 years agoFix T58125: UV Editor transform fails
Campbell Barton [Thu, 29 Nov 2018 03:39:50 +0000 (14:39 +1100)]
Fix T58125: UV Editor transform fails

2 years agoDebug: Assert to ensure layer iterator uses a 3D view
Campbell Barton [Thu, 29 Nov 2018 03:34:48 +0000 (14:34 +1100)]
Debug: Assert to ensure layer iterator uses a 3D view

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 29 Nov 2018 01:55:58 +0000 (12:55 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: correct typo, no need for ./ prefix
Campbell Barton [Thu, 29 Nov 2018 01:53:48 +0000 (12:53 +1100)]
Cleanup: correct typo, no need for ./ prefix

2 years agoFix leak in CPU brand check
Campbell Barton [Wed, 28 Nov 2018 21:22:15 +0000 (08:22 +1100)]
Fix leak in CPU brand check

2 years agoCleanup: simplify transform orientation cycling
Campbell Barton [Thu, 29 Nov 2018 01:49:02 +0000 (12:49 +1100)]
Cleanup: simplify transform orientation cycling

Remove dummy first index, store a pointer to the user orientation
instead of having it store twice (which could get out of sync).

2 years agoCycles: Add sample-based runtime profiler that measures time spent in various parts...
Lukas Stockner [Thu, 29 Nov 2018 01:06:30 +0000 (02:06 +0100)]
Cycles: Add sample-based runtime profiler that measures time spent in various parts of the CPU kernel

This commit adds a sample-based profiler that runs during CPU rendering and collects statistics on time spent in different parts of the kernel (ray intersection, shader evaluation etc.) as well as time spent per material and object.

The results are currently not exposed in the user interface or per Python yet, to see the stats on the console pass the "--cycles-print-stats" argument to Cycles (e.g. "./blender -- --cycles-print-stats").

Unfortunately, there is no clear way to extend this functionality to CUDA or OpenCL, so it is CPU-only for now.

Reviewers: brecht, sergey, swerner

Reviewed By: brecht, swerner

Differential Revision:

2 years agoUI: expand set origin in specials menu
Campbell Barton [Thu, 29 Nov 2018 01:24:20 +0000 (12:24 +1100)]
UI: expand set origin in specials menu

Also remove menu, expand operator instead.

2 years agoFix transform axis orientation cycling
Campbell Barton [Wed, 28 Nov 2018 22:41:44 +0000 (09:41 +1100)]
Fix transform axis orientation cycling

This ignored operator defined orientation.

2 years agoCleanup: remove unused files
Campbell Barton [Wed, 28 Nov 2018 22:03:11 +0000 (09:03 +1100)]
Cleanup: remove unused files

2 years agoCMake: add missing files
Campbell Barton [Wed, 28 Nov 2018 22:01:03 +0000 (09:01 +1100)]
CMake: add missing files

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 28 Nov 2018 21:55:34 +0000 (08:55 +1100)]
Merge branch 'master' into blender2.8

2 years agoCMake: update checker
Campbell Barton [Wed, 28 Nov 2018 21:49:50 +0000 (08:49 +1100)]
CMake: update checker

Support skipping cmake files

2 years agoFix leak in CPU brand check
Campbell Barton [Wed, 28 Nov 2018 21:22:15 +0000 (08:22 +1100)]
Fix leak in CPU brand check

2 years agoUI: rename Center Points -> Origins
Campbell Barton [Wed, 28 Nov 2018 21:19:57 +0000 (08:19 +1100)]
UI: rename Center Points -> Origins

See: T56648

2 years agoGP: Cleanup duplicated code moving to function
Antonioya [Wed, 28 Nov 2018 19:14:48 +0000 (20:14 +0100)]
GP: Cleanup duplicated code moving to function

2 years agoFix broken subdivision surface edit mode cage display.
Brecht Van Lommel [Wed, 28 Nov 2018 19:13:14 +0000 (20:13 +0100)]
Fix broken subdivision surface edit mode cage display.

2 years agoFix COLLADA build warning.
Brecht Van Lommel [Wed, 28 Nov 2018 19:03:20 +0000 (20:03 +0100)]
Fix COLLADA build warning.

This properties does not appear to be used anymore.

2 years agoFix instancing tooltips still using old dupli name.
William Reynish [Wed, 28 Nov 2018 19:01:03 +0000 (20:01 +0100)]
Fix instancing tooltips still using old dupli name.

2 years agoStartup.blend: rename Lamp to Light.
Brecht Van Lommel [Wed, 28 Nov 2018 17:48:02 +0000 (18:48 +0100)]
Startup.blend: rename Lamp to Light.

2 years agoGP: Deselect points if click outside selection area
Antonioya [Wed, 28 Nov 2018 18:44:41 +0000 (19:44 +0100)]
GP: Deselect points if click outside selection area

To make consistent with Left click select, now if click outside any point, all points are deselected.

Reduced the circle of selection to get more precission. The radius used before was too wide.

Note: There is a minimum distance to consider outside selection area.

2 years agoAdd Onion Skin support to Annotations
Antonioya [Wed, 28 Nov 2018 18:19:01 +0000 (19:19 +0100)]
Add Onion Skin support to Annotations

The old onion skinning used in 2.7x has been ported and converted to 2.8. Only basic features have been included. For more advanced onion skin features, use grease pencil objects.

Onion Skin is supported in View 3D and Sequencer.

2 years agoUse term Instancing in the interface
Sergey Sharybin [Wed, 28 Nov 2018 17:20:02 +0000 (18:20 +0100)]
Use term Instancing in the interface

Currently only see this in object's properties, but might
be missing something.

Part of T56648.

2 years agoUse collection and instance terminology in Python API
Sergey Sharybin [Wed, 28 Nov 2018 16:49:52 +0000 (17:49 +0100)]
Use collection and instance terminology in Python API

This follows naming convention agreed on in T56648.

2 years agoFix T56906: Mesh from Curve not working on curves beveled by curves.
Bastien Montagne [Wed, 28 Nov 2018 17:14:40 +0000 (18:14 +0100)]
Fix T56906: Mesh from Curve not working on curves beveled by curves.

Not exactly sure why we did not have cached displist for bevel object
here... But anyway, that conversion operation should really happen
outside of depsgraph evaluation area, so makes sense to do it as when
generating geometry for rendering, imho. Also solves issues like loosing
hidden parts of the curve/surface, etc. Still using viewport resolution
for curves, though.

2 years agocleanup: Collada replaced outdated usage of CD_MTFACE Layers by CD_MLOOPUV
Gaia Clary [Wed, 28 Nov 2018 17:13:58 +0000 (18:13 +0100)]
cleanup: Collada replaced outdated usage of CD_MTFACE Layers by CD_MLOOPUV

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 28 Nov 2018 17:05:59 +0000 (18:05 +0100)]
Merge branch 'master' into blender2.8

2 years agoMore fixes for NUMA on macOS
Sergey Sharybin [Wed, 28 Nov 2018 17:05:35 +0000 (18:05 +0100)]
More fixes for NUMA on macOS

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 28 Nov 2018 16:57:37 +0000 (17:57 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix compilation error on macOS
Sergey Sharybin [Wed, 28 Nov 2018 16:57:04 +0000 (17:57 +0100)]
Fix compilation error on macOS

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 28 Nov 2018 16:55:27 +0000 (17:55 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix compilation error on 32bit Windows
Sergey Sharybin [Wed, 28 Nov 2018 16:54:05 +0000 (17:54 +0100)]
Fix compilation error on 32bit Windows

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 28 Nov 2018 15:52:47 +0000 (16:52 +0100)]
Merge branch 'master' into blender2.8


2 years agoFix building gtests and bplayer after recent NumaAPI addition.
Bastien Montagne [Wed, 28 Nov 2018 15:50:02 +0000 (16:50 +0100)]
Fix building gtests and bplayer after recent NumaAPI addition.

Seriously... like, seriously...

2 years agoFix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.
Bastien Montagne [Wed, 28 Nov 2018 15:23:39 +0000 (16:23 +0100)]
Fix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.

Meshes from evaluated objects may already have modifiers applied, but
that's not the case for curves, we need to do that when converting them
to meshes.

2 years agoUI: Layout tweaks to Studio Lights panel in Preferences.
Pablo Vazquez [Wed, 28 Nov 2018 15:24:55 +0000 (16:24 +0100)]
UI: Layout tweaks to Studio Lights panel in Preferences.

Move Studio Lights panel first, and use single-column layout.

2 years agoWorkbench: Change Studio lighting
Clément Foucault [Wed, 28 Nov 2018 14:57:40 +0000 (15:57 +0100)]
Workbench: Change Studio lighting

This is in order to have more flexible ligthing presets in the future.
The diffuse lighting from hdris was nice but lacked the corresponding
specular information. This is an attempt to make it possible to customize
the lighting and have a cheap/easy/nice-looking pseudo-PBR workflow.

* Add cheap PBR to Workbench with fresnel and better roughness support.
  This improves the look of the metallic surfaces and is easier to control.
* Add ambient light to studio lights settings: just a constant color added
  to the shading.
* Add Smooth option to studio lights settings: This option fakes the
  effect of making the light bigger making the lighting smoother for this
  light. Smoother lights gets reflected like a background hdri.
* Change default light settings to include the smooth params.
* Remove specular highlights from flat shading. (could be added back but
  how do we make it good looking?)
* If specular lighting is disabled, use base color without using metallic.
* Include a lot of code simplification/cleanup/confusion fix.

2 years agoGPU: Add AMD Radeon RX series to macos blitting workaround list
Clément Foucault [Wed, 28 Nov 2018 12:19:04 +0000 (13:19 +0100)]
GPU: Add AMD Radeon RX series to macos blitting workaround list

Fixes T55987

2 years agofix:T58093 Collada Exporter does not create bind_vertex_input and texcoord attribute
Gaia Clary [Wed, 28 Nov 2018 14:27:11 +0000 (15:27 +0100)]
fix:T58093 Collada Exporter does not create bind_vertex_input and texcoord attribute

The Collada exporter used MTFACE layers (deprecated) instead of
CD_MLOOPUV layers. In 2.8 the exporter could no longer find the UVMaps

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 28 Nov 2018 13:42:38 +0000 (14:42 +0100)]
Merge branch 'master' into blender2.8

2 years agoTweaks for threading schedule for Threadripper2 and EPYC
Sergey Sharybin [Tue, 27 Nov 2018 17:21:43 +0000 (18:21 +0100)]
Tweaks for threading schedule for Threadripper2 and EPYC

The idea is to make main thread and job threads to be scheduled
on CPU dies which has direct access to memory (those are NUMA
nodes 0 and 2).

We also do this for new EPYC CPUs since their NUMA nodes 1 and 3
do have access but only to a higher range DDR slots. By preferring
nodes 0 and 2 on EPYC we make it so users with partially filled
DDR slots has fast memory access.

One thing which is not really solved yet is localization of
memory allocation: we do not guarantee that memory is allocated
on the closest to the NUMA node DDR slot and hope that memory
manager of OS is acting in favor of us.

2 years agoAdd utility function to query CPU brand string
Sergey Sharybin [Tue, 27 Nov 2018 16:28:36 +0000 (17:28 +0100)]
Add utility function to query CPU brand string

2 years agoAdd cross-platform NUMA library
Sergey Sharybin [Tue, 27 Nov 2018 16:13:54 +0000 (17:13 +0100)]
Add cross-platform NUMA library

Makes it simple to use NUMA libraries on various platforms.

2 years agoOutliner/visibility: revert changes for now until we find better solutions.
Brecht Van Lommel [Wed, 28 Nov 2018 13:05:08 +0000 (14:05 +0100)]
Outliner/visibility: revert changes for now until we find better solutions.

See T57857 for discussion. This reverts:

"Outliner: Do not gray out empty collections"

"Remove eye column from the outliner"

Fix/workaround issues in pose and edit mode"

"Per view-layer collection visibility"

2 years agoFix defined but unused static variable warning
Sergey Sharybin [Wed, 28 Nov 2018 13:13:42 +0000 (14:13 +0100)]
Fix defined but unused static variable warning

2 years agoUI: rename settings back to preferences.
Brecht Van Lommel [Wed, 28 Nov 2018 11:21:49 +0000 (12:21 +0100)]
UI: rename settings back to preferences.

This distinguishes it better for the many other types of settings.

Ref T54115.

2 years agoTool System: support for dynamic tooltips
Campbell Barton [Wed, 28 Nov 2018 12:52:05 +0000 (23:52 +1100)]
Tool System: support for dynamic tooltips

Tools can define a function that generates the tooltip using a function,
this takes the tools keymap as an argument which can be used
to extract keys to include in the tip.

2 years agoPyAPI: add KeyMapItem.to_string() method
Campbell Barton [Wed, 28 Nov 2018 12:24:10 +0000 (23:24 +1100)]
PyAPI: add KeyMapItem.to_string() method

Useful for generating dynamic tooltips that include shortcuts.

2 years agoDefaults: left click select is now the default.
Brecht Van Lommel [Tue, 27 Nov 2018 15:09:02 +0000 (16:09 +0100)]
Defaults: left click select is now the default.

A few reasons motivating this change:
* It works well for all devices: mouse, trackpad, and tablet pens.
* For beginners or users coming from other software, it's easier to get
  started and avoids an initial stumbling block.
* Many users in 2.7 (about half?) were already using left click select, so
  combined with the above advantages it makes for a practical default.

Note that we continue to support right click select, as many experienced
Blender users (and developers) see efficiency advantages in this approach.

The option to switch is in the first time setup splash screen, and in the
user preferences.

2 years agoFix curve stats when using modifiers.
Bastien Montagne [Wed, 28 Nov 2018 10:21:56 +0000 (11:21 +0100)]
Fix curve stats when using modifiers.

Curve/surface/text final data may be an evaluated mesh instead of a
displist, when some modifiers (constructive ones in particular) are
applied to it.

Note that this is just getting feet wet, whole draw code suffers from
the same issue! :P

2 years agoFix/workaround issues in pose and edit mode
Sergey Sharybin [Wed, 28 Nov 2018 09:36:07 +0000 (10:36 +0100)]
Fix/workaround issues in pose and edit mode

Edit mode was unable to select, pose mode was unable to move bones.

2 years agoFix crash entering editmode
Campbell Barton [Wed, 28 Nov 2018 09:26:07 +0000 (20:26 +1100)]
Fix crash entering editmode

2 years agoTransform: use scene-orientation for MMB axis constraint
Campbell Barton [Wed, 28 Nov 2018 08:48:19 +0000 (19:48 +1100)]
Transform: use scene-orientation for MMB axis constraint

Follows the change made for axis keys.

2 years agoCleanup: quiet keymap float compare warning
Campbell Barton [Wed, 28 Nov 2018 06:50:44 +0000 (17:50 +1100)]
Cleanup: quiet keymap float compare warning

2 years agoCleanup: remove missing operator from UI
Campbell Barton [Wed, 28 Nov 2018 06:48:26 +0000 (17:48 +1100)]
Cleanup: remove missing operator from UI

2 years agoTool System: add node links cut tool
Campbell Barton [Wed, 28 Nov 2018 06:37:40 +0000 (17:37 +1100)]
Tool System: add node links cut tool

2 years agoCleanup: correct assert, remove redundant NULL checks
Campbell Barton [Wed, 28 Nov 2018 06:20:23 +0000 (17:20 +1100)]
Cleanup: correct assert, remove redundant NULL checks

2 years agoGizmo: fix compositor node crop w/ negative rectangles
Campbell Barton [Wed, 28 Nov 2018 06:00:27 +0000 (17:00 +1100)]
Gizmo: fix compositor node crop w/ negative rectangles

min/max could be negative, causing the gizmo to fail.

2 years agoCleanup: correct function signatures
Campbell Barton [Wed, 28 Nov 2018 05:21:24 +0000 (16:21 +1100)]
Cleanup: correct function signatures

2 years agoFix assert opening file selector
Campbell Barton [Wed, 28 Nov 2018 05:20:57 +0000 (16:20 +1100)]
Fix assert opening file selector

2 years agoPer view-layer collection visibility
Dalai Felinto [Wed, 28 Nov 2018 02:49:36 +0000 (00:49 -0200)]
Per view-layer collection visibility

We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.

If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.

Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.

Development Note:

Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.

If this proves to be too slow, we can change.

2 years agoOutliner: Do not gray out empty collections
Dalai Felinto [Wed, 28 Nov 2018 01:06:45 +0000 (23:06 -0200)]
Outliner: Do not gray out empty collections

We can still have a special icon for them, but graying out is not the way to go.

2 years agoRemove eye column from the outliner
Dalai Felinto [Wed, 28 Nov 2018 00:35:24 +0000 (22:35 -0200)]
Remove eye column from the outliner

To control per-viewlayer, per-object visiblity users should either use
the menu or the H shortcuts (H, Alt+H, Shift+H).

Following next will be to have proper per-viewlayer collection
visibility. This will replace the functionality currently at the
viewport collections visibility menu.

2 years agoCorrect error clearing runtime tool in recent commit
Campbell Barton [Wed, 28 Nov 2018 03:11:10 +0000 (14:11 +1100)]
Correct error clearing runtime tool in recent commit

2 years agoWM: remove tool initialization code
Campbell Barton [Wed, 28 Nov 2018 02:57:21 +0000 (13:57 +1100)]
WM: remove tool initialization code

Area initialization handles these cases now.

2 years agoWM: avoid re-initializing tools while resizing areas
Campbell Barton [Wed, 28 Nov 2018 02:50:15 +0000 (13:50 +1100)]
WM: avoid re-initializing tools while resizing areas

Every update caused the gizmo to be recreated.

2 years agoFix tool not being initialized switching windows
Campbell Barton [Wed, 28 Nov 2018 02:41:36 +0000 (13:41 +1100)]
Fix tool not being initialized switching windows

2 years agoRNA: disable animating sequence channel, lock
Campbell Barton [Wed, 28 Nov 2018 01:15:13 +0000 (12:15 +1100)]
RNA: disable animating sequence channel, lock

2 years agoScene: 3D cursor rotation wasn't initialized
Campbell Barton [Wed, 28 Nov 2018 00:50:46 +0000 (11:50 +1100)]
Scene: 3D cursor rotation wasn't initialized

2 years agoMissing from last commit
Campbell Barton [Wed, 28 Nov 2018 00:27:06 +0000 (11:27 +1100)]
Missing from last commit

2 years agoCleanup: remove unused app-template flag
Campbell Barton [Wed, 28 Nov 2018 00:17:08 +0000 (11:17 +1100)]
Cleanup: remove unused app-template flag

2 years agoCleanup: style
Campbell Barton [Wed, 28 Nov 2018 00:18:09 +0000 (11:18 +1100)]
Cleanup: style

2 years agoLocal View: Objects to be selected once back to regular view
Dalai Felinto [Wed, 28 Nov 2018 00:17:23 +0000 (22:17 -0200)]
Local View: Objects to be selected once back to regular view

They were already selected, but we needed to bump depsgraph.

2 years agoTool System: remove custom tool registration
Campbell Barton [Tue, 27 Nov 2018 23:40:02 +0000 (10:40 +1100)]
Tool System: remove custom tool registration

API is not ready for beta (likely to change).

2 years agoTransform: default to user-defined orientation
Campbell Barton [Tue, 27 Nov 2018 23:01:16 +0000 (10:01 +1100)]
Transform: default to user-defined orientation

Previously we tried this but reverted (see 64d40c82c324)
because there wasn't a predictable set of keys to use global-space.

Now the keys are swapped:

- 'GX' always transforms in the user defined orientation.
- 'GXX' always transforms in global space.

As before 'GXXX' cycles back to disabling constraints.

This does have a down side that GXX won't be used for local-space
when the user has global space set.
Also, when global is the user-orientation, pressing GX and GXX
does the same thing.

Note: examples here use GX but could be any transform-mode/axis.

2 years agoUI: Reduce amount of padding between VSE channels.
Pablo Vazquez [Tue, 27 Nov 2018 22:25:48 +0000 (23:25 +0100)]
UI: Reduce amount of padding between VSE channels.

Suggested by cezarfarias on RightClickSelect. Code snippet by MalDuffin.

2 years agoPrint filepath in message when saving userprefs
Campbell Barton [Tue, 27 Nov 2018 21:29:02 +0000 (08:29 +1100)]
Print filepath in message when saving userprefs

Was just printing 'ok' on success.

2 years agotransform_snap_object: Fix snap in edit mode.
mano-wii [Tue, 27 Nov 2018 20:23:13 +0000 (18:23 -0200)]
transform_snap_object: Fix snap in edit mode.

Do not use the texture space of a mesh to pretest the snap.
(The texture space is only really updated when you exit edit mode).

2 years agoKeymap: Change default spacebar action to play
Campbell Barton [Tue, 27 Nov 2018 19:57:25 +0000 (06:57 +1100)]
Keymap: Change default spacebar action to play

This has been a contentious topic: Artists at the Blender-Studio prefer
this behavior, while the user community overwhelmingly prefers 2.7x
operator search. Previously this defaulted to accessing tools
(eg: Space-T activates transform.. Space-R rotate etc) which I still
believe is a better long term default - otherwise we don't have
efficient tool switching for a system we intend to make more use of,
nevertheless as far as I can tell users haven't been keen on adopting
this so far. Show the preference on the setup screen since many users
don't animate and will may want to quickly search or switch tools.

2 years agoModifiers: fix bunch of missing 'self transform' deg relations.
Bastien Montagne [Tue, 27 Nov 2018 20:14:35 +0000 (21:14 +0100)]
Modifiers: fix bunch of missing 'self transform' deg relations.

When a modifier depends on some other object's position, then it also
depends in its own position, this has to be also told to depsgraph.

Fixes several modifiers where moving target would update the modifier,
while moving modified object itself would not.

2 years agoFix missing reset-to-NULL in own recent changes in modifiers utils.
Bastien Montagne [Tue, 27 Nov 2018 19:40:04 +0000 (20:40 +0100)]
Fix missing reset-to-NULL in own recent changes in modifiers utils.

2 years agoMOD_wave: fix various issues.
Bastien Montagne [Tue, 27 Nov 2018 19:36:54 +0000 (20:36 +0100)]
MOD_wave: fix various issues.

Missing dependsOnNormal callback, potential usage of NULL mesh
pointer, style...

2 years agoShrinkwrap: minor simplification of code.
Bastien Montagne [Tue, 27 Nov 2018 19:23:22 +0000 (20:23 +0100)]
Shrinkwrap: minor simplification of code.

2 years agoFix typos.
Bastien Montagne [Tue, 27 Nov 2018 19:17:27 +0000 (20:17 +0100)]
Fix typos.

2 years agoModifiers: cleanup/harmonize deform modifiers code re. mesh source.
Bastien Montagne [Tue, 27 Nov 2018 19:10:41 +0000 (20:10 +0100)]
Modifiers: cleanup/harmonize deform modifiers code re. mesh source.

Also fixes a few issues (like meshdeform's EM variant not using editmesh
data), and adds a few optimizations (like only generating that source
mesh when we do have a vgroup defined in parameters, for modifiers only
using it to access vgroup)...

2 years agoVGroup search: do not try to search for empty string.
Bastien Montagne [Tue, 27 Nov 2018 16:26:22 +0000 (17:26 +0100)]
VGroup search: do not try to search for empty string.

Vgroups always have a non-empty name, this is just loss of time...

2 years agoModifiers: Refactor `MOD_deform_mesh_eval_get()` helper a bit.
Bastien Montagne [Tue, 27 Nov 2018 16:21:16 +0000 (17:21 +0100)]
Modifiers: Refactor `MOD_deform_mesh_eval_get()` helper a bit.

Now that function also takes expected number of vertices, and do the
checks against generated mesh internally.

2 years agoMOD_simpledeform: do not compute mesh when not needed.
Bastien Montagne [Tue, 27 Nov 2018 14:49:30 +0000 (15:49 +0100)]
MOD_simpledeform: do not compute mesh when not needed.

Related to T57972.

2 years agoMOD_smooth: do not compute mesh when not needed.
Bastien Montagne [Tue, 27 Nov 2018 14:11:13 +0000 (15:11 +0100)]
MOD_smooth: do not compute mesh when not needed.

Related to T57972.

2 years agoMOD_smooth: do not compute mesh when not needed.
Bastien Montagne [Tue, 27 Nov 2018 13:26:43 +0000 (14:26 +0100)]
MOD_smooth: do not compute mesh when not needed.

Also fixes potential memory leak.

Related to T57972.

2 years agoCleanup: tweak ED_region_is_overlap checks
Campbell Barton [Tue, 27 Nov 2018 19:26:10 +0000 (06:26 +1100)]
Cleanup: tweak ED_region_is_overlap checks

2 years agoDocs: use float in examples
Campbell Barton [Tue, 27 Nov 2018 19:09:42 +0000 (06:09 +1100)]
Docs: use float in examples

Makes it clear seconds are not integers,
also avoids conversion to float.

2 years agoFix local view undo (T58051)
Dalai Felinto [Tue, 27 Nov 2018 18:42:56 +0000 (16:42 -0200)]
Fix local view undo (T58051)

Like in 2.7x we don't restore the previous view zoom.

This goes along the fact that we don't store viewport navigation
transformations either.