Commit Graph

102064 Commits

Author SHA1 Message Date
Sybren A. Stüvel 899dcc5f60 Fix linker errors when building without Cycles
Fix linker errors by explicitly linking PugiXML when OpenImageIO is
used.

PugiXML has been separated from OpenImageIO (D8628). This means that any
time OpenImageIO libraries are linked, the PugiXML libraries have to be
linked as well. This was set up correctly for Cycles, but not for imbuf.
Because of this, building without Cycles but with OIIO would produce
linker errors.
2020-12-03 11:07:06 +01:00
Aaron Carlisle acaee97c2f Fix accendental copy/paste errors after last commit 2020-12-02 22:26:14 -05:00
Aaron Carlisle fc05e2c0e0 Bmesh: Improve documentation of op parameters
These comments are used to generate Py API docs.
Most of the comments are just copies of the mesh operator counterparts.

More improvements can be made here in the future.

Thanks to Jon Denning on twitter:

https://twitter.com/gfxcoder/status/1334178566993555459
2020-12-02 22:01:00 -05:00
Aaron Carlisle dc4feed59d Cleanup: view-port --> 2D/3D Viewport 2020-12-02 18:16:23 -05:00
Nathan Craddock cba5137f32 Fix crash in outliner on cursor hover
The previous commit surfaced a bug introduced in rBab4654cdfe8f in which
a boolean wasn't initialized to false.
2020-12-02 09:25:45 -07:00
Nathan Craddock 3fc178b19e Outliner: Highlight icons on cursor hover
The icons for collapsed children already draw highlighted when hovered.
Because the item icons are now select targets (for outliner to properties
editor tab switching) this adds highlights on hover for all outliner
element icons.
2020-12-02 08:58:32 -07:00
Hans Goudey 3d0c5455ed Cleanup: Store "is_active" instead of pointer property in panel type
This is consistent with the way other panel type fields are stored.
2020-12-02 16:44:40 +01:00
Hans Goudey 9281a1f4eb UI: Add new node colors for geometry nodes
During the development of the new nodes in the `geometry-nodes` branch
the color of the new nodes wasn't considered, so all of the nodes ended
up red, the color for "input" nodes. This patch introduces two new
colors, one for "Geometry" and one for "Attributes". There are only two
attribute nodes currently, but the next sprint will add two more,
attribute mix, and sample from texture. The attribute nodes are
conceptually different enough from the nodes that modify the geometry
that they deserve their own color.

Differential Revision: https://developer.blender.org/D9682
2020-12-02 16:34:06 +01:00
Jacques Lucke 8522b1b6fb Geometry Nodes: automatically reconnect when swapping inputs
This makes it easier to swap the inputs to the Join Geometry node.
The behavior is the same as in the Math node.
2020-12-02 16:34:06 +01:00
Jacques Lucke 074de755e9 Geometry Nodes: correct modifier name when creating from node editor
The name should be the same as when the modifier is created in the
modifier tab of the properties editor.
2020-12-02 16:34:06 +01:00
Jeroen Bakker 58cc8938e1 Fix T83309: Hide metadata when overlays are off.
Inconsistency between overlay popover and implementation. Now the
metadata will not be visible when the overlays are turned off.
2020-12-02 16:19:15 +01:00
Dalai Felinto 60760bd470 Geometry Nodes: unify icons -> use ICON_NODETREE for everything
Until there is a icon made specially for this, the nodetree icon is up
for grabs. Using it in the nodegroup + modifier + editor helps the users
to make a connection on where to edit those modifiers.
2020-12-02 15:38:47 +01:00
Dalai Felinto ea74ed5a7a Cleanup: remove all of "#ifdef WITH_POINT_CLOUD"
Since Point Cloud was removed from experimental this is no longer needed.
2020-12-02 15:38:47 +01:00
Dalai Felinto 3d3a20d6d1 Cleanup: remove most of "#ifdef WITH_GEOMETRY_NODES"
The ones around the simulation datablock are still there, since they are not
needed for the features planned for master yet.
2020-12-02 15:38:47 +01:00
Dalai Felinto dc614c68ef Preferences: remove Point Cloud object from experimental
The point cloud object is the only one that will support instancing at
first. So we can expose it as a regular object.

It is limited since it has no edit mode. But this is not different than
the volume object.
2020-12-02 15:38:47 +01:00
Dalai Felinto 56931f63c6 Preferences: remove Geometry Nodes from experimental 2020-12-02 15:38:47 +01:00
Hans Goudey b1d1a58c77 Geometry Nodes: improve operators for node editor header
This allows users to create new modifiers directly from the
Geometry Nodes Editor.
2020-12-02 15:38:47 +01:00
Hans Goudey 600fb28b62 Geometry Nodes: active modifier + geometry nodes editor
This commit adds functions to set and get the object's active
modifier, which is stored as a flag in the ModifierData struct,
similar to constraints. This will be used to set the context in
the node editor. There are no visible changes in this commit.

Similar to how the node editor context works for materials, this commit
makes the node group displayed in the node editor depend on the active
object and its active modifier. To keep the node group from changing,
just pin the node group in the header.

* Shortcuts performed while there is an active modifier will affect
  only that modifier (the exception is the A to expand the modifiers).
* Clicking anywhere on the empty space in a modifier's panel will make it active.

These changes require some refactoring of object modifier code. First
is splitting up the modifier property invoke callback, which now needs
to be able to get the active modifier separately from the hovered
modifier for the different operators.

Second is a change to removing modifiers, where there is now a separate
function to remove a modifier from an object's list, in order to handle
changing the active.

Finally, the panel handler needs a small tweak so that this "click in panel"
event can be handled afterwards.
2020-12-02 15:38:47 +01:00
Jacques Lucke fc4a853846 Geometry Nodes: support muted nodes
The handling of muted nodes is handled at the derived node tree
level now. This is also where expanding node groups is handled.
Muted nodes are relinked and removed from the derived tree
during construction. The geometry node evaluation code does
not have to know about muted nodes this way.
2020-12-02 15:38:47 +01:00
Jacques Lucke ae0aa4b94c Geometry Nodes: support geometry components in depsgraph object iterator
Objects can evaluate to a geometry set instead of a single ID (only point cloud
objects for now). In the depsgraph object iterator, the evaluated geometry
components are expanded into temporary objects.

It's important to note that instanced objects can also contain geometry
components. Therefore, they have to be split up into multiple objects
as well in some cases.

At a high level the iterator works like so:

```
for object in depsgraph:
    for component in object:
        yield object_from_component(component)
    for dupli in make_duplis_list(object):
        for component in dupli:
            yield object_from_component(component)
```

DEG_iterator_objects_next has been cleaned up, to make this structure
a bit more apparent.

This should not change anything for objects that are not point clouds.
2020-12-02 15:38:47 +01:00
Jacques Lucke 6be56c13e9 Geometry Nodes: initial scattering and geometry nodes
This is the initial merge from the geometry-nodes branch.
Nodes:
* Attribute Math
* Boolean
* Edge Split
* Float Compare
* Object Info
* Point Distribute
* Point Instance
* Random Attribute
* Random Float
* Subdivision Surface
* Transform
* Triangulate

It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier.

Notes on the Generic attribute access API

The API adds an indirection for attribute access. That has the following benefits:
* Most code does not have to care about how an attribute is stored internally.
  This is mainly necessary, because we have to deal with "legacy" attributes
  such as vertex weights and attributes that are embedded into other structs
  such as vertex positions.
* When reading from an attribute, we generally don't care what domain the
  attribute is stored on. So we want to abstract away the interpolation that
  that adapts attributes from one domain to another domain (this is not
  actually implemented yet).

Other possible improvements for later iterations include:
* Actually implement interpolation between domains.
* Don't use inheritance for the different attribute types. A single class for read
  access and one for write access might be enough, because we know all the ways
  in which attributes are stored internally. We don't want more different internal
  structures in the future. On the contrary, ideally we can consolidate the different
  storage formats in the future to reduce the need for this indirection.
* Remove the need for heap allocations when creating attribute accessors.

It includes commits from:
* Dalai Felinto
* Hans Goudey
* Jacques Lucke
* Léo Depoix
2020-12-02 15:38:47 +01:00
Jacques Lucke ddbe3274ef BLI: add missing const 2020-12-02 15:38:47 +01:00
Jacques Lucke d65628466a Functions: add float2 cpp type
This also adds a hash function for `float2`, because `CPPType`
expects that currently.
2020-12-02 15:38:47 +01:00
Pablo Vazquez 8268b9827a Theme: update shader node color to match socket color
Reviewed by Brecht

Ref T82689.
2020-12-02 15:38:47 +01:00
Pablo Vazquez 96e131f246 UI: update node socket colors
Note: This also changes the Shader socket color, to match "Shading" in the Outliner.

Theme update for shader nodes will be committed separately.

Ref T82689.
2020-12-02 15:38:47 +01:00
Jacques Lucke 69f57550bc Nodes: add geometry socket type
We still have to pick a color for this socket.

Ref T81848.
2020-12-02 15:38:47 +01:00
Jacques Lucke 1d6284a6d5 Functions: add generic pointer class
This class represents a pointer whose type is only known at runtime.
2020-12-02 15:38:47 +01:00
Jacques Lucke c7f518fe35 Functions: add move operations to CPPType
Those are sometimes needed when dealing with c++ types in a generic way.
2020-12-02 15:38:47 +01:00
Jacques Lucke 85f9d319a4 Fix T83293: crash when selecting bone
This partially reverts rBe922dd7d8a307c54d49bc01649a12610b022192b.
The issues fixed by that commit is still fixed.

Reviewers: fclem
2020-12-02 15:33:51 +01:00
Jeroen Bakker 13c3ad7e76 GPU: Show Limited support message for polaris + 20.11.2 drivers.
See T82856 for details.
2020-12-02 15:30:00 +01:00
Sebastián Barschkis f8d1378b84 Deps: Additional changes for PugiXML on macOS
This commit expands the Windows-specific code in rBdca9aa0053f7 and Linux-specific code in rB33b7d53df08a.

It also fixes a capitalization issue in FindPugiXML.cmake
2020-12-02 15:18:05 +01:00
Jeroen Bakker d40f5d41af GPU: Blacklist unsupported GPUs that crash during startup.
Since Blender 2.91 the TeraScale 2 based cards crash during startup.
This patch will show the user a screen that the platform they are using
isn't supported.

The GPUs have been carefully handpicked from dozens of reports. T83124,
T83127, T83103, T83091, T83045, T83065, T82750, T82889, T82925, T82640,
T82429, T82436, T82446.
2020-12-02 15:17:13 +01:00
Germano Cavalcante c576d65c2f Fix T83161: Crash when moving ruler endpoints and opening or closing the toolshelf
`invert_snap` could be called before `snap_gizmo->keymap` was found.

Use the lazy initialization in `invert_snap` then.
2020-12-02 10:27:41 -03:00
Henrik Dick ec39d8de4a Transform: Correct Mirror for Object Mode along arbitrary axis
This fixes T68521, T82334.

The object are not properly mirrored in object mode.

For mirroring an object that has an arbitrary rotation along the X axis
this is the procedure:
1. mirror x location.
2. negate x scale of the
3. negate y and z component of the rotation (independent of which rotation mode is used).

This knowledge applies now for all angles and axes to finally make the
mirror operation work in object mode.

The new mirror function has the downside that it can not (in this form)
be used with proportional editing.

This is no problem since the old behavior can still be replicated by
scaling with -1 along any axis.

The solution to get perfect mirrors can not work for scaling in general,
because in that case there could be scew created.

Reviewed By: mano-wii

Differential Revision: https://developer.blender.org/D9625
2020-12-02 09:22:37 -03:00
Philipp Oeser da8dc204bd Fix T83119: Crash with topology mirror affecting a hidden vertex
Caused by rBba97da21acf2.

For non-topology mirror hidden verts were never respected/included in
EDBM_verts_mirror_cache_begin (they were excluded from the kdtree).

Prior to said commit, hidden mirrored verts that were still in the map
would have been excluded in a separate loop over vertices in
'editmesh_mirror_data_calc()' by checking BM_ELEM_HIDDEN. Due to the new
nature of this function this check was now moved to
EDBM_verts_mirror_cache_begin.

Maniphest Tasks: T83119

Differential Revision: https://developer.blender.org/D9673
2020-12-02 12:35:51 +01:00
Christian Friedrich e4204a3979 Add Custom Falloff Curve to the Vertex Weight Proximity Modifier.
The Vertex Weight Edit Modifier already got the Custom Curve, there was no
real reason for the proximity not to have it as well.

With some fixes by Bastien Montagne (@mont29).

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D9594
2020-12-02 11:20:03 +01:00
Kévin Dietrich 84451f89f5 Fix T83300: constant scene refreshing in Cycles with empty volumes
This infinite loop is caused by a conflict between the volume mesh
creation which unintentionally clears the shaders before early exiting
when no grid is found, and the Blender exporter which adds back the
shaders causing us to reupdate as the shaders changed.

To fix this simply preserve the shaders on the Volume node.
2020-12-02 11:18:45 +01:00
Richard Antalik 67353ae630 Fix build error on builds without audaspace
This was caused by incorrect argument type in dummy function
`rna_Sequences_new_sound()`

Caused by 13ca11ac52
2020-12-02 10:13:45 +01:00
Bastien Montagne 2afc508eb4 Fix T83090: Multiple warnings accessing brush enum data.
We already have generic enums for empty and default 'none' value.
2020-12-02 09:29:37 +01:00
Ankit Meel da22ec1254 Cleanup: Fix CMake syntax error in the last commit. 2020-12-02 13:55:52 +05:30
Ankit Meel 6535135ef7 CMake/macOS: consider MinSizeRel too for ASan. 2020-12-02 13:23:25 +05:30
Ankit Meel a715839a55 Cleanup: add commits to .git-blame-ignore-revs. 2020-12-02 13:20:43 +05:30
Richard Antalik 13ca11ac52 VSE: Unify sequences collections API
Use RNA_api_sequences() for SequenceEditor and MetaSequence
sequences member.

Defines pair of dispatch functions rna_Sequences_editing_* and
rna_Sequences_meta_* that pass pointer to seqbase to
rna_Sequences_* function.

Downside of this implementation is, that it defines 2 seemingly
different RNA collections - SequencesMeta and SequencesTopLevel

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D9601
2020-12-02 05:51:22 +01:00
Sergey Sharybin 1176591574 Codesign: Allo non-zero exit code for signtool on Windows 2020-12-01 17:16:48 +01:00
Sybren A. Stüvel 33b7d53df0 Deps: Add PugiXML as an official dependency
PugiXML was historically shipped hidden embedded into OIIO, the Grease
Pencil team had a requirement for an XML library recently so pugi seems
like a natural choice since it's not really a 'new' library, we just
turn an implicit dependency into an explicit one.

This commit expands the Windows-specific code in rBdca9aa0053f7 to
include Linux. macOS support will be handled in a later commit.

NOTE: run `cmake -U'*PUGIXML*' .` in the build directory to ensure CMake
finds PugiXML in the new location.

For details see D8628
2020-12-01 16:25:51 +01:00
Sergey Sharybin 29401d38d1 Tracking: Refactor autotrack tracking implementation
The idea is to avoid any synchronization needed in the worker threads
and make them to operate on a local data. From implementation detail
this is achieved by keeping track of "wavefront" of markers which are
to be tracked and the tracking result. Insertion of results to the
AutoTrack context happens from main thread, which avoids need in the
lock when accessing AutoTrack.

This change makes tracking of many (300+) about 10% faster on the
Xeon) CPU E5-2699 v4. More speedup will be gained by minimizing
threading overhead in the frame cache.

Another important aspect of this change is that it fixes non-thread
safe access which was often causing crashes. Quite surprising the
crash was never reported.
2020-12-01 15:24:34 +01:00
Sergey Sharybin 4c92fb6715 Libmv: Tweak default logging verbosity level
Log to verbosity level 1 rather than INFO severity.

Avoids a lot of overhead coming from construction of the INFO stream
and improves performance and threadability of code which uses logging.

This makes tracking of 250 frames of a track of default settings to
drop down from 0.6sec to 0.4sec.
2020-12-01 14:55:22 +01:00
Sergey Sharybin c21265b29e Libmv: Cleanup, remove unused logging macros
Unused and was not entirely happy with such short abbreviations.
2020-12-01 14:46:35 +01:00
Sergey Sharybin 01b94c5d8a Cleanup: De-duplicate object mullptr checks
Makes it more clear whether object is allowed or not allowed to be NULL.
Also, avoids possible access to the different object mode enumerator.

Should be no functional changes.
2020-12-01 10:45:02 +01:00
Pablo Dobarro edf1095176 Fix T83275: Crash with scene statics and empty scene
ob can be NULL, so it needs to be checked before accessing ob->mode

Differential Revision: https://developer.blender.org/D9680
2020-12-01 10:27:51 +01:00