Commit Graph

94743 Commits

Author SHA1 Message Date
Antonio Vazquez 70f56167d0 UI: Add missing Annotation tool to Paint modes 2020-03-27 12:36:24 +01:00
Antonio Vazquez 8a62fa9855 GPencil: Cleanup of unused code a arguments 2020-03-27 12:36:24 +01:00
Antonio Vazquez 25e8550739 CPencil: Cleanup unused fill code
This is now replaced by draw engine and annotations don't use fill.
2020-03-27 12:36:24 +01:00
Jacques Lucke 5ce41e6f57 Fix T75111: Crash when using subframes for animated fluid collider
This is not dependent on having an armature as mentioned in T75111.
The collider simply has to be animated.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7251
2020-03-27 12:33:33 +01:00
Cody Winchester 6e505a45a1 Surface Deform modifier: add vertex group and strength control.
This commit aims to add functionality to the surface deform modifier that
gives more control and allows it to work better with the modifier stack.
* Maintains compatibility with older files. The default settings keep it
  so that the whole object is bound and vertex coordinates get overwritten
  as the modifier currently does.
* Turns the deformations from an absolute vertex coordinate overwrite into
  an additive offset from the vertex location before the modifier to the
  resulting bound deformation. This gives the ability to control the
  strength of the deformation and mix the deformation of the modifier
  with the modifier stack that comes before it.
* Also adds in a vertex group with the invert option. This is applied after
  the bind deformation is added. So the whole object is still bound to target,
  and the vertex group filters afterwards what parts get affected.
  I experimented with a version to only binds the geometry weighted to the
  vertex group, but that would break compatibility with old files.
  I may bring it in later as a separate option/mode for the surface deform.

With several fixes from @mont29.

Reviewed By: mont29

Differencial Revision: https://developer.blender.org/D6894
2020-03-27 12:25:37 +01:00
Charlie Jolly 1bb7d42cf6 Cleanup: Silence uninitialized variable warning 2020-03-27 11:12:27 +00:00
Antonio Vazquez da91329291 GPencil: Cleanup unused parameter 2020-03-27 11:43:36 +01:00
Antonio Vazquez b498edb189 Fix T75118: Remove Texture Opacity parameter for Fill materials
This parameter was used in previous version and must be removed from UI panel.
2020-03-27 11:33:09 +01:00
Sergey Sharybin e7af825ded Multires: Fix unwanted assignment of sculpt session pointers
Might have happened when Apply Base is used in sculpt mode.

In practice this probably was fine, since the operator tags object
for update, so the pointers will be restored back to what they should
be.
2020-03-27 11:29:41 +01:00
Cody Winchester bd86edf116 Solidify modifier: add option to assign shell & rim geometry to selected vertex groups.
This commit gives the solidify modifier the ability to assign the newly created shell
and rim geometries to selected vertex groups. This expands the procedural control over
the modifier stack by letting users apply modifiers to the shell geometry without affecting
the original geometry.

This will be especially helpful for NPR users that use solidify to create backface
culling lines on their characters giving them the ability to add displace noise
and other effects.

Differential Revision: https://developer.blender.org/D6903
2020-03-27 11:12:57 +01:00
Cody Winchester ba1f7acc3f Warp modifier: add bone from and bone to options when using armature objects
This commit adds the option to use armature bones for the From and To targets
when using armature objects.

The changes are based on the UV Warp modifier.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6820
2020-03-27 10:42:40 +01:00
Dalai Felinto 3441862c96 Cleanup: Silence warnings 2020-03-27 10:29:33 +01:00
Philipp Oeser 96b3463e25 Cleanup: Remove debug print
Leftover from rB3b59c111821b.
2020-03-27 10:23:34 +01:00
Philipp Oeser ff62481f65 Fix T69060: File Output Node does not work with Time Remapping
Problem is that the RenderEngines will change the RenderData cfra when
rendering (when time remapping is used -- at least workbench/eevee/
gpencil do a combination of BKE_scene_frame_get() plus
RE_GetCameraWindow() which alters the RenderData cfra).

Later on in the pipeline, the Compositor will use this RenderData cfra
to determine the output file name for the FileOutput node. (In contrast
to this, the 'regular' Output will use the Scene's RenderData -- not the
Render's -- cfra [which hasnt been altered])

It is not entirely clear why RE_GetCameraWindow was setting the cfra on
the Render, but it appears to be legacy OGL rendering related and is not
needed anymore.
Removing this will keep the cfra as needed for the Compositor FileOutput
node.
2020-03-27 10:10:54 +01:00
Philipp Oeser d0b0a0a894 Fix T74927: Slow playback using Auto Normalization
Caused by rBedb3b7a323a1.

Using evaluate_fcurve_only_curve actually causes quite a bit of slowdown
[6x] compared to bezier forward differencing [which was used prior to
rBedb3b7a323a1]. But full fcurve evaluation is desired with Dynamic
Interpolation Effects [Back/Elastic] since their min/max will not be
captured with forward differencing.

So now gain back speed [using bezier forward differencing] and only do
the full fcurve evaluation for dynamic interpolation effects.

Maniphest Tasks: T74927

Differential Revision: https://developer.blender.org/D7196
2020-03-27 09:58:21 +01:00
Philipp Oeser 6eb1004d50 Fix T58439: Info Editor does not show operator reports immediately when
operator cancelled.

Lots of operators return OPERATOR_CANCELLED when no data really changed.
Reports from those operators do not show immediately in the Info Editor
[they only do if the operator returns OPERATOR_FINISHED].

Now also notify the Info Editor in case of OPERATOR_CANCELLED.

Maniphest Tasks: T58439

Differential Revision: https://developer.blender.org/D7238
2020-03-27 09:41:33 +01:00
Campbell Barton 3b59c11182 Fix T66655: Add-on tool keymap not working after restart
- Use addon keyconfig for registered tools so reloading the keymap
  doesn't clear them.

- Ensure there is a default keymap, needed for addon keymaps
  to be available in the user keyconfig.
2020-03-27 17:38:13 +11:00
Aaron Carlisle 95247b4b14 UI: Use Title Case 2020-03-26 21:34:27 -04:00
Aaron Carlisle 03ac301102 UI: Spelling Inconsistencies 2020-03-26 21:20:31 -04:00
Campbell Barton e1ee4dff8d Cleanup: redundant mask includes 2020-03-27 11:47:04 +11:00
Campbell Barton c8b85d32c5 Cleanup: quiet unused function warning 2020-03-27 11:28:46 +11:00
Campbell Barton ed86f3edb6 Cleanup: rename WM_modalkeymap API names, matching WM_keymap
Rename:
- WM_modalkeymap_add to WM_modalkeymap_ensure
- WM_modalkeymap_get to WM_modalkeymap_find
2020-03-27 11:28:46 +11:00
Campbell Barton 5c74b0964b Cleanup: add iterator macros to clang-format
Also rename START to BEGIN (matching BEGIN/END for most iterator macros).
2020-03-27 11:28:20 +11:00
Campbell Barton 2f149ebbe9 Cleanup: uppercase macros for sculpt iterators, add to clang-format
Also use sculpt prefix for SCULPT_CLAY_STABILIZER_LEN.
2020-03-27 11:27:10 +11:00
Adrian Newton f1fb3eb975 UI: use pixel unit for generated image dimensions
Differential Revision: https://developer.blender.org/D7171
2020-03-27 00:49:15 +01:00
Adrian Newton d663c9d8da UI: fix inconsistent modifier menu order for fluid and multiple strokes
Differential Revision: https://developer.blender.org/D7172
2020-03-27 00:45:49 +01:00
Robert Guetzkow fcd6fac0a7 Fix T74996: material custom properties not displayed for Cycles
Differential Revision: https://developer.blender.org/D7223
2020-03-27 00:44:18 +01:00
Stephan Seitz 02518be634 Cleanup: suppress warning about float-to-int conversion
Differential Revision: https://developer.blender.org/D7212
2020-03-27 00:43:17 +01:00
Sebastián Barschkis 5cf6689019 Fluid: Removed obstacle levelset optimization
Currently results in unstable particle behavior and incorrect meshing.
2020-03-27 00:16:34 +01:00
Aaron Carlisle b7666f27d3 UI: Address Issues with recent fluid ui changes
See rB337e86148688aa608d007381ee9ca78879050754
2020-03-26 18:49:54 -04:00
Aaron Carlisle a921a4daad Mantaflow: remove reminents of high res smoke
It appears this slipped through the code review

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D6760
2020-03-26 16:29:08 -04:00
Clément Foucault 56e0249489 GPU: Add workaround for faulty default attrib values on some drivers
On some drivers, the default values is not respected correctly.

To workaround this we create a small VBO that contains only 1 vec4 worth of
data and just bind it using glBindVertexBuffer to ensure 0 stride.

This fixes T75069 Instances not rendered correctly by workbench.
2020-03-26 21:10:44 +01:00
Brecht Van Lommel afb1a64ccb Fix T60682: adds macOS alias redirection for directories
This adds support for macOS aliases in addition to symlinks. It also adds
support for hidden, readonly and system file attributes.

Contributed by Ankit (ankitm) with modifications by me.

Differential Revision: https://developer.blender.org/D6679
2020-03-26 19:57:30 +01:00
Chris Clyne d1972e50cb Add option to Copy the active view layer, and add an empty view layer
Modify the view layer add operator (and underlying `BKE_view_layer_add`)
to allow for copying the current view layer, as well as adding a new one
but with all LayerCollections disabled by default (this is important for
heavy scenes where currently adding view layers can take a long time due
to enabling every collection by default).

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6862
2020-03-26 19:36:51 +01:00
Clément Foucault 839f0cfa41 Overlay: Fix crash caused by NULL passes 2020-03-26 19:16:57 +01:00
Ray Molenkamp 86c61ce64f Cycles: Restore cycles_cubin_cc to working order
Reviewed by: brecht pmoursnv
Differential Revision: https://developer.blender.org/D7136
2020-03-26 11:41:44 -06:00
Ray Molenkamp 58ea0d93f1 Cycles/Optix: Add CYCLES_OPTIX_TEST override
This works similarly to the CYCLES_OPENCL_TEST
environment variable to allow testing on unsupported
hardware.

Note: like the OPENCL test override, this is
for *testing* only and bug reports on unsupported
hardware will *not* be accepted at this point in
time.
2020-03-26 11:30:17 -06:00
Pablo Dobarro 48ea173a7d Sculpt: Create Face Set by Edit Mode Selection
This implements a new mode in the Face Sets Create operator to create a
new face sets from the faces selection in edit mode. This can be used
when the user considers that the edit mode tools are more convenient for
a more precise control or a certain type of selection, like creating a
face set from a face loop.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7211
2020-03-26 16:24:21 +01:00
Pablo Dobarro 99530ef4ed Sculpt: Face Sets Init operator
This operator initializes all face sets in the sculpt at once using
different mesh properties. It can create face sets by mesh connectivity,
material slots, face normals, UV seams, creases, sharp edges, bevel
weights and face maps.

For properties that are already in the faces, this is implemented as a
loop. Properties that depend on edge attributes use a similar operation
to sculpt flood fill, but using face adjacency instead of edge vertex
connectivity.

As Multires also stores the face sets in the base mesh, this should work
in the face sets Multires implementation without any changes.

This is implemented as a separate operator as this resets the visibility
and creates all face sets at once, while the create face set operator
creates a single face sets, leaving the rest of the face sets in the
mesh as they are.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7209
2020-03-26 16:20:24 +01:00
Pablo Dobarro a218be3080 Sculpt: Surface Smooth Brush and Mesh Filter
This implements the Surface Smooth Brush as a mode inside the Smooth tool,
which uses the HC algorithm from "Improved Laplacian Smoothing of Noisy Surface Meshes".
Comparted to the regular smooth brush with laplacian smooth, this brush removes
the surface while preserving the volume of the object.
The smooth result can be controlled by tweaing the original shape preservation,
displacement and iteration count.
The same surface smooth operation is also available as a mesh filter.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7057
2020-03-26 16:13:47 +01:00
Clément Foucault a0437c3f73 Fix T75087 Workbench: DoF: Divide By Zero when antialiasing is disabled 2020-03-26 16:03:48 +01:00
Pablo Dobarro f5ac118fb3 Sculpt: Use uchar to store the sculpt mask in the GPU
Using a float to store and render the mask seems like a waste of memory
without any noticeable difference in the viewport for its use case.
After this commit, the mask and the face sets combined should take the
same amount of GPU memory than only the mask in previous versions.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7148
2020-03-26 16:02:30 +01:00
Clément Foucault e000dcb849 Overlay: Wireframe: New method to avoid zfighting with geometry
This new method is only enabled if Overlay Smooth Wire is enabled.

This method gives really nice results but has some downside:
- Require a depth copy or loose the ability to write wire depth to the
  depth buffer and have correct depth ordering of wires. This patch use the former, with its associated cost.
- Require some depth sampling and prevent early depth test (i.e: has
  some performance impact).
- Has some relatively minor instability with geometry that are perpendicular
  to the view and intersecting with other geometry.

Pros:
- Compared to a fullpass approach this is surely going to have less
  performance impact and much higher quality.
- Removes the additional vertex offset. (see T74961)
- Fixes all half edges z-fighting.

{F8428014}

{F8428015}

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7233
2020-03-26 15:55:16 +01:00
Pablo Dobarro 458f50ba73 Fix T74780: Face sets operators not aware of SCULPT_FACE_SET_NONE
SCULPT_FACE_SET_NONE default value is 0 and it is rendered hidden, so
the invert sign operation to show it was not working. Now the show all
function sets this face set to ID 1 before setting its sign.

I also refactored this check in gpu_buffers.

Not related to the reported issue, but the mesh in attached contains non
manifold geometry with hidden loose vertices, so the visibility state
was not syncing correctly to those vertices. Now the toggle operators
checks the current visibility only on the face sets, so no manifold
vertices are ignored (as they are in the rest of operations in sculpt
mode).

Reviewed By: jbakker

Maniphest Tasks: T74780

Differential Revision: https://developer.blender.org/D7188
2020-03-26 15:50:25 +01:00
Pablo Dobarro 83947ea253 Fix T74761: Reimplement vertex to face sets visibility sync
This fixes multiple issues:
- Adds tag to update shading when changing vertex visibiliyt. This makes the mesh visibility update when the operator ends.
- Sync vertex to face sets no longer requires the pmap, so it does not crash. (Maybe we can initialize the pmap on undo to avoid these problems in the future).
- Sync vertex to face sets now works in a coherent way with the rest of visibility operations. Hide Box and Hide mask now sync the visibility changes to the face sets, so the all the operations are now getting a correct visibility state.

Reviewed By: brecht

Maniphest Tasks: T74761

Differential Revision: https://developer.blender.org/D7187
2020-03-26 15:44:50 +01:00
Pablo Dobarro c286fa309e Fix T74899: Add Draw Face Sets brush to versioning defaults
Brushes are created automatically when the tools is enabled, but this
way it gets correct defaults and it is accesible from scripts.

Reviewed By: jbakker

Maniphest Tasks: T74899

Differential Revision: https://developer.blender.org/D7199
2020-03-26 15:41:10 +01:00
Pablo Dobarro 32bb848838 Fix T74692: Do not draw nodes with the default face set
The default face set color is white, so we can skip drawing the default
face set. This allows to enable again the optimization of not drawing
overlays in nodes where the mask is empty.

This will still slow down the viewport when a new face set is created
for the whole mesh or when inverting the mask, like in previous
versions.

I also renamed the function to make more clear that now it is checking
for both mask and face sets.

Reviewed By: brecht

Maniphest Tasks: T74692

Differential Revision: https://developer.blender.org/D7207
2020-03-26 15:39:41 +01:00
Pablo Dobarro c32cf06e42 Fix T74808: Division by 0 in Cloth brush solver with overlapping vertices
This checks that the distance of the current positions of two connected
vertices is not 0 before calculating the correction vectors for those
vertices.

Reviewed By: jbakker

Maniphest Tasks: T74808

Differential Revision: https://developer.blender.org/D7184
2020-03-26 15:38:17 +01:00
Pablo Dobarro 4ff3d5aded Fix T75089: Missing pmap when using Face Sets in the mesh filter
When using Face Sets to mask the mesh filter the pmap needs to be
initialized to check the face sets of each vertex, otherwise it will
crash because it is null.

Probably now we should just initalize the pmap when building the PBVH as
almost all tools need it, so we can avoid these crashes in the future.

Reviewed By: jbakker

Maniphest Tasks: T75089

Differential Revision: https://developer.blender.org/D7236
2020-03-26 15:36:35 +01:00
Jeroen Bakker 7ed3ebbc6e Fix T67888: Incorrect Wireframe After Applying SubSurf/MultiRes
Show control edges stores the control edges in the mesh which is
picked up by the draw manager. When applyng a subsurf (or multires) we
don't want that data present in the base mesh. Any rebuilding of the mesh
would overwrite the data anyway.

This patch introduces a new flag for applying modifiers
that can be checked to ignore storing display specific data in
the base mesh.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7163
2020-03-26 15:34:53 +01:00