Commit Graph

17840 Commits

Author SHA1 Message Date
Bastien Montagne dac6091207 Fix (unreported) crash on use-after-free in liboverride deletion code. 2020-04-16 16:21:11 +02:00
Bastien Montagne 0438944b34 Refactor/strengthen a bit invalid operands checks when applying an override operation. 2020-04-16 16:21:11 +02:00
Clément Foucault e08ac50a5c Fix T75443 Color Management: Use after free crash when using curve mapping
The root cause is that viewport can draw cached version of themself but
the scene can have been updated and the pointed curvemapping could have
been freed.

To workaround this we just keep a copy of the curvemap at the viewport
level.
2020-04-15 22:30:55 +02:00
Aaron Carlisle e9a3a1afd1 Mantaflow: Change Defaults to Improve Instantaneous Playback
- Change the default cache method to replay
- Change the default resolution to 32 (The same as old smoke)
  which have a speedup of about 4x (~4 FPS vs. ~16 FPS on initial 
playback)

Peformance was tested with 3700x and RTX 2070

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

Fixes T73799
2020-04-15 13:54:08 -04:00
Nathan Letwory 54736d5058
Bump release cycle to beta for 2.83 2020-04-15 15:03:05 +03:00
Campbell Barton 0d4eefd231 Fix T75712: Sequencer text strip doesn't scale to render size 2020-04-15 14:20:14 +10:00
Pablo Dobarro 47f46637be Sculpt: New Layer Brush
The Layer brush was in Blender before 2.81, when the sculpt API was
introduced. It had a huge amount of bugs and glitches which made it
almost unusable for anything but the most trivial cases. Also, it needed
some hacks in the code just to support the persistent base.

The brush was completely rewritten using the Sculpt API. It fulfills the
same use case as the old one, but it has:
- All previous artifacts fixed
- Simpler code
- Persistent base now works with multires thanks to the sculpt API
- Small cursor widget to preview the layer height
- More controllable and smoother strength and deformation
- More correct masking support
- More predictable invert support. When using persistent base, the brush invert mode resets to layer height 0, instead of jumping from +1 to -1. The brush can still be inverted in the brush direction property.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7147
2020-04-14 21:07:29 +02:00
Bastien Montagne dc66fa5c9c Fix T75589: Image Sequences have no data on file load.
Issue was with setting of frame to load from an image sequence,
synchronization was not done properly at some point, leading to
generation of an invalid final filepath to be read.
2020-04-14 18:12:59 +02:00
Vincent Blankfield 50dd876fbf Fix T75629: Disallow dragging collection instance into itself
Differential Revision: https://developer.blender.org/D7408
2020-04-14 15:12:26 +02: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
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 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 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
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
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
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
Hans Goudey d7273f087d Fix T75405: Crash when increasing text object bevel depth
One fewer coordinate needs to be calculated when extrusion is zero to
avoid corrupting the end of the memory chunk.

Differential Revision: https://developer.blender.org/D7368
2020-04-09 15:29:49 -05:00
Szymon Ulatowski f3433fcd3b Collections: preserve exclude flag of child collections when unexcluding
Excluding a collection also changes the exclude setting on all child collections
so that it is possible to selectively enable some children without the parent
being enabled.

This change makes it so that if you unexclude the parent, the exclude setting
of children are restored again instead of being permanently lost.

Original patch by Szymon with modifications by Brecht.

Differential Revision: https://developer.blender.org/D7016
2020-04-09 21:46:22 +02:00
Dalai Felinto 07bb7206c2 Cleanup: VSE rename i to view_id for stereo 3d code 2020-04-09 21:01:49 +02:00
Brecht Van Lommel 78f56d5582 TaskScheduler: Minor Preparations for TBB
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636}
Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0}

Differential Revision: https://developer.blender.org/D7385
2020-04-09 19:18:14 +02:00
Sybren A. Stüvel 464752876f Fix T75490: Child Of - difference between 2.82 and 2.83
rB10162d68e385 introduced a difference in computing the matrix, as well
as a better way to compute the inverse matrix. This commit reverts the
former, while keeping the latter and some other improvements.
2020-04-09 15:04:48 +02:00
Sebastián Barschkis a6d8f6c0f3 Fluid: Fix unused variables
Unsed variables for fluid caching.
2020-04-09 12:35:22 +02:00
Bastien Montagne 80255e67e3 Silence assert on ID usercount for deprecated IPO.
We do not really care about those, so just avoid the noise when loading
very old files...

Re T75389.
2020-04-09 11:21:02 +02:00
Sergey Sharybin 36746474fd Tracking: Forward compatibility code for distortion models
Allows to open newer files in older Blender after new distortion model
has been added.

It will behave as if this is a polynomial model with all 0 coefficients
which are then being refined and assigned explicitly after solving the
motion.
2020-04-09 10:59:31 +02:00
Campbell Barton 19352bca16 Cleanup: spelling 2020-04-05 22:22:21 +10:00
Antonio Vazquez d41d4d0593 GPencil: Small changes to brush defaults 2020-04-08 19:03:17 +02:00
Sergey Sharybin b0f229dd27 Tracking: Fix missing distortion update on focal length change 2020-04-08 17:19:21 +02:00
Sebastián Barschkis ff2c67d7e8 Fluid: Disable subframes when using adaptive time-steps in the first frame
First frame should only produce inflow once and not compute the emission for the frame before the first frame. Problem became evident in T74062.
2020-04-08 13:42:40 +02:00
Campbell Barton a3c1605581 Cleanup: rename to BLI_path_cwd to BLI_path_abs_from_cwd
This is now more clearly a function that makes the path absolute
using the current working directory.
2020-04-08 16:46:16 +10:00
Campbell Barton b0d565e5b6 Cleanup: reduce scope of variables in custom data copying 2020-04-08 16:27:59 +10:00
Campbell Barton 35861a49ee Fix T67098: Inset causes shape keys to reset exiting edit-mode
Edit-mesh interactive redo reset the meshes shape-key index.

Also copy the selection mode when copying meshes.
2020-04-08 16:26:54 +10:00
Campbell Barton 1ec2f8d1f2 Cleanup: spelling 2020-04-08 10:33:56 +10:00
Harley Acheson 968619d036 UI: Language Selection Changes
Removal of 'Translation' checkbox. Enable translation options when selecting non-English languages.

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

Reviewed by Brecht Van Lommel
2020-04-07 13:25:49 -07:00
Brecht Van Lommel c5ed2eb95e Undo: change depsgraph recalc flags handling to improve performance
These changes only have an effect when the experimental Undo Speedup preference
is enabled.

* For DEG_id_tag_update, accumulate recalc flags immediately before the undo
  push happens instead of afterwards. Otherwise the undo state does not
  contain enough flags, and the current state may contain too many flags.

  This also means we call DEG_id_tag_update after undo with the accumulated
  flags to ensure they are flushed to other datablocks.

* For undo, accumulate recalc flags in id->recalc and clear accumulated flags
  immediately. Not clearing would cause circular behavior where accumulated
  flags may never end up being cleared.

  This matches what happens after an undo push where these are also cleared,
  indicating that the undo state and current in-memory state match exactly.

* Don't change id->recalc of identical datablocks, it should not be needed.
  There is one exception for armatures where pointers across datablocks
  exist which otherwise would cause problems. There may be a better solution
  to this but it seems to work in agent 327 production files.

* This contains a change in undofile.c to avoid detecting all datablocks as
  changed for the first of the two undo steps, where we restore to the state
  of the last undo push before going to the one before.

  Without this the whole system is much less efficient. However this is unsafe
  in the sense that if an app handler or operators edits a datablock after an
  undo push, that change will not be undone.

  It can be argued that this is acceptable behavior, since a following undo push
  will include that change and this may already have unexpected side effects.

Ref T60695

Differential Revision: https://developer.blender.org/D7339
2020-04-07 17:14:19 +02:00
Campbell Barton 1de5cb6a31 Cleanup: use doxy sections 2020-04-07 23:23:17 +10:00
Sebastián Barschkis 4a83832120 Fix T74828: Fluid: Crash with Fire/Smoke Noise
Issue was that the noise simulation was trying to bake with a minimized domain size (adaptive domain initializes domain with size (1,1,1)). Similarly to the base resolution bake, there should be no noise baking happening at those domain sizes - a domain at this size is considered empty.
2020-04-07 14:31:33 +02:00
Sebastian Parborg ee43cf5722 Fix T66751: Symmetrizing armature does not symmetrize constraints.
The symmetrize operator now tries to make sure that the armature
constraints are correctly mirrored.

Before it would only mirror the subtargets for the constraints (and that
failed too in some cases).

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D6009
2020-04-07 13:54:22 +02:00
Sergey Sharybin 9fca9b9953 Fix crash using object.to_mesh() when in edit mode
The root of the issue was caused by mesh which was a result of to_mesh()
had the same edit_mesh pointer as the input object, causing double-free
error.

This fix makes it so result mesh does not have edit mesh pointer.
Motivation part behind this is to make the result of to_mesh() to be
somewhat independent from the input.

Differential Revision: https://developer.blender.org/D7361
2020-04-07 12:50:45 +02:00
Campbell Barton d14e768069 Cleanup: BLI_path.h function renaming
Use BLI_path_ prefix, more consistent names:

  BLI_parent_dir              -> BLI_path_parent_dir
  BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
  BLI_ensure_filename         -> BLI_path_filename_ensure
  BLI_first_slash             -> BLI_path_slash_find
  BLI_last_slash              -> BLI_path_slash_rfind
  BLI_add_slash               -> BLI_path_slash_ensure
  BLI_del_slash               -> BLI_path_slash_rstrip
  BLI_path_native_slash       -> BLI_path_slash_native

Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.

  BLI_cleanup_path  -> BLI_path_normalize
  BLI_cleanup_dir   -> BLI_path_normalize_dir
  BLI_cleanup_unc   -> BLI_path_normalize_unc
  BLI_cleanup_unc16 -> BLI_path_normalize_unc16

Clarify naming for extracting, creating numbered paths:

  BLI_stringenc -> BLI_path_sequence_encode
  BLI_stringdec -> BLI_path_sequence_decode

Part of T74506 proposal.
2020-04-07 12:10:36 +10:00
Sebastian Parborg 71b1ee940b Don't take into account time remapping when scrubbing with AV sync.
It would cause the playhead to be remapped to an other frame than the
one you clicked on.
2020-04-06 16:34:15 +02:00
Sergey Sharybin 7e93d4eea3 Tracking: Fix (un)distortion happen in single thread
Need to communicate available number of threads to the camera
intrinsics implementation, otherwise default value of 1 is used.

Must have been single-threaded for a very long time.
2020-04-06 15:18:32 +02:00
Sebastian Parborg 9ddbb03861 Fix T74111: Animation Playback Delayed With Time Remapping And AV-Sync
When setting the current playback time in BKE_sound_play_scene we didn't
account for the frame length. So the current frame/time would be wrong
when we asked the audio playback what time it was.

This would lead to playback being offset when using time remapping and
AV sync.

Reviewed By: Richard Antalik and Sybren A. Stüvel

Differential Revision: http://developer.blender.org/D7248
2020-04-06 13:57:03 +02:00
Philipp Oeser c03e5e7830 Fix T75418: Outliner Blender File view has UNKNOWN category for armatures
Typo in rB57daecc2cf88.

Maniphest Tasks: T75418

Differential Revision: https://developer.blender.org/D7346
2020-04-06 13:27:23 +02:00
Sergey Sharybin ccaf6c7404 Tracking: Fix slow undistored display
TH distortion model was not cached properly, making it so frame is
undistorted on every redraw.
2020-04-06 12:16:28 +02:00
Campbell Barton f9c05f3fc0 Fix f-curve sequencer versioning logic
Screen loop was inside an existing screen loop,
in the body of a function used to initialize the toolbar region.
2020-04-06 20:07:05 +10:00
Sergey Sharybin 2fc30978bc Fix T75297: Apply base inflates meshes with Simple subdivision 2020-04-06 11:47:17 +02:00
Campbell Barton f1bf7bfa1b Cleanup: spelling 2020-04-06 16:02:29 +10:00
Richard Antalik 43cc2f3195 Cleanup: Use `_fn` as a suffix for callbacks in VSE code 2020-04-05 23:39:20 +02:00