Commit Graph

94940 Commits

Author SHA1 Message Date
Henrik Dick
35b1cc806f Improve Solidify/Bevel Modifier cooperation
Adds a slider to solidify which allows the user to add bevel weight on the outside
or remove bevel weight from the inside.

Also includes a very small improvment for working with subsurface modifier where
the rim edge in complex solidify will now also have a chance to get a crease if
there is only two adjacent edges.

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

Reviewing and minor cleanups: Bastien Montagne (@mont29).
2020-04-14 12:18:22 +02:00
Jacques Lucke
b07e8a24f5 Cleanup: remove unnecessary branch when lib linking constraints
Differential Revision: https://developer.blender.org/D7386

Reviewers: mont29
2020-04-14 11:50:36 +02:00
Bastien Montagne
6e272b9ba4 BLI_math: add min/max utils for chars. 2020-04-14 11:29:46 +02:00
Brecht Van Lommel
47084bac9f Fix T75542: toggling modifier visibility not working correct with undo speedup
The problem was that in direct_link_id_restore_recalc, recalc_undo_accumulated
should contain the changes from the target state to the current state. However
it had already been cleared at that point, to start accumulating changes up to
the next undo push.

Delaying the clear of this flag seems like the obvious solution, but it's hard
to find the right place for that (if there is one). Instead this splits up the
flag into two separate variables.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7402
2020-04-14 11:07:56 +02:00
Campbell Barton
e6d9d5dcc1 UI: improve menu search with dimmed menu prefix
- Show dimmed text for the menu entries leading up to the menu item.
- Show icons between the menu text and menu item.
- Use unicode right pointing triangle instead of arrow.
2020-04-14 18:50:28 +10:00
Campbell Barton
571646ebc1 Cleanup: pass font drawing x/y offset arguments as int's
Internally these values are ints.
2020-04-14 18:41:23 +10:00
Campbell Barton
3bef5d15d8 UI: add spin to extrude menu
This tool wasn't accessible anywhere in the interface
(besides the interactive tool).

Add to extrude since it's a kind of extrusion.
2020-04-14 18:34:07 +10:00
Campbell Barton
0fa7e1efbe UI: correct menu used for dope-sheet 2020-04-14 18:30:27 +10:00
Sergey Sharybin
b2c2d7b7f1 Sculpt: Implement undo of Apply Base during sculpt session
The idea is to push both base mesh geometry and PBVH coordinates
so it is possible to undo everything without loosing data which was
not flushed from sculpt session to base mesh.

It is possible do memory optimization to avoid push custom data
layers which are not touched by operator, but before doing that
better to ensure this is a correct and working approach.

Differential Revision: https://developer.blender.org/D7381
2020-04-14 09:46:17 +02:00
Campbell Barton
9e0b44aae9 Cleanup: ed_util_imbuf sections 2020-04-14 10:49:31 +10:00
Campbell Barton
5f059c8751 Cleanup: spelling 2020-04-14 10:49:31 +10:00
Campbell Barton
9ce83acba4 Cleanup: remove redundant include, clang-format 2020-04-14 10:49:23 +10:00
Antonio Vazquez
ad317a5ffd Fix T75676: Inconsistent "Only selected" GP layers in Dope Sheet
The selection was not checking all modes.
2020-04-13 19:13:04 +02:00
Henrik Dick
5cf7283342 Fix T75032: New complex solidify algorithm handles poorly merging threshold of small geometry details.
* Implemented the algortihm that would merge vertices to the weighted
  center between them.
* Exposed the merge threshold to the user.

The new default tolerance is 0.0001 (versionning code ensures that
previous default value remains in use to avoid any change in existing
files).

Review and minor changes/cleanups from Bastien Montagne (@mont29).
2020-04-13 17:15:16 +02:00
William Reynish
c19f37764d UI: Fix wrong icon used for Unified Color toggle 2020-04-13 15:47:41 +02:00
Antonio Vazquez
2e75172c45 Fix T75677: Annotation in compositor/shading tabs loose AA after drawing stroke
The drawing of annotations in 2D was using a very old code created in 2.6x versions. Now it's using a standard shader as it's done while drawing.
2020-04-13 15:15:47 +02:00
Bastien Montagne
2ec6eca518 Cleanup: unused parameter... 2020-04-13 10:07:12 +02:00
William Reynish
e63d5f40ee Fix T75667: Use of incorrect terminology in the brush_colors_flip operator
- The word 'Flip' is incorrect. 'Swap' or 'Switch' is correct.
  - In Blender, we use 'primary' & 'secondary' color swatches, not 'foreground' and 'background'
2020-04-13 07:49:21 +02:00
Hans Goudey
71a333f56e Fix T75592: Correctly calculate length of curve verts
Previous commit to fix T75405 needed a small change to increase the
length of the front section of the curve when only the front is built.
2020-04-12 18:17:59 -05:00
Richard Antalik
68ba6378b5 VSE: Add sample tool
This tool is set as default tool, so default action on click doesn't have pernament effect.

Reviewed By: campbellbarton

Differential Revision: D7064
2020-04-13 00:28:27 +02:00
Richard Antalik
c456671b53 Refactor sample operator
Move sample operator functions to `ed_util_imbuf.c` and change common functions,
so they can be used in image editor and sequencer.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7315
2020-04-12 23:56:03 +02:00
Richard Antalik
0c9e47705d Fix T75421: Wipe clock and Iris transition not working.
Use enum items in RNA enum definition instead of hard-coded values.

Broken by 5dcb6fb22f3 Cleanup: unused enums

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7342
2020-04-12 23:00:55 +02:00
Richard Antalik
bbf1c83370 Fix T74875: Preview shows previously cached frame after Hard Cut
Add method to invalidate strip cache in range of non-overlapping strip.
Invalidate original strip in range of new strip created by cutting.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7313
2020-04-12 22:42:31 +02:00
Richard Antalik
5081556bb5 Fix T75415: Changing text strip "start" leads to flickering image
Cache must be invalidated before and after transformation,
so all frames are properly invalidated.

This also fixes wrong invalidated type, composite is enough here.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7341
2020-04-12 22:27:28 +02:00
Richard Antalik
5cabf1301a Fix T75382: VSE Strip Adjustments Not Immediately Visible
Cache of effects wasn't invalidated on correct level.

Add invalidation "rule" for invalidating downstream effects.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7343
2020-04-12 22:24:20 +02:00
Richard Antalik
77ca5ab6b0 Fix T74897: VSE animation doesn't work
`seq_free_animdata()` removes fcurve pointers belonging to strips from
`Scene` CoW datablock's `AnimData` during `BKE_scene_graph_update_for_newframe`.
This causes problems with updating animation.

This worked before rBbe2e41c397ba, because `AnimData` was freed by `BKE_animdata_free()`
before `seq_free_animdata()` was executed, so it had no data to operate on and returned
on precondition `if (scene->adt == NULL || scene->adt->action == NULL)`

Reviewed By: mont29, brecht

Maniphest Tasks: T74897

Differential Revision: https://developer.blender.org/D7264
2020-04-12 22:10:13 +02:00
Brecht Van Lommel
5b79e0b80e Fix volume object not rendering correct frame right after loading 2020-04-12 15:44:28 +02:00
Brecht Van Lommel
e2003d9212 UI: reorder adaptive sampling settings in order of importance 2020-04-12 15:44:28 +02:00
Brecht Van Lommel
f16fcb5bd5 Fix volume object not loading frame sequences correct in some cases
Ensure we use the first frame as filepath so we can compute the number of
leading zeros. For file validation, always test the first frame rather than
the current scene frame.
2020-04-12 14:48:23 +02:00
Ray Molenkamp
0a747cd4e3 Cleanup: clang-format 2020-04-11 13:01:19 -06:00
Ray Molenkamp
aeb42cf8ab Cycles/Optix: Support building the optix kernels on demand.
CMake: `WITH_CYCLES_DEVICE_OPTIX` did not respect `WITH_CYCLES_CUDA_BINARIES` causing the optix kernel to be always build at build time.

Code: `device_optix.cpp` did not count on the optix kernel not existing in the default location.

For this to work, one should have before starting blender

1) working nvcc environment
2) Optix SDK installed and the OPTIX_ROOT_DIR environment variable pointing to it which is not set by default

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

Reviewed By: Brecht
2020-04-11 12:59:21 -06:00
Antonio Vazquez
ddfec08514 GPencil: Fix unreported missing update after removing stroke from python 2020-04-11 19:04:05 +02:00
Bastien Montagne
85de07e64c Sanitize and cleanup a bit depsgraph relations building in some modifiers.
This commit mainly:
* Removes some uneeded dependencies to geometry of other objects (since
  we only use positions of those objects...).
* Ensures `DEG_add_modifier_to_transform_relation` is only called once
  per modifier (in one case at least it could be called twice).
* For modifiers using texture mask, only add dependencies to object used
  to generate texture coordinates when there is actually a texture set.

No behavior change expected from this commit...
2020-04-11 17:16:58 +02:00
Bastien Montagne
5cc7036aa3 Factorize some common modifiers depsgraph relation update code.
Add a utility to deal with common 'object or posebone transform' case.
2020-04-11 17:16:58 +02:00
Brecht Van Lommel
b0350d8310 Revert "GPUViewport: Use GPUBatch for viewport drawing"
This reverts commit 862ec829422241878b3345661476d8551935aed2. It causes crashes
on some systems, see T75584.
2020-04-11 16:42:01 +02:00
Harley Acheson
a8d139ca20 Fix for T75595: File Browser and Windows Unicode Paths
Fix for incorrect conversion to utf16 in BLI_file_attributes().

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

Reviewed by Brecht Van Lommel
2020-04-10 14:07:15 -07:00
Cody Winchester
4f9a56cbc4 Modifiers: Add Bone option for Texture Mask Object
This patch adds the option to use an armature bone in place of an object for texture mask coordinates.

This affects the 3 vertex weight modifiers, the displace modifier, the warp modifier, and the wave modifier.

With minor changes from Bastien Montagne (@mont29).

Differential Revision: https://developer.blender.org/D7348
2020-04-10 21:28:59 +02:00
Julian Eisel
d6cefef98f UI: Better support for linked data-blocks in search buttons
In RNA pointer search buttons (i.e. the ones with an eyedropper),
data-blocks were handled badly. It was not possible to select a linked
data-block that had the same name as a local one, which is especially
common with library overrides. Neither was there a hint to tell appart
linked data-blocks and which .blend file they come from.
These issues are addressed now, we show an "L" prefix and the .blend
file name in the search box (like in ID-templates).

Changes here are quite simple, since the heavy lifting was already done
through c20c203b8226.

Addresses T73156.
2020-04-10 20:25:17 +02:00
Julian Eisel
d216a0b505 Fix T75489: Crash on deleting current workspace from the outliner
It should not be possible to delete the current workspace from the
outliner. Show an error message instead.
2020-04-10 17:30:43 +02:00
Howard Trickey
475d7d073a Fix T74800 Bevel modifier generates vertex group weight > 1.0.
Due to floating point approximations, the weights for interpolating
the mdeformvert layer could add up to a tiny bit more than 1.0.
This was not a problem in practice, but the mesh validation routine
used in regression tests was testing for this and therefore failing.
Just changed interpolation of mdeformverts to clamp max to 1.0f.
2020-04-10 11:03:27 -04:00
Germano Cavalcante
ab8e7ffc64 Fix T75378: Crash on clicking in the ghost icon of an appended proxy object 2020-04-10 11:21:55 -03:00
Sebastian Parborg
9a7f5f1bb4 Fix T67232: Multiples targetless IKs in a chain gives weird behaviour (known as FakeIK for FK posing)
The issue was that the deps graph relation builder assumed that all
bones that had a IK constraint on them would be evaluated.  However for
targetless IK bones, only the active bone would receive updates and the
others would be skipped (as those would be treated as if the IK
constraint was disabled).

I didn't see an easy way to solve this from the depsgraph side of
things.

Instead I came up with a solution that I feel is quite strait forward
and reflects what is actually supposed to happen under the hood.

Now all targetless IK constraints are treated as disabled and will not
be added to any relations in the depsgraph.

Instead, a temporary IK constraint will be created when the bone in
question is transformed.  This is basically activating "Auto IK" for the
bone while transforming.

Reviewed By: Sergey, Brecht

Differential Revision: http://developer.blender.org/D7378
2020-04-10 14:01:02 +02:00
Dalai Felinto
9c5b054206 Fix T71546: VSE stereoscopic strips issues with mismatched dimensions
The issue is that the cachiing was adding the right view without the
proper pre-processed buffer.

D7389
2020-04-10 12:44:59 +02:00
Sebastián Barschkis
0b86943641 Fix T74901: Smoke Simulation crashes on eevee and is not persistent on Cycles
Issue was introduced in 5260aaf3b1c8 (fix for T73921).
2020-04-10 12:10:23 +02:00
Antonio Vazquez
03dda57678 Fix T75141: Default template versioning error for grease pencil
The versioning was done only for template because the code was after a return and never was executed for default scene.
2020-04-10 10:54:46 +02:00
Bastien Montagne
da48a8ef50 Fix T74815: Shapekeys animation is blocked after second append of the same object.
Logic to handle shepkeys datablocks in helper in 'make local' code that
checks which ID should be copied, and which can be directly made local,
was wrong.
2020-04-10 10:52:18 +02:00
Philipp Oeser
d3cda49d14 Fix T74657: Grease Pencil Proportional Editing does not work for
'Individual Origins'

Note gpencil doesnt do anything fancy like meshes in
editmesh_islands_info_calc(), but it looks like there is actually no
harm in allowing proportional editing with individual origins & gpencil
editmode.

Maniphest Tasks: T74657

Differential Revision: https://developer.blender.org/D7351
2020-04-10 08:38:34 +02:00
Philipp Oeser
337a7ed292 Pointclouds: fix point drawing
The radius component is only one float. This resulted in only a third of
intended points to draw and could lead to glitches.

Pointcloud drawing will still change a lot in the future, this is just
to be able to work on some simple tools.

Differential Revision: https://developer.blender.org/D7390
2020-04-10 08:34:07 +02:00
Nicholas Rishel
1a3928f33c Fix T75546: Solve possible endless loop in wintab initialisation
Some Wintab drivers report a zero length queue, this causes an unplanned never ending loop.

Differential Revision: https://developer.blender.org/D7392
Reviewed by: Ray Molenkamp
2020-04-09 16:43:09 -06:00
Campbell Barton
5ebbd8f672 Cleanup: comment bone cycling & simplify logic 2020-04-10 08:35:55 +10:00