Commit Graph

4814 Commits

Author SHA1 Message Date
Campbell Barton e062def3b4 Cleanup: spelling 2020-07-15 13:11:22 +10:00
Campbell Barton 0fb08b7cc4 Cleanup: sort header, cmake paths 2020-07-14 16:04:18 +10:00
Lukas Stockner 41e6f9bd43 Cycles: Add control for sun intensity in Sky Texture and change altitude to km
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner e2736afdbe Cycles: Add versioning code for the new Sky Texture model
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:07 +02:00
Brecht Van Lommel 3e4f49fe71 Revert "Fix T78296: Performance - Use Binary Search for MDeformWeight"
This reverts commit 39b525e0f0 and
3121015dce as tests are failing.
2020-07-10 18:03:21 +02:00
Jeroen Bakker 39b525e0f0 Fix T78296: Performance - Use Binary Search for MDeformWeight
Use binary search for querying deform weights.

Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps.

During profiling it was detected that adding new items to the head was faster than adding to the tail.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D8127
2020-07-10 12:09:40 +02:00
Jacques Lucke 580d50091c Particles: Create a simulation state for every Particle Simulation node
Every Particle Simulation node has a name (or a path when it is in a node group).
This name has to be used in the Simulation modifier on a point cloud to see
the particles.

Caching has been disabled for now, because it was holding back development
a bit. To reset the simulation, go back to frame 1.

Currently, there is no way to influence the simulation. There are just some
randomly moving points. Changing that is the next step.
2020-07-09 15:40:27 +02:00
Jacques Lucke 31ad43a3c7 Blenloader: make BLO_read_data_address work in C++ 2020-07-09 15:29:25 +02:00
Bastien Montagne aabfd2fb9b Cleanup: readfile: remove old deprecated OldNewMap for runtime caches. 2020-07-06 16:55:38 +02:00
Bastien Montagne ee3eba902a Runtime cache preservation during undo: add support for nodes and embedded IDs. 2020-07-06 16:55:38 +02:00
Bastien Montagne 0b07f9b717 Fix T78608: Memory leak in Material properties: "Data from SCE".
Caused by recent own refactor of cache presevation handling in readfile,
EEVEE's lightcache are weird birds that can also be saved in .blend
files, need a special handling for those 'persistent' caches...
2020-07-06 15:09:39 +02:00
Sebastian Parborg d7dbf90a02 Clang-tidy: Enable braces-around-statements warning 2020-07-03 21:23:33 +02:00
Brecht Van Lommel 185fe9cd8b Cleanup: compiler warning 2020-07-03 19:12:37 +02:00
Brecht Van Lommel 46fcc12e83 Fix error in new Hair data type file reading 2020-07-03 19:12:36 +02:00
Jacques Lucke 4a5389816b Clang-Tidy: enable readability-named-parameter 2020-07-03 17:07:13 +02:00
Bastien Montagne fac2e63bc0 Fix utterly broken code regarding GPUtextures of MovieClip in readfile.c
Treat those as pure runtime code, reset to NULL by reading code, for
now.

Think those could be handled like Image gputextures (i.e. considered
runtime cache and preserved across undo steps), but probably not
critical for now.
2020-07-03 17:01:21 +02:00
Bastien Montagne 1bdabd7b4f Move MovieClip to new undo cache management system. 2020-07-03 17:01:21 +02:00
Hans Goudey 53d41e1a6f UI: Use sliders and [0, 1] ranges in ocean modifier
The ocean modifier has two properties that use a [0, 10] hard min and
hard max. The values act as factors though, so it makes more sense to
use sliders and a 0 to 1 range.

This commit also bumps the file subversion to avoid repeatedly applying
the change to the properties' range.

Differential Revision: https://developer.blender.org/D8186
2020-07-03 10:28:13 -04:00
Bastien Montagne 3a59c184b9 Move Scene's cache management during undo to new system. 2020-07-03 16:10:33 +02:00
Hans Goudey 19ff145e66 Clang-Tidy: Enable readability-redundant-control-flow 2020-07-03 09:41:55 -04:00
Bastien Montagne c9975088a9 Move volume to new cache management system for undo. 2020-07-03 15:28:09 +02:00
Bastien Montagne aab41401f9 Move bSound cache handling during undo to new system. 2020-07-03 12:56:21 +02:00
Bastien Montagne ae5529c848 Cleanup: do not use magic values for enums... 2020-07-03 12:56:21 +02:00
Bastien Montagne 8e0f8bb3e1 New undo cache management: Add Image IDs.
Some notes:
* `Image.cache` acts as some kind of 'main' cache, when it is NULL
  (could not be restored), other caches should also be cleared. Oddly
  enough, previous code was not clearing **all** caches, could not find
  any reason for that behavior, so new code does a full clear.
* `imamap` is still used for Node previews from scenes' compositor,
  however this is actually fully disabled in `direct_link_node()`.
* For render slots we cannot use offsetof as third part of the cache
  key, so we are using a hash of the slot's name instead.

As far as I can tell, this fixes T76989: Visual glitches when undo after
reload multiple images by script (in Material Preview).
2020-07-03 12:56:21 +02:00
Bastien Montagne 5fa6bd8a8d Readfile/Undo: initial refactor of cache preservation code.
Main goal here is to have better specificity using cache keys, to avoid
same memroy address being re-used messing up with cache pointers
restoration after undo had to re-read a data-block.

Once all caches handling are ported  to this new system, it should fix
random issues like the one reported in T76989.

Part of D8183, refactoring how we preserve caches across undo steps in
readfile code.
2020-07-03 12:56:21 +02:00
Sebastián Barschkis b1d3850333 Cleanup: Fluid renaming from old 'manta' naming to new 'fluid' naming
Changed variable names from mmd, mds, mfs, and mes to fmd, fds, ffs, and fes. The author of this commits lights a candle for all the merge conflicts this will cause.
2020-07-03 11:52:08 +02:00
Pablo Dobarro 438bd82371 Sculpt: Pose Brush option to affect loose parts
This option allows posing meshes with different disconnected elements
using the Pose Brush.

This is achieved by doing the following:
- Creating an ID per vertex that stores the connected component of that vertex.
- By using those IDs, one fake topology connection is created per vertex to the nearest vertex in a different ID. The maximum distance to create that connection is determined by the "Max Element Distance" property. These fake connectivity neighbors are used in the Sculpt API functions iterators, so all the algorithms of the Pose Brush can run without modifications as if everything was part of the same mesh.

In order to make this work, the "Connected only" property of the Pose Brush needs to be disabled. This will add an extra performance cost to the Pose Brush and its preview. To achieve optimal results, max element distance should be as low as possible.

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D7282
2020-06-30 17:43:37 +02:00
Bastien Montagne deb01eb199 LibOverride: Add concept of 'embedded'/'virtual' override.
IDs like embedded ones (master collections, root node trees) cannot be
linked, and thus cannot be real override themselves.

Since they are managed by their owner ID, that one will also have the
overrides for their locally edited properties.

We still need a way to mark them as overridden though, for various UI
and override-internal purposes, this is done using a new ID flag.

Note that since Shae Keys are not linkable, and their pointers are not
editable in RNA, they are also considered as embedded from override
point of view.
2020-06-30 12:19:11 +02:00
Bastien Montagne 0b3313e532 Cleanup: LibOverride: Replace raw pointers checks by proper macros.
This is cleaner, but also crucial to avoid weird issues when behaviors
of those checks are modified...
2020-06-30 12:19:11 +02:00
Hans Goudey 1fa40c9f8a UI: Add shortcuts for modifier panels
The shortcuts act on the modifier with its panel under the mouse.
The following shortcuts are enabled by default:
  - Remove modifier: X, Delete
  - Apply modifier: Ctrl A
  - Duplicate modifier: Shift D
More shortcuts can be added in the keymap.

Each panel can now store a custom data RNA pointer, and a new
function is added to get the custom data for the panel under the
cursor. This custom data could be used to refactor the "List Panel
System" to generalize it and integrate it further with RNA.

The same functionality will be added  in further commits where it
applies to constraints, grease pencil modifiers, and effects.

Differential Revision: https://developer.blender.org/D8031
2020-06-29 15:00:25 -04:00
Campbell Barton 4b96f47831 Docs: correct invalid doxygen params & references 2020-06-27 15:43:20 +10:00
Jacques Lucke 4006cd2d2c Refactor: use new api for expand in blenloader
This is part of T76372.
2020-06-26 16:53:10 +02:00
Jacques Lucke d10990af79 Refactor: use new api for lib linking id properties 2020-06-26 16:04:09 +02:00
Jacques Lucke ea4fa8abb0 Refactor: use new api for lib linking gpencil, palette, key, simulation, ipo and library 2020-06-26 15:44:56 +02:00
Jacques Lucke 14e313bbb2 Refactor: use new api for lib linking hair, pointclout, volume, material, texture and image 2020-06-26 15:39:04 +02:00
Jacques Lucke 96d657cb84 Refactor: use new api for lib linking curve, mesh, cachefiles, armature and vfont 2020-06-26 15:30:43 +02:00
Jacques Lucke 65f07a39b5 Refactor: use new api for lib linking sound, text, camera, light, latt and mball 2020-06-26 15:24:20 +02:00
Jacques Lucke 9ec6b69ed1 Refactor: use new api for lib linking movieclip, world, lightprobe, speaker, paint curve and brush 2020-06-26 15:05:25 +02:00
Jacques Lucke 1ce2457551 Refactor: use new api for lib linking linestyle, object, nodetree and action 2020-06-26 14:52:57 +02:00
Jacques Lucke ede6e739dd Refactor: use new api for lib linking collection, scene and workspaces 2020-06-26 13:56:27 +02:00
Brecht Van Lommel 79c2581bfa Fix T78238: issue loading existing .blend files with Optix viewport denoiser
Also add additional validation to ensure the denoiser is supported before
trying to use it.
2020-06-25 15:39:10 +02:00
Campbell Barton fd5c185beb Cleanup: spelling 2020-06-25 23:14:36 +10:00
Brecht Van Lommel 0a3bde6300 Cycles: add denoising settings to the render properties
Enabling render and viewport denoising is now both done from the render
properties. View layers still can individually be enabled/disabled for
denoising and have their own denoising parameters.

Note that the denoising engine also affects how denoising data passes are
output even if no denoising happens on the render itself, to make the passes
compatible with the engine.

This includes internal refactoring for how denoising parameters are passed
along, trying to avoid code duplication and unclear naming.

Ref T76259
2020-06-24 15:17:36 +02:00
Jacques Lucke f3a8192ef7 Refactor: use new api for lib linking mask, windowmanager and screen
This is part of T76372.
2020-06-23 17:55:23 +02:00
Jacques Lucke 1e0426da7c Refactor: move more modifier specific code out of readfile.c 2020-06-23 17:25:44 +02:00
Jacques Lucke 9ef5cc44a6 Refactor: move blenloader code of bevel modifier 2020-06-23 17:08:39 +02:00
Jacques Lucke 56f9529775 Refactor: move blenloader code of curve profile to blenkernel 2020-06-23 17:08:39 +02:00
Jacques Lucke adcb7a2ce7 Refactor: move blenloader code of surface deform modifier 2020-06-23 16:51:43 +02:00
Jacques Lucke 8b59b97c10 Refactor: move more blenloader code into modifier files 2020-06-23 16:42:08 +02:00
Pablo Dobarro f7bbc7cdbb Sculpt Vertex Colors: Initial implementation
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.

This commit includes:
  - SCULPT_UNDO_COLOR for undo support in sculpt mode
  - SCULPT_UPDATE_COLOR and PBVH flags and rendering
  - Sculpt Color API functions
  - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
  - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
  - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
  - Remesher reprojection in the Voxel Remehser
  - Paint Brush and Smear Brush with color smoothing in alt-smooth mode
  - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
  - Color Filter
  - Color picker (uses S shortcut, replaces smooth)
  - Color selector in the top bar

Reviewed By: brecht

Maniphest Tasks: T72866

Differential Revision: https://developer.blender.org/D5975
2020-06-23 16:28:50 +02:00