Commit Graph

98141 Commits

Author SHA1 Message Date
Jacques Lucke
4d6ac72264 Nodes: add missing update tags in the case of simulation node trees 2020-07-22 19:16:33 +02:00
Jacques Lucke
e77644982c Depsgraph: build ids referenced by sockets 2020-07-22 19:16:33 +02:00
Jacques Lucke
e0400d0a1c Simulation: move responsibility of updating persistent data handles
This solver should not be responsible for updating the handles.
2020-07-22 19:16:33 +02:00
Jacques Lucke
0a5ef40c2c Simulation: fix memory leak 2020-07-22 19:16:33 +02:00
Jacques Lucke
750899fd31 Simulation: improve depsgraph integration
A simulation data block has an embedded node tree, which requires
special handling in a couple of places. Some of those places were
missing beforehand.

This also adds a relation to make sure that the simulation is evaluated
after animations on the embedded node tree are evaluated.
2020-07-22 19:16:33 +02:00
Germano Cavalcante
921c95ab5e Fix T79144: Snapping bypassing the viewport backface culling
Silently activate the backface culling when the viewport is using.
2020-07-22 12:00:02 -03:00
Sergey Sharybin
72fc70879c Cleanup: Fix strict compiler warning 2020-07-22 16:52:00 +02:00
Hans Goudey
6f3ba033f8 Merge branch 'blender-v2.90-release' 2020-07-22 10:12:51 -04:00
Hans Goudey
0e280b96ca Fix T79160: Bevel modifier set to vertices by default
Need to properly initialize the affect_type field.
2020-07-22 10:02:52 -04:00
Nathan Letwory
5a1a4f4dd2
master is now 2.91.0 alpha. 2020-07-22 16:48:29 +03:00
Nathan Letwory
62a0e1d54f
Merge branch 'blender-v2.90-release' 2020-07-22 16:47:26 +03:00
Nathan Letwory
a4e3943a08
Release branch is now in beta. 2020-07-22 16:41:29 +03:00
Hans Goudey
1fb9b6b1a1 UI: Use property split for simulation modifier 2020-07-22 09:16:17 -04:00
Nathan Letwory
0c0a9dabc7
Ensure submodules are at their correct commits. 2020-07-22 16:15:53 +03:00
Campbell Barton
4950022e7d Object: add-object option to place on the surface normal
Optionally use the surface normal under the mouse cursor.
2020-07-22 22:38:40 +10:00
Jacques Lucke
980dd43bd4 Particles: give emitter its own state
High quality emitters need to maintain state themselves. For example,
this it needs to remember when it spawned the last particle.
This is especially important when the birth rate is changing over time.
Otherwise, there will be very visible artifacts.

It is quite likely that other components of the simulation need their own
state as well. Therefore, I refactored the `SimulationState` type a bit,
to make it more extensible. Instead of using hardcoded type numbers, a
string is used to identify the state type. Also, instead of having switch
statements in many places, there is a new `SimulationStateType` that
encapsulates information about how a specific state is created/freed/copied/...

I removed the integration with the point cache for now, because it was
not used anyway in it's current state.
2020-07-22 14:16:08 +02:00
Antonio Vazquez
47b6c33258 GPencil: New BKE function for setting random vertex color
This function is very handy for debug purposes.
2020-07-22 11:16:45 +02:00
Yevgeny Makarov
8f658ec27c UI: use term 'Vertex' instead of 'Vert' 2020-07-22 16:22:23 +10:00
Campbell Barton
ef52a9f791 Fix UV select flush error in recent loop select cleanup
Regression from d99b343b31e76
2020-07-22 16:02:46 +10:00
Campbell Barton
077a2f7bbb Cleanup: minor changes to doxy sections and naming
Use py_bl_math prefix instead of M_Math.
2020-07-22 15:24:10 +10:00
Cody Winchester
5c28955d3a Modifiers: option to preserve custom normals for subsurf & multires 2020-07-22 15:07:21 +10:00
Campbell Barton
a197b81090 Docs: include 'bl_math' module 2020-07-22 14:36:30 +10:00
Campbell Barton
b5194520e3 Fix T79148: UV Edge ring select doesn't select edges
While UV doesn't yet support edge selection, it can
when sync select is enabled.
2020-07-22 14:33:26 +10:00
Campbell Barton
83cb4f5f8f Cleanup: spelling 2020-07-22 11:57:04 +10:00
Campbell Barton
7fc9666c89 Cleanup: use elif for sculpt tool checks 2020-07-22 11:29:53 +10:00
Christian Rauch
59e48d8fe4 Wayland: draw opaque background when OpenGL alpha is enabled 2020-07-22 10:57:42 +10:00
Christian Rauch
cfa788cf9a GPU: clear color with 1.0 alpha
This impacts GHOST/Wayland which draws windows using alpha.
2020-07-22 10:57:41 +10:00
Julian Eisel
607d745a79 VR: Change how landmarks affect viewer pose
* Changing to a landmark moves the view exactly to it, rather than
  keeping the current position offset.
* Disabling positional tracking moves the viewer back to the landmark
  position.
This is a more predictable and practical way to use landmarks. See
feedback in T71347.

On the code side, I did some cleanup so the logic flow is more clear.

Note: This is entirely untested. I currently don't have access to a
device. There might be issues, tomorrow I'll hopefully get feedback.
2020-07-22 00:05:56 +02:00
Pablo Dobarro
878d191bae Sculpt: Add extra deform types to Slide
This adds extra deform modes to the slide mode of the Topology
Slide/Relax brush (both slide and smear are almost identical).
This is useful to move topology to a specific area to add more localized
details

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8349
2020-07-21 22:59:07 +02:00
Hans Goudey
46b126a2c8 UI: Small changes to bevel active tool layout
- Exposes affect enum in the header instead of profile type.
 - Add two missing options from the operator
2020-07-21 16:47:58 -04:00
Pablo Dobarro
69afdf6970 Sculpt: Support pen pressure modulation in Paint Brush properties
This allows to use pen pressure modulation in hardness, wet mix, wet
persistence, flow and density, as well as inverting the modulation (more
pressure, less density...). With this, it is possible to create brushes
that mix paint or apply a new color based on the pressure.

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D8267
2020-07-21 22:43:39 +02:00
Hans Goudey
4aa2a5481c Bevel: Refactor "Vertex Only" to an enum
This matches the change that was done to the bevel modifier so that the
interface for the modifier, the active tool, and the operator are consistent.

 This commit extends the refactor to the bmesh implementation too, so
that the parameters in the implementation don't stray too far from what
is exposed.

Tests are adjusted and still pass.
2020-07-21 16:32:00 -04:00
Pablo Dobarro
a39da2cbca Fix T79056: Topology automasking artifacts in multires
Both to_v and form_v need to be included. From_v is needed to include
the active vertex when there is only one vertex in the radius of the
brush, to_v needs to be included to add all grids duplicates

Reviewed By: sergey

Maniphest Tasks: T79056

Differential Revision: https://developer.blender.org/D8347
2020-07-21 22:27:44 +02:00
Pablo Dobarro
7aabd74222 Fix T79007: Smooth brushes crasing in dyntopo
The custom smooth functions for bmesh and meshes where removed and
replaced by a generic smooth function using the sculpt API, which needs
to initialize the bmesh indices in order to be used

Reviewed By: sergey

Maniphest Tasks: T79007

Differential Revision: https://developer.blender.org/D8333
2020-07-21 22:26:42 +02:00
Germano Cavalcante
b453e9e3a4 Cleanup: move 'int i' declaration
It is preferable that the value used for interators is defined
close to where it is used.
2020-07-21 14:02:13 -03:00
Alexander Gavrilov
f8cc01595d Drivers: add lerp and clamp functions to namespace.
Implementation of lerp without a function requires repeating one of
the arguments, which is not ideal. To avoid that, add a new function
to the driver namespace. In addition, provide a function for clamping
between 0 and 1 to support easy clamped lerp, and a smoothstep function
from GLSL that is somewhat related.

The function implementations are added to a new bl_math module.
As an aside, add the round function and two-argument log to the
pylike expression subset.

Differential Revision: https://developer.blender.org/D8205
2020-07-21 19:01:50 +03:00
Jacques Lucke
8369adabc0 Particles: initial object socket and emitter node support
Object sockets work now, but only the new Object Transforms and the
Particle Mesh Emitter node use it. The emitter does not actually
use the mesh surface yet. Instead, new particles are just emitted around
the origin of the object.

Internally, handles to object data blocks are passed around in the network,
instead of raw object pointers. Using handles has a couple of benefits:
* The caller of the function has control over which handles can be resolved
  and therefore limit access to specific data. The set of data blocks that
  is accessed by a node tree should be known statically. This is necessary
  for a proper integration with the dependency graph.
* When the pointer to an object changes (e.g. after restarting Blender),
  all handles are still valid.
* When an object is deleted, the handle is invalidated without causing crashes.
* The handle is just an integer that can be stored per particle and can be cached easily.

The mapping between handles and their corresponding data blocks is
stored in the Simulation data block.
2020-07-21 17:35:09 +02:00
Hans Goudey
6c7e62ef9b UI: Adjust Multiresolution Modifier Layout
Adjusting the layout for this modifier is the final part of the modifier UI
project for 2.90. This layout exposes the most important information,
the levels and subdivision controls, by default, putting other contols
in collapsed subpanels.

Note that there is empty space for the "Delete Lower" button
that is still planned for 2.90. And there will also eventually be more
items added to the "Shape" panel, maybe for 2.90.

Differential Revision: https://developer.blender.org/D8187
2020-07-21 11:27:05 -04:00
Hans Goudey
17ebbdf1c1 UI: Use consistent layout for custom operator UI
Operators are one of the last places in Blender to use older UI designs
that don't fit in with recent style conventions. This commit updates
these custom operator UI callbacks for consistency and clarity.

Some of the code is also simplified a lot. Some of the older operator layouts
were much more complex (in terms of code) than they needed to be.

See the differential revision for a before and after screenshot
of each operator.

Differential Revision: https://developer.blender.org/D8326
2020-07-21 11:13:18 -04:00
Hans Goudey
c2b0c64843 UI: Add an outer boundary for edge panning, use in outliner
Currently if you drag and drop an item from the outliner elsewhere in
the Blender window, the outliner will scroll the entire time, even if the
mouse is far away. This commit adds optional behavior for the edge pan
operator that makes it only act if the mouse is close enough to the region.

Differential Revision: https://developer.blender.org/D8193
2020-07-21 10:12:35 -04:00
Bastien Montagne
696c23f284 Cleanup: Comments. 2020-07-21 16:00:39 +02:00
Bastien Montagne
cd6250c220 Fix (unreported) broken code in recent override operator enhancements.
When overriding a whole linked collection from a single object in
3DView, said 'reference' object would be removed by code. We only want
that behavior when overriding from an instanciating Empty.
2020-07-21 16:00:39 +02:00
Hans Goudey
d42530824e Fix T78994: Clear selected pose doesn't work without animation
It looks like the code left this as a todo, but the basic solution is to
add an extra parameter to BKE_bose_rest to check whether bones
are selected before reseting them.

I also corrected the operator description which said it acted on only
selected bones even when there is an option to turn that off. The
"act on selected" is generally implied for Blender's operators anyway.

Differential Revision: https://developer.blender.org/D8319
2020-07-21 09:51:27 -04:00
Sebastián Barschkis
6b6e2e742f Fluid: Updated Mantaflow source files
Updated files include fixes for the mesh IO - read/write success was not propagated.
2020-07-21 15:22:40 +02:00
Clément Foucault
727e569ac3 Cleanup: CodeQuality: Replace OB_DRAWXRAY by OB_DRAW_IN_FRONT
This is to match the option name and to avoid confusion with
workbench xray mode.
2020-07-21 14:44:37 +02:00
Sebastián Barschkis
3fe5c0e5df Fluid: Cleanup unused variables 2020-07-21 14:38:26 +02:00
5904953d22 Tests: IO, fixed a memory leak in the USDHierarchyIteratorTest
No functional changes to Blender.
2020-07-21 14:10:42 +02:00
269c184ac9 Cleanup: IO, renamed delete_object_writer()release_writer()
The function is called for all writers, not just 'object' writers.
Furthermore, it's called by the function `release_writers()`, so now the
name is consistent with that as well.

No functional changes.
2020-07-21 14:10:42 +02:00
6b6970d43f Tests: fix link errors when USD and Alembic are disabled
The unit tests for `bf_io_common` didn't actually link against
`bf_io_common`, so when both USD and Alembic were disabled, nothing
would link against that library and building the tests would fail.
2020-07-21 14:10:42 +02:00
Campbell Barton
bafe22e8ce Fix T79112: Redo shrink/fatten uses negative values
The numbers in the redo panel were negated compared to the value
entered while transforming.
2020-07-21 21:36:10 +10:00