blender.git
2 years agousing CG solver as default for nowsoftbody-stable-v1
over0219 [Thu, 9 Jul 2020 15:06:30 +0000 (9 10:06 -0500)]
using CG solver as default for now

2 years agofixed mcgs
over0219 [Wed, 1 Jul 2020 23:26:23 +0000 (1 18:26 -0500)]
fixed mcgs

2 years agoimproved lattice gen
over0219 [Wed, 1 Jul 2020 03:42:14 +0000 (30 22:42 -0500)]
improved lattice gen

2 years agoworking on mcgs
over0219 [Tue, 30 Jun 2020 22:07:29 +0000 (30 17:07 -0500)]
working on mcgs

2 years agogauss seidel solver
over0219 [Tue, 30 Jun 2020 02:28:37 +0000 (29 21:28 -0500)]
gauss seidel solver

2 years agoope forgot some files
over0219 [Fri, 26 Jun 2020 01:44:31 +0000 (25 20:44 -0500)]
ope forgot some files

2 years agoinit guess on x
over0219 [Wed, 24 Jun 2020 04:09:08 +0000 (23 23:09 -0500)]
init guess on x

2 years agoseveral bugfixes but I think I'm going to need to change the way I handle constrained...
over0219 [Wed, 24 Jun 2020 04:03:53 +0000 (23 23:03 -0500)]
several bugfixes but I think I'm going to need to change the way I handle constrained solve

2 years agoobstacle collisions. REALLY need to improve mass computation
over0219 [Tue, 23 Jun 2020 17:45:46 +0000 (23 12:45 -0500)]
obstacle collisions. REALLY need to improve mass computation

2 years agoworking on nearest-face traversal
over0219 [Tue, 23 Jun 2020 03:58:33 +0000 (22 22:58 -0500)]
working on nearest-face traversal

2 years agoworking on collision
over0219 [Tue, 23 Jun 2020 01:19:25 +0000 (22 20:19 -0500)]
working on collision

2 years ago more interface changes
over0219 [Tue, 23 Jun 2020 00:00:36 +0000 (22 19:00 -0500)]
 more interface changes

2 years agochanged up interface for lattice a bit
over0219 [Mon, 22 Jun 2020 23:45:38 +0000 (22 18:45 -0500)]
changed up interface for lattice a bit

2 years agofixed issue with rand causing mem error
over0219 [Mon, 22 Jun 2020 19:26:23 +0000 (22 14:26 -0500)]
fixed issue with rand causing mem error

2 years agoadded some asserts
over0219 [Tue, 16 Jun 2020 21:58:24 +0000 (16 16:58 -0500)]
added some asserts

2 years agolattice gen better but some bug on monkey, sometimes. probably a ptr error somewhere
over0219 [Tue, 16 Jun 2020 20:51:38 +0000 (16 15:51 -0500)]
lattice gen better but some bug on monkey, sometimes. probably a ptr error somewhere

2 years agoadded BVH
over0219 [Tue, 16 Jun 2020 17:26:16 +0000 (16 12:26 -0500)]
added BVH

2 years agolattice appears working but will want to remove lattice cubes that do not contain...
over0219 [Tue, 16 Jun 2020 01:26:26 +0000 (15 20:26 -0500)]
lattice appears working but will want to remove lattice cubes that do not contain mesh volume

2 years agodebugging uniform lattice
over0219 [Tue, 16 Jun 2020 00:56:00 +0000 (15 19:56 -0500)]
debugging uniform lattice

2 years agoimproved API for less for-all-verts loops
over0219 [Mon, 15 Jun 2020 23:30:34 +0000 (15 18:30 -0500)]
improved API for less for-all-verts loops

2 years agoreported mem leak in tetgen remesher but was just an malloc/free API call mistake...
over0219 [Fri, 12 Jun 2020 15:03:18 +0000 (12 10:03 -0500)]
reported mem leak in tetgen remesher but was just an malloc/free API call mistake, not a memleak. fixed.

2 years agoupdate api a bit
over0219 [Wed, 10 Jun 2020 20:03:20 +0000 (10 15:03 -0500)]
update api a bit

2 years agocache working but lots of copies
over0219 [Wed, 10 Jun 2020 19:46:02 +0000 (10 14:46 -0500)]
cache working but lots of copies

2 years agothreading
over0219 [Wed, 10 Jun 2020 16:47:53 +0000 (10 11:47 -0500)]
threading

2 years agostiffness settings
over0219 [Tue, 9 Jun 2020 23:23:28 +0000 (9 18:23 -0500)]
stiffness settings

2 years agoworking on interface
over0219 [Tue, 9 Jun 2020 23:13:56 +0000 (9 18:13 -0500)]
working on interface

2 years agoadded tetgen
over0219 [Mon, 8 Jun 2020 22:50:36 +0000 (8 17:50 -0500)]
added tetgen

2 years agoadded tetgen
over0219 [Mon, 8 Jun 2020 19:38:27 +0000 (8 14:38 -0500)]
added tetgen

2 years agostill pretty buggy. The solver should be working, but lattice is too lousy to see...
over0219 [Wed, 3 Jun 2020 04:26:39 +0000 (2 23:26 -0500)]
still pretty buggy. The solver should be working, but lattice is too lousy to see. The interface between blender and solver needs work too, doesn't seem to reset as often as I think it should be?

2 years agofirst commit. interfaced to very basic admmpd solver, but requires restart to begin...
over0219 [Wed, 3 Jun 2020 00:53:14 +0000 (2 19:53 -0500)]
first commit. interfaced to very basic admmpd solver, but requires restart to begin sim as caching not working for velocity. lattice is simply a packed 5-tet cube around mesh.

2 years agoFix for T77111: Joins Areas Without Creating Invalid Edges
Harley Acheson [Thu, 28 May 2020 18:34:31 +0000 (28 11:34 -0700)]
Fix for T77111: Joins Areas Without Creating Invalid Edges

Properly align every involved edge when performing 'tolerant' area joins.

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

Reviewed by Brecht Van Lommel

2 years agoVSE UI: Add buttons for swap Effect strip inputs
Peter Fog [Thu, 28 May 2020 18:17:22 +0000 (28 14:17 -0400)]
VSE UI: Add buttons for swap Effect strip inputs

The feature where the active strip determines what strip will be the
first input in effect strips can be quite a puzzle for users.
The operator to swap the inputs is hidden in the Strip menu.

This adds the swapping to the Effect sidebar panel.

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

2 years agoVSE UI: Move Scene strip and Mask strip above Adjustment in Sidebar
Peter Fog [Thu, 28 May 2020 16:53:06 +0000 (28 12:53 -0400)]
VSE UI: Move Scene strip and Mask strip above Adjustment in Sidebar

This is consistent with the other strip specific properties.

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

2 years agoVSE UI: Rename Scene Strip Panel and Move View Panel Up
Peter Fog [Thu, 28 May 2020 16:42:44 +0000 (28 12:42 -0400)]
VSE UI: Rename Scene Strip Panel and Move View Panel Up

 - Rename "Scene Preview/Render" to "Scene Strip Display",
   since this relates to Scene Strips.
 - Move the "Scene Strip Display" down, so the view settings are on top.

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

2 years agoVSE UI: Group Show Elements in View Menu, Use Consistent Naming
Peter Fog [Thu, 28 May 2020 16:23:11 +0000 (28 12:23 -0400)]
VSE UI: Group Show Elements in View Menu, Use Consistent Naming

Use the "Show..." syntax for Show elements in View menu.

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

2 years agoVSE UI: rename Trim Offset to Slip Offset
Peter Fog [Thu, 28 May 2020 16:15:41 +0000 (28 12:15 -0400)]
VSE UI: rename Trim Offset to Slip Offset

The operator was at some point renamed from Trim to Slip,
but not yet in the header text.

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

2 years agoUI: Use Heading to Remove Text strip Shadow Subpanel
Peter Fog [Thu, 28 May 2020 16:11:53 +0000 (28 12:11 -0400)]
UI: Use Heading to Remove Text strip Shadow Subpanel

The new "heading=" option allows for a more simple way to expose the
Text strip Shadow operator.

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

2 years agoCleanup: GPU: Fix warning
Clément Foucault [Thu, 28 May 2020 12:04:52 +0000 (28 14:04 +0200)]
Cleanup: GPU: Fix warning

2 years agoMerge branch 'blender-v2.83-release'
Clément Foucault [Thu, 28 May 2020 11:43:57 +0000 (28 13:43 +0200)]
Merge branch 'blender-v2.83-release'

2 years agoGPencil: Reduce aliasing for subpixel lines
Clément Foucault [Thu, 28 May 2020 11:36:24 +0000 (28 13:36 +0200)]
GPencil: Reduce aliasing for subpixel lines

2 years agoGPU: Fix compilation warning about uninitialized values
Clément Foucault [Thu, 28 May 2020 11:41:33 +0000 (28 13:41 +0200)]
GPU: Fix compilation warning about uninitialized values

2 years agoCleanup: DRW: Remove array suffix from uniform name
Clément Foucault [Wed, 27 May 2020 23:17:06 +0000 (28 01:17 +0200)]
Cleanup: DRW: Remove array suffix from uniform name

2 years agoDRW: Add DRW_shgroup_uniform_vec4_array_copy
Clément Foucault [Wed, 27 May 2020 23:14:45 +0000 (28 01:14 +0200)]
DRW: Add DRW_shgroup_uniform_vec4_array_copy

2 years agoReadfile: move all calls to 'id_us_ensure_real' to direct_link functions.
Bastien Montagne [Thu, 28 May 2020 10:13:16 +0000 (28 12:13 +0200)]
Readfile: move all calls to 'id_us_ensure_real' to direct_link functions.

That kind of 'own' ID management has really nothing to do in lib_link
code.

2 years agoFix T65889: Hair Particles not updating when using image sequence
Sergey Sharybin [Thu, 28 May 2020 08:46:04 +0000 (28 10:46 +0200)]
Fix T65889: Hair Particles not updating when using image sequence

2 years agoDepsgraoh: Fix missing texture node allocation
Sergey Sharybin [Thu, 28 May 2020 08:44:07 +0000 (28 10:44 +0200)]
Depsgraoh: Fix missing texture node allocation

It was causing wrong binding for image animation: since there was no
ID node for texture at the moment of build_animdata original texture
ID was passed to the callback. This is not what is supposed to happen.

This is part of fix for T65889.

2 years agoCleanup: remove unused struct members from RenderStats
Campbell Barton [Thu, 28 May 2020 06:54:27 +0000 (28 16:54 +1000)]
Cleanup: remove unused struct members from RenderStats

2 years agoCleanup: spelling
Campbell Barton [Thu, 28 May 2020 06:42:31 +0000 (28 16:42 +1000)]
Cleanup: spelling

2 years agoFix cone primitive creating duplicate vertices
Campbell Barton [Thu, 28 May 2020 06:04:49 +0000 (28 16:04 +1000)]
Fix cone primitive creating duplicate vertices

Using remove double wasn't reliable as the matrix argument
could cause vertices to be further apart than the threshold allowed for.

This happened when adding cones using the new add tool.

2 years agoObject: new add object tool, currently for primitive types
Campbell Barton [Thu, 28 May 2020 04:34:17 +0000 (28 14:34 +1000)]
Object: new add object tool, currently for primitive types

- Interactively adding primitives with two clicks.
- Scene orientation used for new objects.
- Depth [view-plane, axis-plane, surface]
- Origin [base, center]
- Primitive types [cube, cylinder, cone, uv-sphere, ico-sphere ]
- Settings for object types in the top-bar.

Shortcuts:

- Snapping (Ctrl).
- Constrain 1:1 aspect (Shift).
- Toggle center (Alt).

Part of T57210 design task.

2 years agoObject: add scale argument to creation operators
Campbell Barton [Thu, 28 May 2020 04:30:42 +0000 (28 14:30 +1000)]
Object: add scale argument to creation operators

Needed for to create objects of a specific size.

2 years agoGizmo: add flag for gizmos to ignore keymap events
Campbell Barton [Thu, 28 May 2020 04:28:06 +0000 (28 14:28 +1000)]
Gizmo: add flag for gizmos to ignore keymap events

Needed for the snap gizmo not to steal mouse events from the tool.

2 years agoCleanup: missing braces warning
Campbell Barton [Thu, 28 May 2020 04:33:37 +0000 (28 14:33 +1000)]
Cleanup: missing braces warning

2 years agoCD_PROP_COL datalayer
Pablo Dobarro [Wed, 27 May 2020 18:04:09 +0000 (27 20:04 +0200)]
CD_PROP_COL datalayer

This implements a generic color datalayer and its functions. Based on
D5975.

Reviewed By: brecht

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

2 years agoRuler: Remove highlight hack
Germano Cavalcante [Wed, 27 May 2020 17:27:28 +0000 (27 14:27 -0300)]
Ruler: Remove highlight hack

2 years agoCleanup: Use bitmaps insteand of bool and char arrays
Pablo Dobarro [Wed, 27 May 2020 15:42:06 +0000 (27 17:42 +0200)]
Cleanup: Use bitmaps insteand of bool and char arrays

This was propsed in D7059, so I applied it to the rest of the code

Reviewed By: campbellbarton, sergey

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

2 years agoFix T77109: Cycles viewport render crash after object add and undo
Brecht Van Lommel [Wed, 27 May 2020 16:00:59 +0000 (27 18:00 +0200)]
Fix T77109: Cycles viewport render crash after object add and undo

2 years agoUpdate the default Face Set when creating Face Sets from visible
Pablo Dobarro [Sat, 25 Apr 2020 19:44:44 +0000 (25 21:44 +0200)]
Update the default Face Set when creating Face Sets from visible

If all vertices in the sculpt are visible create the new face set and
update the default face set. This is the same as disabling the overlay,
so it will not have the extra performance cost of rendering a colored
face set twice that gives no information.

Reviewed By: jbakker

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

2 years agoFix T75096: Crash when using liquid simulation as dynamic paint brush
Jacques Lucke [Wed, 27 May 2020 14:15:06 +0000 (27 16:15 +0200)]
Fix T75096: Crash when using liquid simulation as dynamic paint brush

Reviewers: sergey

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

2 years agoMerge branch 'blender-v2.83-release'
Patrick Mours [Wed, 27 May 2020 13:31:03 +0000 (27 15:31 +0200)]
Merge branch 'blender-v2.83-release'

2 years agoFix T76947: Optix realtime denoiser progressively reduces brightness of very bright...
Patrick Mours [Wed, 27 May 2020 13:17:47 +0000 (27 15:17 +0200)]
Fix T76947: Optix realtime denoiser progressively reduces brightness of very bright objects

The input data to the OptiX denoiser was clamped to 0..10000 as required, but it could easily
exceed that range with a high number of samples (since the data contains the overall sum). To
fix that, divide by the number of samples first and multiply it back in after the denoiser ran.

2 years agoOpenSubdiv: Only store edges topology for non-smooth edges
Sergey Sharybin [Tue, 26 May 2020 10:42:13 +0000 (26 12:42 +0200)]
OpenSubdiv: Only store edges topology for non-smooth edges

This change makes it so vertices of edge are only stored when edge
has non-zero crease. This allows to lower memory footprint of 1.5M
faces from 78 MiB to 54 MiB in the case all creases are zero.

Meshes with crease are more hard to predict due to array-based
storage, so it all depends on index of edge with crease. Worst case
(all edges are creased) still stays at 78 MiB.

2 years agoOpenSubdiv: Allow any order of edge topology/sharpness assignment
Sergey Sharybin [Tue, 26 May 2020 10:37:03 +0000 (26 12:37 +0200)]
OpenSubdiv: Allow any order of edge topology/sharpness assignment

Makes it possible to set adjacent vertices after edge sharpness.

Initially it seemed like useful sanity check, but with time it
became rather a burden.

2 years agoOpenSubdiv: Optimize faces storage in mesh topology
Sergey Sharybin [Tue, 26 May 2020 08:54:46 +0000 (26 10:54 +0200)]
OpenSubdiv: Optimize faces storage in mesh topology

Avoid per-face pointer and allocation: store everything as continuous
arrays.

Memory footprint for 1.5M faces:

- Theoretical worst case (all vertices and edges have crease) memory
  goes down from 114 MiB to 96 MiB (15% improvement).

  This case is not currently achievable since Blender does not expose
  vertex crease yet.

- Current real life worst case (all edges have crease) memory goes
  down from 108 MiB to 90 MiB (17% improvement).

- Best case (no creases at all) memory goes down from 96 MiB to 78 MiB
  (19% improvement).

2 years agoOpenSubdiv: Add regression tests for mesh topology
Sergey Sharybin [Tue, 26 May 2020 08:23:29 +0000 (26 10:23 +0200)]
OpenSubdiv: Add regression tests for mesh topology

While this looks trivial it already allowed to catch issues in one
of previous attempt to optimize memory usage. It will totally be
useful for an upcoming refactor of face topology storage.

2 years agoOpenSubdiv: Hide individual topology elements
Sergey Sharybin [Tue, 26 May 2020 08:01:46 +0000 (26 10:01 +0200)]
OpenSubdiv: Hide individual topology elements

Move all API to happen via MeshTopology.

This is a preparation for an upcoming memory optimization.

2 years agoOpenSubdiv: Cleanup, remove unused code
Sergey Sharybin [Tue, 19 May 2020 14:43:16 +0000 (19 16:43 +0200)]
OpenSubdiv: Cleanup, remove unused code

There is no need in edge map anymore.

2 years agoOpenSubdiv: Add TODO avoid checking face-varying topology for equality
Sergey Sharybin [Tue, 19 May 2020 14:38:31 +0000 (19 16:38 +0200)]
OpenSubdiv: Add TODO avoid checking face-varying topology for equality

2 years agoOpenSubdiv: Move preliminary geometry counters check to mesh topology
Sergey Sharybin [Tue, 19 May 2020 14:37:19 +0000 (19 16:37 +0200)]
OpenSubdiv: Move preliminary geometry counters check to mesh topology

2 years agoOpenSubdiv: Keep explicit storage of base mesh faces
Sergey Sharybin [Tue, 19 May 2020 14:19:40 +0000 (19 16:19 +0200)]
OpenSubdiv: Keep explicit storage of base mesh faces

Allows to perform comparison by doing linear comparison of indices.

Before cyclic match was used to deal with possibly changed winding from
OpenSubdiv side.

Speeds up comparison (and hence improves FPS), makes code more reliable
nut uses more memory.

2 years agoOpenSubdiv: Compare edge topology
Sergey Sharybin [Tue, 19 May 2020 13:48:57 +0000 (19 15:48 +0200)]
OpenSubdiv: Compare edge topology

This change makes it so topology refiner comparison will check vertices
of all existing/provided edges.

The initial claim that due to manifold nature of mesh there is no need
in "deep" edges check was wrong: some areas might only provide edges
with non-zero creases. So if crease of one edge goes changes from 1.0
to 0.0 and crease of other edge goes from 0.0 to 1.0 the old comparison
code would not have caught it.

2 years agoOpenSubdiv: Refactor, move mesh topology comparison to own file
Sergey Sharybin [Tue, 19 May 2020 12:30:58 +0000 (19 14:30 +0200)]
OpenSubdiv: Refactor, move mesh topology comparison to own file

Makes it easier to follow and extend.

2 years agoOpenSubdiv: Use explicit storage for edge sharpness
Sergey Sharybin [Tue, 19 May 2020 10:38:52 +0000 (19 12:38 +0200)]
OpenSubdiv: Use explicit storage for edge sharpness

Similar to previous change in vertex sharpness, explicitly store value
provided by the converter.

Allows to avoid rather fragile check for boundary edges.

Also allows to avoid need in constructing edge map. This lowers memory
footprint of the comparison process and avoids memory allocations
during the comparison (which is an extra benefit from the performance
point of view).

2 years agoOpenSubdiv: Allow use of regular ordered map
Sergey Sharybin [Tue, 19 May 2020 10:12:48 +0000 (19 12:12 +0200)]
OpenSubdiv: Allow use of regular ordered map

2 years agoOpenSubdiv: Refactor, move comparison to own file
Sergey Sharybin [Tue, 19 May 2020 10:02:54 +0000 (19 12:02 +0200)]
OpenSubdiv: Refactor, move comparison to own file

2 years agoOpenSubdiv: Compare sharpness based on converter
Sergey Sharybin [Tue, 19 May 2020 09:43:58 +0000 (19 11:43 +0200)]
OpenSubdiv: Compare sharpness based on converter

This change starts the transition of topology refiner comparison
to compare actual values given by the converter, which will not be
affected by the refinement or face winding synchronization steps.

Currently is only implemented for vertex sharpness, but will be
extended further as followup development.

Fixes T71908: Subdiv: Incorrect topology comparison, leading to poor performance

2 years agoOpenSubdiv: Add explicit storage for mesh topology
Sergey Sharybin [Tue, 19 May 2020 09:39:07 +0000 (19 11:39 +0200)]
OpenSubdiv: Add explicit storage for mesh topology

The idea is to use this explicit storage for topology comparison rather
than using base level. While this will have memory overhead it allows
to simplify comparison of such things as:

- Vertex sharpness (where base level from topology refiner will have it
  refined, meaning it will be different from what application requested
  for non-manifold and corner vertices).

- It will allow to simplify face-vertices comparison, where currently
  O(N^2) algorithm is used due to possible difference in face winding.

- It will also allow to avoid comparison-time allocation of edge map.

Currently no functional changes, just preparing for development which
will happen next.

2 years agoOpenSubdiv: Add move semantic to the namespace
Sergey Sharybin [Tue, 19 May 2020 09:38:13 +0000 (19 11:38 +0200)]
OpenSubdiv: Add move semantic to the namespace

2 years agoOpenSubdiv: Refactor, pass higher level object through comparison
Sergey Sharybin [Tue, 19 May 2020 09:36:06 +0000 (19 11:36 +0200)]
OpenSubdiv: Refactor, pass higher level object through comparison

2 years agoOpenSubdiv: Refactor, move utils to base
Sergey Sharybin [Tue, 19 May 2020 08:59:38 +0000 (19 10:59 +0200)]
OpenSubdiv: Refactor, move utils to base

Also split them across utilities and types.

2 years agoOpenSubdiv: Refactor, move base C-API file to base folder
Sergey Sharybin [Tue, 19 May 2020 08:55:56 +0000 (19 10:55 +0200)]
OpenSubdiv: Refactor, move base C-API file to base folder

2 years agoOpenSubdiv: Cleanup, use C++ range based loop
Sergey Sharybin [Tue, 19 May 2020 08:53:57 +0000 (19 10:53 +0200)]
OpenSubdiv: Cleanup, use C++ range based loop

Avoid indirection via define.

2 years agoOpenSubdiv: Cleanup, move utility function to base type conversion
Sergey Sharybin [Tue, 19 May 2020 08:52:35 +0000 (19 10:52 +0200)]
OpenSubdiv: Cleanup, move utility function to base type conversion

2 years agoOpenSubdiv: Refactor, move type conversion to base fodler
Sergey Sharybin [Tue, 19 May 2020 08:49:41 +0000 (19 10:49 +0200)]
OpenSubdiv: Refactor, move type conversion to base fodler

2 years agoOpenSubdiv: Refactor, move evaluator to own folder
Sergey Sharybin [Tue, 19 May 2020 08:46:42 +0000 (19 10:46 +0200)]
OpenSubdiv: Refactor, move evaluator to own folder

2 years agoOpenSubdiv: Completely disable topology verification
Sergey Sharybin [Tue, 19 May 2020 08:26:23 +0000 (19 10:26 +0200)]
OpenSubdiv: Completely disable topology verification

Previously it was enabled for debug builds, now it is to be enabled
explicitly.

The reason for this is to reduce overhead when debugging other areas
which might involve subdivision surface. When conversion is to be
debugged set this manually in the code.

2 years agoOpenSubdiv: Refactor, move edge map to base folder
Sergey Sharybin [Tue, 19 May 2020 08:20:11 +0000 (19 10:20 +0200)]
OpenSubdiv: Refactor, move edge map to base folder

2 years agoOpenSubdiv: Refactor creation of topology refiner
Sergey Sharybin [Tue, 19 May 2020 08:13:16 +0000 (19 10:13 +0200)]
OpenSubdiv: Refactor creation of topology refiner

Consolidate it inside of the topology refiner implementation class,
which would allow to store extra data acquired during construction
of the OpenSubdiv's object.

2 years agoOpenSubdiv: Refactor, use C++ allocation for internal classes
Sergey Sharybin [Tue, 19 May 2020 07:42:05 +0000 (19 09:42 +0200)]
OpenSubdiv: Refactor, use C++ allocation for internal classes

Only use OBJECT_GUARDED_{NEW. DELETE} for structures which are part of
public C-API (and hence can not have new/delete operators overloaded).

Could try being brave and override new/delete from under C++ ifdef.

2 years agoOpenSubdiv: Refactor, move topology refiner factory to topology folder
Sergey Sharybin [Tue, 19 May 2020 07:26:22 +0000 (19 09:26 +0200)]
OpenSubdiv: Refactor, move topology refiner factory to topology folder

2 years agoOpenSubdiv: Refactor, move topology refiner to own folder
Sergey Sharybin [Mon, 18 May 2020 16:47:38 +0000 (18 18:47 +0200)]
OpenSubdiv: Refactor, move topology refiner to own folder

In the future factory will also be moved there.

2 years agoOpenSubdiv: Refactor, move device specific code to own files
Sergey Sharybin [Mon, 18 May 2020 16:16:10 +0000 (18 18:16 +0200)]
OpenSubdiv: Refactor, move device specific code to own files

Also, move all device files to own folder.

Makes it so checks for device availability are done in a localized
place.

2 years agoUI: Skip unnecessary cursor setting
Konrad Puklicki [Wed, 27 May 2020 10:04:14 +0000 (27 12:04 +0200)]
UI: Skip unnecessary cursor setting

Currently, in sculpting, weight paint and vertex paint modes every cursor
movement triggers redraw of a brush. During that redraw, native cursor is set.
Under the hood, setting the cursor causes freeing of previous cursor and
allocating a new one. In most cases, in previously mentioned modes, recreating
cursor is unnecessary since cursor stays the same.

This patch adds a check which skips cursor change if requested cursor is
already set. The check could be added in pain_cursor.c, but I felt adding it
inside WM_cursor_set function would hopefully skip more unnecessary cursor
reallocations.

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

Reviewed by: Julian Eisel

2 years agoMerge remote-tracking branch 'origin/blender-v2.83-release'
Dalai Felinto [Wed, 27 May 2020 10:01:04 +0000 (27 12:01 +0200)]
Merge remote-tracking branch 'origin/blender-v2.83-release'

2 years agoFix T77105: Crashes when clicking "new scene" button
Dalai Felinto [Wed, 27 May 2020 09:58:49 +0000 (27 11:58 +0200)]
Fix T77105: Crashes when clicking "new scene" button

This was introduced on ecc395e473d.

Effectively this is reverting that commit for cases when
scene->toolsettings->sculpt is NULL. But since the facesets are only
working for sculpting this should be fine.

2 years agoCycles: Upgraded Embree to version 3.10.0
Stefan Werner [Thu, 30 Apr 2020 09:04:44 +0000 (30 11:04 +0200)]
Cycles: Upgraded Embree to version 3.10.0

Enabled round linear hair in Embree.

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

2 years agoCleanup: remove unused Main struct from snap context
Campbell Barton [Wed, 27 May 2020 06:54:34 +0000 (27 16:54 +1000)]
Cleanup: remove unused Main struct from snap context

2 years agoGizmo: lazy initialize snap context
Campbell Barton [Wed, 27 May 2020 06:47:30 +0000 (27 16:47 +1000)]
Gizmo: lazy initialize snap context

ED_gizmotypes_snap_3d_context_get could have returned NULL,
rename _get(..) to _ensure(..) and initialize the snap context
in this function.

2 years agoRuler: Implement Snap Gizmo
Germano Cavalcante [Wed, 27 May 2020 03:16:32 +0000 (27 00:16 -0300)]
Ruler: Implement Snap Gizmo

The snap point can now be viewed when activating the tool.

2 years agoGizmo Library: New Snap Gizmo
Germano Cavalcante [Wed, 27 May 2020 03:14:11 +0000 (27 00:14 -0300)]
Gizmo Library: New Snap Gizmo

Generic snap gizmo to be used for different tools.

The Gizmo can be configured initially by the following properties:
- `"snap_elements_force"`, `"prev_point"`

The following properties can be read as return:
- `"location"`, `"normal"`, `"snap_elem_index"`

This property can be linked to another (tool_setting.snap_elements):
- `"snap_elements"`

And this 3 extra utilities have been added:
- `ED_gizmotypes_snap_3d_draw_util`,
- `ED_gizmotypes_snap_3d_context_get`,
- `ED_gizmotypes_snap_3d_update`.

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