Commit Graph

102904 Commits

Author SHA1 Message Date
Germano Cavalcantemano-wii
af88d23ffa Revert "Fix typo; Documentation; Expose layer for framebuffer attachament; Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask"
This reverts commit 9db3d1951da15254efbbcf028176facb78118ec1.

This was an accidental commit of the patch D8826
2021-01-10 21:07:04 -03:00
Germano Cavalcantemano-wii
d4330ae70b Transform: In the Header, show translation value in local space only with constraint
This partially reverts commit ad15e764dd92.
The local value is only useful with constraint.
2021-01-10 20:58:45 -03:00
Germano Cavalcantemano-wii
ad15e764dd Transform: In the Header, show the translation value in local space
Showing value in the global space was an unintentional change.
2021-01-10 20:30:25 -03:00
Germano Cavalcantemano-wii
08e44b5e3e Fix Increment Snapping Without Constraints in Non-Axis-Aligned Views
The incremental snap was always operating in the local space, which in most
cases is the VIEW type orientation.

Use only local space when the operation is affected by constraint.

Differential Revision: https://developer.blender.org/D10052
2021-01-10 20:24:46 -03:00
Germano Cavalcantemano-wii
9db3d1951d Fix typo; Documentation; Expose layer for framebuffer attachament; Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask 2021-01-10 19:01:53 -03:00
Hans Goudey
1d3b92bdea UI: Improve node group input / output list interface
This commit replaces the two-column list for editing node group inputs
and outputs with a cleaner solution with two panels. The new layout
has several benefits:
 - It uses the vertical space in the node editor sidebar better.
 - It should be more familiar because of similarity with other UI lists.
 - It should look better with consistent alignment and icons.

Note that displaying the "Name" property outside of the list itself is
a bit inconsistent and could possibly be removed in the future.

Differential Revision: https://developer.blender.org/D9683
2021-01-10 13:24:37 -06:00
Sebastián Barschkis
30310a4fc8 Fix T83777: Crash when enabling guides
Also adjusted adjusted guiding UI parameters so that guiding will not get invalidated when changing domain values.
2021-01-10 19:16:44 +01:00
Sebastián Barschkis
5b90ed6c06 Fluid: Fix cache saving issue with OpenVDB IO
Fixes issue where files would not be written when 'resumable' option was checked.
2021-01-10 19:16:44 +01:00
Peter Fog
544e371908 Fix T84529: Crash with strip using deleted scene
If scene strip has no scene assigned, leave source string empty.
Same goes for all other strips, that use ID datablocks.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10058
2021-01-10 17:37:07 +01:00
Richard Antalik
e45630a99f Fix sequencer disk cache not writing data
Error handling added in 512a23c3d61d caused that reading header of new
file failed, since it is empty.

Don't attempt to read header if file is empty. If header can not be read
anyway, try to delete the file. Add asserts, as this should never
happen.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D9954
2021-01-10 16:50:08 +01:00
Richard Antalik
9441413cb2 VSE: Remove fit method tool setting from header
This property was intended to affect fit method for added strips prior
to running operator. However UI team did not agree with current
implementation.

ref T84535

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D10055
2021-01-10 16:37:18 +01:00
Philipp Oeser
6154aa1529 Cleanup: remove redundant decorator for eevee 'overscan_size'
All eevee scene properties are not animatable due to
`RNA_define_animate_sdna(false)` so there is no need for an animation
decorator here (would not show anyways).

Not sure if setting use_property_decorate to False and then manually
adding one again was a hack in rB7fc60bff14a6 to get the alignment
right, but seems to work good now without it.

Note: there also seems to be an inconsistency here generally:
- Eevee reserves room for an animation decorator in almost every panel
(except for "Sampling" and "Indirect Lighting") even though almost none
are animatable (except for stuff in "Hair" and "Film"). This looks nice
if multiple panels are expanded (except for mentioned "Sampling" and
"Indirect Lighting" -- maybe these should also reserve the room?)
- Cycles does not use animation decorators at all (even though pretty
much everything is animatable here -- maybe these should also use
animation decorators?)
- Then there is also the 'shared' "Grease Pencil", "Freestyle" and
"Colormanagement" -- these dont use animation decorators, but some stuff
is animatable...

Regarding the note: not sure what the guidelines here are, if this is
isolated to each panel then there is lots of stuff for eevee that could
set use_property_decorate to False, if multiple open panels are
considered (for nice visual consistency between them), then there is
romm for improvement elsewhere, too.

Maniphest Tasks: T81411

Differential Revision: https://developer.blender.org/D9164
2021-01-09 15:02:14 +01:00
Campbell Barton
fa82a15676 Cleanup: remove unused struct members
Non-projection painting in the viewport is no longer supported,
remove struct members used for this.
2021-01-09 19:07:31 +11:00
Campbell Barton
e718004edf Cleanup: use bool arguments & variables 2021-01-09 19:07:14 +11:00
Campbell Barton
246efd7286 Fix UV selection threshold which ignored image aspect and zoom level
Selecting UVs wasn't properly scaling based on the zoom or image aspect.

This now matches vertex selection in the 3D view.
2021-01-09 18:42:36 +11:00
Hans Goudey
645298be29 Fix build error after last commit 2021-01-08 23:10:58 -06:00
Hans Goudey
1bb530745f Cleanup: Use bool instead of int 2021-01-08 23:09:31 -06:00
Hans Goudey
9c07454816 Keymap: Enable repeat for "Make Edge/Face" operator
The "repeat" property was turned off by default in rBf5080c82dd91, but
it's important to have repeat turned on for this operator since it can be
used to fill large areas. This commit is similar to rBaa77689f77b4.

Fixes T84531
2021-01-08 17:19:04 -06:00
Hans Goudey
69a22a70ac Geometry Nodes: Don't start with empty group nodes selected
The nodes were selected in new node groups because they are by default,
but there's no particular reason for them to be selected, and it can
be distracting.
2021-01-08 16:29:10 -06:00
Hans Goudey
7fd19c20e0 Geometry Nodes: Gray out "New" button when curve object is active
Currently curve objects aren't supported by the node modifier, so the
new node group and modifier operator shouldn't be available.
2021-01-08 15:04:38 -06:00
Hans Goudey
3c1fcec652 Fix T84517: Two geometry node trees added with "New" button
Adding the modifier itself already adds a new node tree, which is
then displayed in the node editor because of the active object and
active modifier context. So there's no need to create the node tree
in the python code in this case.
2021-01-08 12:12:43 -06:00
Jacques Lucke
bc788929aa Scenes: forbid deleting last local scene
Previously, it was only forbidden to delete the last scene. This can
lead to the situation where a .blend file only contains linked scenes.
This is problematic, because linked data might not always be available
or can be removed from a .blend file without having an additional check
for remaining scenes.

Now there always has to be at least one local scene.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D10049
2021-01-08 16:39:42 +01:00
Germano Cavalcante
2d3f96cace Fix T84453: Crash bezier curves transfrom
The pointer allocated to the `TransData` was being incorrectly incremented,
causing misalignment and consequently `heap-buffer-overflow`.

Because of this, `TD_NOTCONNECTED` was being set in a strange way that did
not correspond to other types of `TransData`.

The solution is to not increment the `TransData` pointer and set
`TD_NOTCONNECTED` only for "unconnected" segments.

The code was also a bit deduplicated.
2021-01-08 11:22:58 -03:00
Julian Eisel
c549d736cf Icons: Update script to generate icons from SVGs for Inkscape 1.0
The command line syntax for Inkscape changed quite a bit for the 1.0 release,
see https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line.
Think it's reasonable to expect Inkscape 1.0 or later be installed if you want
to generate the icons with the script. It's easy to get via the website, if the
distribution doesn't provide new enough packages. Only few people would use the
script anyway.

I also had to change the path for command line access on macOS which apparently
changed (https://stackoverflow.com/a/60068607). Although I didn't find a
mention of this change in the Inkscape release notes.
2021-01-08 15:07:54 +01:00
Patrick Mours
c66f00dc26 Fix Cycles rendering with OptiX after instance limit increase when building with old SDK
Commit d259e7dcfbbd37cec5a45fdfb554f24de10d0268 increased the instance limit, but only provided
a fall back for the host code for older OptiX SDKs, not for kernel code. This caused a mismatch when
an old SDK was used (as is currently the case on buildbot) and subsequent rendering artifacts. This
fixes that by moving the bit that is checked to a common location that works with both old an new
SDK versions.
2021-01-08 13:38:26 +01:00
Jacques Lucke
e3ae7d1f2f Fix T83942: improve error checking when trying to render high resolution volume
Reviewers: fclem

Differential Revision: https://developer.blender.org/D10032
2021-01-08 12:14:12 +01:00
Philipp Oeser
c889ec916c Cleanup: clang format 2021-01-08 11:54:53 +01:00
Philipp Oeser
c44a17ec4b Fix T84475: Outliner missing update when adding IDs to main via RNA
Was reported for meshes, but was true for any type.
Now add appropriate notifier to refresh the Outliner.

Maniphest Tasks: T84475

Differential Revision: https://developer.blender.org/D10030
2021-01-08 11:50:36 +01:00
Jeroen Bakker
1698678231 GPU: Mark AMD Polaris 20.11+ drivers with limited support.
The issue does not render wireframes correctly.
2021-01-08 11:44:31 +01:00
Philipp Oeser
03f1d8acab Use the term "N-gon" instead of "Polygon" for triangulation method
This was reported for the Triangulate geometry node, but was also true
for the triangulate modifier and in exporters.

Note the modifier was introduced with "Ngon Method" in rBa7b44c82e5b9 but
was renamed to "Polygon Method" in rBf4762eb12ba5.

Since quads are also polygons (and quads have their own method), the
term "N-gon" is more appropriate here and is also described in the
glossary https://docs.blender.org/manual/en/2.92/glossary/
index.html#term-N-gon

Docs have been updated in rBM7539 (partially - the method would also
have to be renamed once this patch lands).

Note this also fixes the wrong enum used for the alembic exporter.

Fixes T83907

Maniphest Tasks: T83907

Differential Revision: https://developer.blender.org/D10022
2021-01-08 11:20:42 +01:00
Alexander Gavrilov
4a0b8c9427 Cloth: completely exclude fully pinned triangles from collision.
Currently such triangles are effectively already excluded, because
the calculated forces are not applied to pinned vertices. However
these forces are still being computed, which is inefficient.

This adds an early check for triangles where all vertices are
pinned during BVH overlap detection, which significantly speeds
up certain use cases with big fully pinned areas that happen to
overlap a collider. In case of self collision both triangles must
be fully pinned to exclude safely, because the computation is
symmetric and handles two triangles at the same time.

Differential Revision: https://developer.blender.org/D10041
2021-01-08 12:24:50 +03:00
Alexander Gavrilov
8877e294df Surface Deform: the Strength setting is not bind-specific.
It is used during evaluation so it shouldn't be greyed out in the UI.

Ref D10040
2021-01-08 12:24:50 +03:00
Alexander Gavrilov
662b7c3edf Surface Deform: optimize memory allocation in the evaluation code.
Using malloc to allocate a temporary array for each vertex,
which most commonly contains just 4 elements, is not efficient.
Checking the mode with a switch is also better.

Differential Revision: https://developer.blender.org/D10040
2021-01-08 12:24:50 +03:00
Jeroen Bakker
ceaed47bf9 GPU: Enable HQ normal work around on Linux.
Linux does not report the driver version. It does report the OpenGL
version. This change will check the OpenGL version to enable the HQ
normal work around.
2021-01-08 10:23:20 +01:00
Richard Antalik
f448ff2afe VSE: Hide cache settings and adjust defaults
Adjust default cache settings for all files to store raw and final
images.

All settings are still available when developer extras option is
enabled in user preferences.

This is part of design task T80278

Differential Revision: https://developer.blender.org/D9745
2021-01-08 07:24:55 +01:00
Hans Goudey
09ea339a6c Cleanup: Use LISTBASE_FOREACH macro 2021-01-07 21:24:46 -06:00
Campbell Barton
15bb8f9f93 Fix file-handle leak when parsing xdg user directories 2021-01-08 13:19:11 +11:00
Hans Goudey
61f1faac3f Fix T83868: Disabled or inactive list items are not grayed out
The cause for this was quite simple-- a misplaced bitwise operation
before passing a value to the function that grayed out buttons based on
their state, caused by refactoring in rB933bf62a611f before committing.

What makes the situation a little more confusing is that the theme colors
are overridden for list buttons in UI lists, necessitating a second
call to `ui_widget_color_disabled()`. Ideally that wouldn't be necessary.
2021-01-07 16:28:26 -06:00
Aaron Carlisle
5530d6f86f PyAPI Docs: Terminal instructions for Windows incorrect
Fixes T84498
2021-01-07 15:58:47 -05:00
Hans Goudey
95c63babbb Cleanup: Declare variables where initialized 2021-01-07 12:30:18 -06:00
Patrick Mours
d259e7dcfb Cycles: Increase instance limit for OptiX acceleration structure building
For a while now OptiX had support for 28-bits of instance IDs, instead of the initial 24-bits (see also
value reported by OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCE_ID). This change makes use of
that and also adds an error reported when the number of instances an OptiX acceleration structure is
created with goes beyond the limit, to make this clear instead of just rendering an image with artifacts.

Manifest Tasks: T81431
2021-01-07 19:23:13 +01:00
Alexander Gavrilov
3db2bc82aa Surface Deform: optimize handling of the vertex group weight.
There is no need to first copy weights to a separate array,
or create the data layer if it doesn't exist. The threaded
code can retrieve the weight directly from the layer.

Differential Revision: https://developer.blender.org/D10015
2021-01-07 21:08:44 +03:00
Juanfran Matheu
64277e8f3a UI: Use Eyedropper Cursor with Sample Weight Tool
While using the Sample Weight tool in Weight Paint mode, user eyedropper mouse cursor.

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

Reviewed by Pablo Vazquez
2021-01-07 09:44:48 -08:00
Juanfran Matheu
e3d9241a05 UI: Show Weight Value with Sample Weight Tool
While using the Sample Weight tool in Weight Paint mode, show weight value in tool header.

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

Reviewed by Pablo Vazquez
2021-01-07 09:29:36 -08:00
Hans Goudey
3db975f30d Fix T84326: No ID for geometry nodes instances after scattering
Instances are created with an "index" parameter used for persistence over
time through animation. Currently the geometry nodes instancer passes
the index in the array for this value, but the arrays created by the
"Point Distribution" node aren't necessarily stable  in this way when
the input mesh is deformed. In D9832 we already mostly solved this
problem with an `id` attribute. The solution here is to create instances
with this attribute as well.

It's important to note that deforming the instanced points *after*
distribution will usually be a better solution for this problem. This
solution is likely still important though.

Differential Revision: https://developer.blender.org/D10024
2021-01-07 09:27:42 -06:00
Bastien Montagne
4c0fc60105 UndoSystem: Early out from core undo/redo handlers when undo step is NULL.
Also added `undosys_stack_validate` debug check to redo case.
2021-01-07 15:58:23 +01:00
Bastien Montagne
044dd42a05 Cleanup: Undo system: minor simplification in non-debug code. 2021-01-07 15:58:23 +01:00
Campbell Barton
987e9e2145 Fix T84469: Online manual raises an exception with key-map options
Report an error instead of raising a Python exception.

Currently these properties aren't written to the manual
so it's best to show an error.
2021-01-07 23:36:25 +11:00
Jacques Lucke
c55b578c9e Fix T84142: crash when mirroring hair emitted from vertices
The hair mirroring code seems to expect that hair is emitted from faces.
The PE_mirror_x contains the following expression: mirrorfaces[pa->num * 2].
This only makes sense when pa->num is a face index.

The simplest short term solution is to disable the mirror operator when
the particles haven't been emitted from faces.

Diffferential Revision: https://developer.blender.org/D10002
2021-01-07 13:32:36 +01:00
Jacques Lucke
c26f46cb95 Fix T83497: missing relations update when group node changes
Changing which node group a group node references needs a depsgraph
relations update in some cases.

Differential Revision: https://developer.blender.org/D10018
2021-01-07 13:31:17 +01:00