91 min agoFix T79772: Gpencil. Additive drawing doesn't work when creating fills master
Antonio Vazquez [Fri, 14 Aug 2020 17:04:53 +0000 (19:04 +0200)]
Fix T79772: Gpencil. Additive drawing doesn't work when creating fills

This option was not supported in Fill tool

95 min agoMerge branch 'blender-v2.90-release'
Hans Goudey [Fri, 14 Aug 2020 17:01:05 +0000 (13:01 -0400)]
Merge branch 'blender-v2.90-release'

97 min agoUI: Remove cutoff text in popovers for 2.90 release blender-v2.90-release
Hans Goudey [Fri, 14 Aug 2020 16:58:24 +0000 (12:58 -0400)]
UI: Remove cutoff text in popovers for 2.90 release

Many of these popovers could use a design pass in 2.91, but for 2.90 we
don't want to change any UI strings at this point, so the best way to
solve the cutoff text is to widen the popovers. Sadly this won't affect
popovers when other languages besides English have longer strings, but
solving that is a much larger task.

Another benefit is that tweaking sculpt / paint brush options feels much
less cramped with slightly wider popovers.

I only know of one string that is still slightly cutoff by default with
this patch, the "Max Element Distance" property of the pose brush in the
sculpt mode brush settings popover. But I didn't think it was worth
widening that popover more to deal with that one case.

Differential Revision:

2 hours agoMerge branch 'blender-v2.90-release'
Julian Eisel [Fri, 14 Aug 2020 15:58:05 +0000 (17:58 +0200)]
Merge branch 'blender-v2.90-release'

2 hours agoFix warning when compiling on Linux with WITH_XR_OPENXR enabled
Julian Eisel [Fri, 14 Aug 2020 15:57:24 +0000 (17:57 +0200)]
Fix warning when compiling on Linux with WITH_XR_OPENXR enabled

3 hours agoMerge branch 'blender-v2.90-release'
Julian Eisel [Fri, 14 Aug 2020 15:18:09 +0000 (17:18 +0200)]
Merge branch 'blender-v2.90-release'

3 hours agoFix constant lighting change in VR view when rotating head
Julian Eisel [Fri, 14 Aug 2020 14:57:57 +0000 (16:57 +0200)]
Fix constant lighting change in VR view when rotating head

We have to explicitly enable fixed world space lighting. This was in
fact already done, but overridden by the code to sync the 3D View
shading settings to the VR view.

3 hours agoFix undefined behavior with --debug-xr
Julian Eisel [Fri, 14 Aug 2020 14:38:45 +0000 (16:38 +0200)]
Fix undefined behavior with --debug-xr

Mistake in cb578ca1048d3. Before that, the extension vector was static,
to make sure the extension name strings wouldn't get destructed when
leaving the function. I didn't think that was an issue and couldn't
recreate one, because until the previous commit we wouldn't actually
add any extensions to the vector on Windows (the system I tested

Use C++17's `std::string_view` now, which avoids the string copies
`std::string` creates for itself and thus its destruction when leaving
the local scope.

3 hours agoFix --debug-xr not outputting OpenXR debug prints on Windows
Julian Eisel [Fri, 14 Aug 2020 14:10:45 +0000 (16:10 +0200)]
Fix --debug-xr not outputting OpenXR debug prints on Windows

The OpenXR debug extension was disabled on Windows as a workaround. This
was an old leftover from when there was only the Windows Mixed Reality
runtime on Windows. The debug extension didn't work for it and we didn't
have a way to disable it just for Windows Mixed Reality.
Now it seems to work though, so we remove the workaround. If specific
runtimes still have trouble with the extension, we can disable it
specifically for these runtimes now.

3 hours agoFix NULL pointer access in render engine reported by address sanitizer
Brecht Van Lommel [Fri, 14 Aug 2020 11:42:33 +0000 (13:42 +0200)]
Fix NULL pointer access in render engine reported by address sanitizer

This may not have caused an actual bug.

3 hours agoFix T79769, T79768: crash tweaking volume settings with Cycles viewport render
Brecht Van Lommel [Fri, 14 Aug 2020 11:41:42 +0000 (13:41 +0200)]
Fix T79769, T79768: crash tweaking volume settings with Cycles viewport render

Refitting the BVH does not work in this case, it needs to be fully rebuilt.

4 hours agoMerge branch 'blender-v2.90-release'
Julian Eisel [Fri, 14 Aug 2020 14:00:54 +0000 (16:00 +0200)]
Merge branch 'blender-v2.90-release'

4 hours agoFix/workaround graphics issues breaking SteamVR use with Blender
Julian Eisel [Fri, 14 Aug 2020 13:38:49 +0000 (15:38 +0200)]
Fix/workaround graphics issues breaking SteamVR use with Blender

Windows only workaround. I'll have to investigate Linux separately.

Steam's OpenGL compatibility is still new and doesn't work for us yet
(neither does it for standard OpenXR examples from what I've heard and
seen myself). We can work around that by falling back to our DirectX
compatibility layer.
Note that this DirectX compatibility still doesn't work for some
systems, see T76082.

Implementation note: Since the graphics binding extensions have to be
enabled before we can find out which runtime is in use (e.g. SteamVR vs.
Oculus, etc), we can now enable multiple graphics binding extensions but
settle for a single one to use later.

Once the SteamVR OpenGL backend works, we can remove this workaround

Fixes T78267.

7 hours agoMerge branch 'blender-v2.90-release'
Julian Eisel [Fri, 14 Aug 2020 11:29:03 +0000 (13:29 +0200)]
Merge branch 'blender-v2.90-release'

7 hours agoFix offset applied on top of VR landmark with no positional tracking
Julian Eisel [Fri, 14 Aug 2020 11:17:05 +0000 (13:17 +0200)]
Fix offset applied on top of VR landmark with no positional tracking

On VR session start with positional tracking disabled, the pose would
have an offset applied but it was supposed to start exactly at the
landmark position.

Issue is that we applied the offset to cancel out the position offset
reported by the OpenXR runtime incorrectly. We only want to do that if
positional tracking is enabled, because if not we don't even apply the
runtime's position offset. So we'd cancel something out that wasn't

7 hours agoBLI: add reverse iterators, iterator constructor and Vector.insert/prepend
Jacques Lucke [Fri, 14 Aug 2020 11:16:44 +0000 (13:16 +0200)]
BLI: add reverse iterators, iterator constructor and Vector.insert/prepend

The new reverse iterators behave as the reverse iterators for contains from
the standard library. Have a look at the tests to see how to use them.
Using them will hopefully become easier with ranges in C++20.

A Vector can now be constructed from two iterators, which is very common
in the standard library.

New Vector.insert methods allow adding elements in the middle of a vector.
These methods should not be used often in practice, because they has a linear running time.

New Vector.prepend methods allow adding elements to the beginning of a vector.
These methods are O(n) as well.

7 hours agoCleanup: C++ code style for Ghost-XR
Julian Eisel [Fri, 14 Aug 2020 10:37:53 +0000 (12:37 +0200)]
Cleanup: C++ code style for Ghost-XR

* Avoid deep copy of vectors (technically more than a cleanup).
* Use `std::make_unique` for allocating unique pointers, rather than
  manual `new`.
* Use `std::optional` for optional by-value return values, rather than
  C-style `bool` to indicate success + return-argument.
* Use references rather than pointers for non-optional arguments.
* Avoid manual `new`/`delete`. Use `std::unique_ptr` for local scope
  bound lifetime.
* Use C++ `nullptr` rather than C's `NULL`.
* Remove unnecessary friend declaration.

These changes are generally considered good practise and move us more to
a "modern C++" style. We can still go much further of course.

8 hours agoMerge remote-tracking branch 'origin/blender-v2.90-release'
Dalai Felinto [Fri, 14 Aug 2020 09:38:54 +0000 (11:38 +0200)]
Merge remote-tracking branch 'origin/blender-v2.90-release'

8 hours agoFix: Increase Viewport Sculpt Options panel width
Dalai Felinto [Fri, 14 Aug 2020 08:44:22 +0000 (10:44 +0200)]
Fix: Increase Viewport Sculpt Options panel width

The "Delay Viewport Update" label was showing only:
"Delay Viewport U..."

9 hours agoMerge branch 'blender-v2.90-release'
Philipp Oeser [Fri, 14 Aug 2020 08:40:57 +0000 (10:40 +0200)]
Merge branch 'blender-v2.90-release'

10 hours agoFix (unreported) sculpt vertex color panel visible for all object types
Philipp Oeser [Thu, 13 Aug 2020 13:38:20 +0000 (15:38 +0200)]
Fix (unreported) sculpt vertex color panel visible for all object types

Since DATA_PT_sculpt_vertex_colors has its own poll() we need to call
the poll() of MeshButtonsPanel as well

Differential Revision:

16 hours agoUI: Correct grammar in property name and description
Hans Goudey [Fri, 14 Aug 2020 02:13:43 +0000 (22:13 -0400)]
UI: Correct grammar in property name and description

16 hours agoUI Code Quality: Use derived struct for color ramp buttons
Hans Goudey [Fri, 14 Aug 2020 02:00:50 +0000 (22:00 -0400)]
UI Code Quality: Use derived struct for color ramp buttons

The same changes as rB570044e9f412 and rB0ab21bf06ae0.

17 hours agoUI Code Quality: Use derived struct for curve mapping buttons
Hans Goudey [Fri, 14 Aug 2020 01:33:47 +0000 (21:33 -0400)]
UI Code Quality: Use derived struct for curve mapping buttons

The same changes as in rB570044e9f412.

17 hours agoUI Code Quality: Use derived struct for curve profile buttons
Hans Goudey [Fri, 14 Aug 2020 01:00:54 +0000 (21:00 -0400)]
UI Code Quality: Use derived struct for curve profile buttons

Continuing the work from rB49f088e2d093.

Differential Revision:

24 hours agoGPencil: Fix keymap error for Fill Boundary strokes
Antonio Vazquez [Thu, 13 Aug 2020 18:18:16 +0000 (20:18 +0200)]
GPencil: Fix keymap error for Fill Boundary strokes

The key to enable it is `Alt`

24 hours agoGPencil: Display Fill Boundary strokes with stroke color
Antonio Vazquez [Thu, 13 Aug 2020 18:14:23 +0000 (20:14 +0200)]
GPencil: Display Fill Boundary strokes with stroke color

This feature was removed during the refactor, but it's needed for this type of strokes to display the line using the stroke color without checking if the stroke is enabled or not in the material.

This color is used only for these special strokes.

24 hours agoDeps_builder: Update openvdb to a dynamic library
Ray Molenkamp [Thu, 13 Aug 2020 17:42:05 +0000 (11:42 -0600)]
Deps_builder: Update openvdb to a dynamic library

This patch changes openvdb from a static to a dynamic library.
this is in preparation for enabling pyopenvdb at some point
in the future.

Differential Revision:

Reviewed by: brecht

26 hours agoUI: Use consistent geometry icon color
Hans Goudey [Thu, 13 Aug 2020 16:13:21 +0000 (12:13 -0400)]
UI: Use consistent geometry icon color

The grease pencil weight sculpt icon was using a slightly different
shade of blue than the other icons.

26 hours agoUI: Simplify more geometry icons
Hans Goudey [Thu, 13 Aug 2020 16:09:20 +0000 (12:09 -0400)]
UI: Simplify more geometry icons

Again, no visual changes, just removed internal vertices where they
were unecessary.

26 hours agoFix T78065: OSL shader compilation fails on macOS
Brecht Van Lommel [Thu, 13 Aug 2020 15:39:28 +0000 (17:39 +0200)]
Fix T78065: OSL shader compilation fails on macOS

26 hours agoMerge branch 'blender-v2.90-release' into master
Bastien Montagne [Thu, 13 Aug 2020 15:48:41 +0000 (17:48 +0200)]
Merge branch 'blender-v2.90-release' into master

26 hours agoFix T79591: Liboverride: do not update overrides on missing linked data.
Bastien Montagne [Thu, 13 Aug 2020 15:41:33 +0000 (17:41 +0200)]
Fix T79591: Liboverride: do not update overrides on missing linked data.

It makes no sense to generate/update overrides from missing (broken
linked) reference data, just keep existing ones unchanged then.

28 hours agoUI: Simplify geometry icons
Hans Goudey [Thu, 13 Aug 2020 14:30:08 +0000 (10:30 -0400)]
UI: Simplify geometry icons

Many of the icons had lots of interior geometry left over from
subdivision. In these cases we should remove the interior geometry
and leave the object with the modifier for the future.

28 hours agoMerge branch 'blender-v2.90-release'
Hans Goudey [Thu, 13 Aug 2020 14:05:20 +0000 (10:05 -0400)]
Merge branch 'blender-v2.90-release'

28 hours agoUI: Add sculpt cloth filter tool icon
Hans Goudey [Thu, 13 Aug 2020 14:03:44 +0000 (10:03 -0400)]
UI: Add sculpt cloth filter tool icon

This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision:

28 hours agoUI: Add sculpt cloth filter tool icon
Hans Goudey [Thu, 13 Aug 2020 14:03:44 +0000 (10:03 -0400)]
UI: Add sculpt cloth filter tool icon

This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision:

29 hours agoSequencer: Implement zoom-to-fit view mode
Sergey Sharybin [Wed, 12 Aug 2020 09:05:40 +0000 (11:05 +0200)]
Sequencer: Implement zoom-to-fit view mode

In this mode the preview image is always using the most of the preview
area space: it is scaled to fit, preserving aspect ratio. This makes it
possible to always have maximum of the preview region even after resize
of other areas.

This mode is enabled by default, is available in the View -> Zoom to Fit
menu. It is enabled when View All (Home key) is used, and is disabled
when manual navigation ([panning, zooming) is performed.

There is no versioning code, which means existing files will open as-is,
but new projects will have this option enabled.

Ref T78987

Maniphest Tasks: T78987

Differential Revision:

29 hours agoView2D: Inform region type on current view changes
Sergey Sharybin [Wed, 12 Aug 2020 10:12:29 +0000 (12:12 +0200)]
View2D: Inform region type on current view changes

Allows to hook per-space code which is to be run on view navigation.
This is required to have zoom-to-fit implemented in the sequencer.

There might be more cases where the clalback is to be called from,
but it could be easier to address those on the case-by-case basis
when its needed.

29 hours agoView2D: Centralize handling of changes to v2d->cur
Sergey Sharybin [Wed, 12 Aug 2020 10:36:19 +0000 (12:36 +0200)]
View2D: Centralize handling of changes to v2d->cur

Currently there are no functional changes, preparing code to add more
functionality which is to be run from navigation/zoom operators.

29 hours agoFix T79082: Softbody self-collision does not work on lattices
Jacques Lucke [Thu, 13 Aug 2020 12:41:44 +0000 (14:41 +0200)]
Fix T79082: Softbody self-collision does not work on lattices

Reviewers: zeddb

Differential Revision:

30 hours agoUVEdit: Fix drawing after recent refactor
Clément Foucault [Thu, 13 Aug 2020 12:27:16 +0000 (14:27 +0200)]
UVEdit: Fix drawing after recent refactor

30 hours agoGPU: Fix MSVC warning
Clément Foucault [Thu, 13 Aug 2020 12:18:17 +0000 (14:18 +0200)]
GPU: Fix MSVC warning

30 hours agoGPU: Fix issue with MDI and recent refactor
Clément Foucault [Thu, 13 Aug 2020 12:17:03 +0000 (14:17 +0200)]
GPU: Fix issue with MDI and recent refactor

30 hours agoGPUDrawList: Fix gl error with drawing without the correct VAO bound
Clément Foucault [Thu, 13 Aug 2020 00:29:09 +0000 (02:29 +0200)]
GPUDrawList: Fix gl error with drawing without the correct VAO bound

30 hours agoGPUShader: Add more uniform functions
Clément Foucault [Tue, 11 Aug 2020 13:59:02 +0000 (15:59 +0200)]
GPUShader: Add more uniform functions

30 hours agoCleanup: GPU: Remove Batch vao cache reset
Clément Foucault [Mon, 10 Aug 2020 23:58:23 +0000 (01:58 +0200)]
Cleanup: GPU: Remove Batch vao cache reset

This is done at drawtime automatically.

30 hours agoGPUBatch: GL backend isolation
Clément Foucault [Mon, 10 Aug 2020 23:31:40 +0000 (01:31 +0200)]
GPUBatch: GL backend isolation

This changes the drawing paradigm a bit. The VAO configuration is done
JIT-style and depends on context active shader.

This is to allow more flexibility for implementations to do optimization
at lower level.

The vao cache is now its own class to isolate the concept. It is this
class that is reference by the GLContext for ownership of the containing
VAO ids.

30 hours agoGPUBatch: Move allocator to backend
Clément Foucault [Mon, 10 Aug 2020 09:41:22 +0000 (11:41 +0200)]
GPUBatch: Move allocator to backend

30 hours agoGPUBatch: Merge phase and ownership flags and cleanup there usage
Clément Foucault [Mon, 10 Aug 2020 01:17:35 +0000 (03:17 +0200)]
GPUBatch: Merge phase and ownership flags and cleanup there usage

Also add new flags to communicate specific behavior to future backend.

30 hours agoDRW: InstanceData: Remove hacks of batch freeing callback
Clément Foucault [Sun, 9 Aug 2020 23:43:50 +0000 (01:43 +0200)]
DRW: InstanceData: Remove hacks of batch freeing callback

We instead use a handle reference counter on the GPUVertBufs used by
the instancing batches. This make sure that if an update happens on the
GPUVertBuf used to contruct the batch, they will never have the same
memory address than the previously allocated ones (since they are still
pending deletion thanks to the refcounter).

This avoid the linear search to update the GPUBatch in the case a
batch is deleted (which was even a bad option since they could be only

30 hours agoGPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc
Clément Foucault [Sun, 9 Aug 2020 23:40:23 +0000 (01:40 +0200)]
GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc

30 hours agoGPUVertBuf: Add handle refcount
Clément Foucault [Sun, 9 Aug 2020 23:35:59 +0000 (01:35 +0200)]
GPUVertBuf: Add handle refcount

A handle refcount is here to avoid freeing of the GPUVertBuf datablock
if it is still referenced somewhere else.

This does not prevent deleting the actual data. This is to avoid too
much zombie data usage.

This is in order to avoid most hacks inside `draw_instance_data.c`.

30 hours agoGPUBatch: Remove most use of GPU_batch_draw_advanced()
Clément Foucault [Sun, 9 Aug 2020 01:01:13 +0000 (03:01 +0200)]
GPUBatch: Remove most use of GPU_batch_draw_advanced()

This is in order to better encapsulate / isolate the drawing code.

30 hours agoCleanup: GPUBatch: Remove GL functions from uniform assignment
Clément Foucault [Sat, 8 Aug 2020 23:49:06 +0000 (01:49 +0200)]
Cleanup: GPUBatch: Remove GL functions from uniform assignment

30 hours agoCleanup: GPUBatch: Move gpu_batch_private.h to CPP header
Clément Foucault [Sat, 8 Aug 2020 23:21:34 +0000 (01:21 +0200)]
Cleanup: GPUBatch: Move gpu_batch_private.h to CPP header

30 hours agoCleanup: GPUShader: Remove unused code
Clément Foucault [Sat, 8 Aug 2020 23:19:00 +0000 (01:19 +0200)]
Cleanup: GPUShader: Remove unused code

30 hours agoGPUShader: Change shader state tracking to be part of the GPUContext
Clément Foucault [Sat, 8 Aug 2020 22:52:45 +0000 (00:52 +0200)]
GPUShader: Change shader state tracking to be part of the GPUContext

This remove the use of batch->program and replace it with batch->shader.

This will allow GL abstraction latter.

30 hours agoGPUBatch: Remove usage of gl_prim_type outside of GPU module
Clément Foucault [Sat, 8 Aug 2020 21:37:43 +0000 (23:37 +0200)]
GPUBatch: Remove usage of gl_prim_type outside of GPU module

30 hours agoGPUDrawList: GL backend isolation
Clément Foucault [Sat, 8 Aug 2020 13:24:52 +0000 (15:24 +0200)]
GPUDrawList: GL backend isolation

30 hours agoFix T65148: Drivers can't access shape keys
Sybren A. Stüvel [Thu, 13 Aug 2020 10:53:21 +0000 (12:53 +0200)]
Fix T65148: Drivers can't access shape keys

It was impossible for drivers to use shape key properties, modifiers
generate a new mesh. After mesh evaluation the shape keys are no longer
necessary, and because of this the `key` pointer was not copied. As
drivers work on evaluated data, however, they do need this `key`

This commit makes the `key` pointer available in evaluated meshes, but
this is somewhat dangerous. There was an explicit reason why the key on
result was kept at null pointer: to have the evaluated mesh in a
consistent state. Assigning this pointer makes it potentially
inconsistent, as the evaluated mesh and the original shape key may have
different topologies.

Reviewed By: sergey

Differential Revision:

32 hours agoMerge branch 'blender-v2.90-release'
Philipp Oeser [Thu, 13 Aug 2020 09:50:07 +0000 (11:50 +0200)]
Merge branch 'blender-v2.90-release'

32 hours agoPreferences: correct property description for keyitem restore
Philipp Oeser [Mon, 10 Aug 2020 12:55:13 +0000 (14:55 +0200)]
Preferences: correct property description for keyitem restore

Spotted while checking T79657.

Reviewers: brecht

Differential Revision:

33 hours agoFix T79743: baking still uses cage object after removal
Brecht Van Lommel [Thu, 13 Aug 2020 09:30:14 +0000 (11:30 +0200)]
Fix T79743: baking still uses cage object after removal

33 hours agoFix T79653: Change soft min frame start of cache from 1 to 0
Jacques Lucke [Thu, 13 Aug 2020 09:03:05 +0000 (11:03 +0200)]
Fix T79653: Change soft min frame start of cache from 1 to 0

It was always possible to set it to zero by typing in the value.
This new soft limit is more consistent with the fluid cache
and the Scene.frame_start property.

35 hours agoGPencil: Remove unused parameter and fix warning
Antonio Vazquez [Thu, 13 Aug 2020 06:38:05 +0000 (08:38 +0200)]
GPencil: Remove unused parameter and fix warning

35 hours agoCleanup: incorrect comment wrapping
Campbell Barton [Thu, 13 Aug 2020 06:36:20 +0000 (16:36 +1000)]
Cleanup: incorrect comment wrapping

Missed this comment when updating fix for T77409.

36 hours agoCleanup: warnings
Campbell Barton [Thu, 13 Aug 2020 06:23:43 +0000 (16:23 +1000)]
Cleanup: warnings

36 hours agoCleanup: spelling
Campbell Barton [Thu, 13 Aug 2020 06:21:10 +0000 (16:21 +1000)]
Cleanup: spelling

36 hours agoCleanup: clang-format
Campbell Barton [Thu, 13 Aug 2020 06:01:38 +0000 (16:01 +1000)]
Cleanup: clang-format

36 hours agoMerge branch 'blender-v2.90-release' into master
Campbell Barton [Thu, 13 Aug 2020 05:46:55 +0000 (15:46 +1000)]
Merge branch 'blender-v2.90-release' into master

36 hours agoMerge branch 'blender-v2.90-release' into master
Campbell Barton [Thu, 13 Aug 2020 05:46:46 +0000 (15:46 +1000)]
Merge branch 'blender-v2.90-release' into master

36 hours agoFix T77409: Crash showing vertex/face duplicators in edit-mode
Campbell Barton [Thu, 13 Aug 2020 03:56:15 +0000 (13:56 +1000)]
Fix T77409: Crash showing vertex/face duplicators in edit-mode

This was a regression in deaff945d0b9 which skips copying a mesh.
Dupli-verts/faces were not updated to account for this.

This supports iterating over edit-mesh vertices & faces,
since falling back to a full copy (as we do in some places)
will be slow while transforming geometry.

This commit looks as if it would change behavior with orcos,
since any edit-mesh deformation causes them to be assigned.
However in practice there is no functional change, details in comments.

36 hours agoCleanup: remove two sided face check
Campbell Barton [Thu, 13 Aug 2020 03:54:00 +0000 (13:54 +1000)]
Cleanup: remove two sided face check

Two sided faces aren't supported and would cause many issues elsewhere.

36 hours agoCleanup: use 'inst_ob' variable name for consistency
Campbell Barton [Thu, 13 Aug 2020 03:37:43 +0000 (13:37 +1000)]
Cleanup: use 'inst_ob' variable name for consistency

Dupli verts/faces named these arguments differently.

36 hours agoCleanup: remove unused struct members from dupli-face/vert
Campbell Barton [Thu, 13 Aug 2020 03:31:29 +0000 (13:31 +1000)]
Cleanup: remove unused struct members from dupli-face/vert

Replace the evaluated mesh with VertexDupliData.mvert since only
vertices are used. This makes dupli-vert similar to how dupli-face
was already working.

36 hours agoCleanup: move mesh access for dupli vert/face into shared function
Campbell Barton [Thu, 13 Aug 2020 03:30:25 +0000 (13:30 +1000)]
Cleanup: move mesh access for dupli vert/face into shared function

De-duplicate mesh access & comments.

36 hours agoCleanup: pass normal as a float to dupli-vert function
Campbell Barton [Thu, 13 Aug 2020 00:09:39 +0000 (10:09 +1000)]
Cleanup: pass normal as a float to dupli-vert function

Needed for supporting edit-mode dupli-verts.

Currently the un-scaled short values are used to avoid
changing behavior (noted in comments).

36 hours agoCleanup: spelling, use full sentences for object_dupli.c
Campbell Barton [Wed, 12 Aug 2020 23:49:49 +0000 (09:49 +1000)]
Cleanup: spelling, use full sentences for object_dupli.c

38 hours agoCleanup: use const for dupli vert/face, 'r_' prefix for return value
Campbell Barton [Wed, 12 Aug 2020 23:28:29 +0000 (09:28 +1000)]
Cleanup: use const for dupli vert/face, 'r_' prefix for return value

Make it obvious which values are used read-only, which are written to.

41 hours agoMerge branch 'blender-v2.90-release'
Hans Goudey [Thu, 13 Aug 2020 01:04:19 +0000 (21:04 -0400)]
Merge branch 'blender-v2.90-release'

41 hours agoUI: Fix curve widget fill artifacts
pembem22 [Thu, 13 Aug 2020 01:02:05 +0000 (21:02 -0400)]
UI: Fix curve widget fill artifacts

Disable antialiasing which caused artifacts.

Differential Revision:

44 hours agoFix hair collision error introduced in recent commit
Germano Cavalcante [Wed, 12 Aug 2020 21:40:48 +0000 (18:40 -0300)]
Fix hair collision error introduced in recent commit

45 hours agoCleanup: Silence some arithmetic overflow warnings
Germano Cavalcante [Wed, 12 Aug 2020 21:13:01 +0000 (18:13 -0300)]
Cleanup: Silence some arithmetic overflow warnings

45 hours agoCleanup: Move definitions of some variables closer to their use
Germano Cavalcante [Wed, 12 Aug 2020 21:03:12 +0000 (18:03 -0300)]
Cleanup: Move definitions of some variables closer to their use

45 hours agoCleanup: move assignment out of loop
Germano Cavalcante [Wed, 12 Aug 2020 20:57:26 +0000 (17:57 -0300)]
Cleanup: move assignment out of loop

45 hours agoCleanup: Rename variable 'cloth1' to 'cloth'
Germano Cavalcante [Wed, 12 Aug 2020 20:12:38 +0000 (17:12 -0300)]
Cleanup: Rename variable 'cloth1' to 'cloth'

45 hours agoFix Boundary Brush symmetry with no constant falloff
Pablo Dobarro [Tue, 11 Aug 2020 14:46:23 +0000 (16:46 +0200)]
Fix Boundary Brush symmetry with no constant falloff

When using constant falloff symmetry was working fine because the same
deformation is applied twice on the same vertices. When using no
constant falloffs, the deformation is different between symmetry passes,
so vertices need to be separated by symmetry areas to get the right
deformation from its symmetry pass without being overwriten by the next

Reviewed By: sergey

Differential Revision:

45 hours agoGPencil: Remove unused variable and fix memory leak
Antonio Vazquez [Wed, 12 Aug 2020 21:07:01 +0000 (23:07 +0200)]
GPencil: Remove unused variable and fix memory leak

This was missing in previous commit

45 hours agoSculpt: Boundary Brush Falloff Types and Offset
Pablo Dobarro [Tue, 11 Aug 2020 14:33:35 +0000 (16:33 +0200)]
Sculpt: Boundary Brush Falloff Types and Offset

This adds the boundary_falloff_type and boundary_offset to control how the
falloff of the Boundary Brush is applied.

Boundary Origin Offset is the same concept as the Pose Origin offset in
the Pose Brush. It is a multiplier that adds extra length to the brush
radius to locate the deformation pivot further from the boundary without
affecting the falloff.

The Falloff type includes Constant (previous default), brush radius, loop
and loop and invert. Loop and Loop and Invert can be used to create
deformation patterns in a mesh.

Reviewed By: sergey

Differential Revision:

45 hours agoGPencil: Remove unused parameter in convert curve
Antonio Vazquez [Wed, 12 Aug 2020 18:24:29 +0000 (20:24 +0200)]
GPencil: Remove unused parameter in convert curve

The only_stroke parameter is not used

45 hours agoGPencil: Clean material list when convert a curve
Antonio Vazquez [Wed, 12 Aug 2020 17:46:15 +0000 (19:46 +0200)]
GPencil: Clean material list when convert a curve

Now the list of materials is cleanup and any duplicated material is removed.

45 hours agoGPencil: Move merge similar materials code to BKE
Antonio Vazquez [Wed, 12 Aug 2020 17:34:49 +0000 (19:34 +0200)]
GPencil: Move merge similar materials code to BKE

This is required in other places and need to be shared.

45 hours agoGPencil: Fix unreported problem in merge similar materials
Antonio Vazquez [Wed, 12 Aug 2020 17:18:59 +0000 (19:18 +0200)]
GPencil: Fix unreported problem in merge similar materials

When two similar colors were adjacent, the colors were not merged.

45 hours agoGPencil: Fix unreported error in merge similar materials
Antonio Vazquez [Wed, 12 Aug 2020 14:45:07 +0000 (16:45 +0200)]
GPencil: Fix unreported error in merge similar materials

When the color was black, the original value was not initialized and get a NaN value with unexpected results.

Also cleanup code.

45 hours agoGPencil: Remove unused lines
Antonio Vazquez [Wed, 12 Aug 2020 14:14:57 +0000 (16:14 +0200)]
GPencil: Remove unused lines

45 hours agoGPencil: Recode all material management when convert SVG
Antonio Vazquez [Wed, 12 Aug 2020 13:48:42 +0000 (15:48 +0200)]
GPencil: Recode all material management when convert SVG

45 hours agoGPencil: Add Sample parameter to Convert curve
Antonio Vazquez [Wed, 12 Aug 2020 10:35:52 +0000 (12:35 +0200)]
GPencil: Add Sample parameter to Convert curve

This allows to resample the stroke to avoid too dense geometry.

45 hours agoGPencil: Add parameters to scale thickness when convert Curves
Antonio Vazquez [Wed, 12 Aug 2020 10:05:11 +0000 (12:05 +0200)]
GPencil: Add parameters to scale thickness when convert Curves

This parameter allows to scale the thickness.

45 hours agoGPencil: Interpolate thickness when convert Curve to GPencil
Antonio Vazquez [Wed, 12 Aug 2020 08:47:47 +0000 (10:47 +0200)]
GPencil: Interpolate thickness when convert Curve to GPencil

The curve was using only the last point radius of the segment. Now, the value is interpolated between start and end points.