Commit Graph

118471 Commits

Author SHA1 Message Date
Campbell Barton b1a672f541 CMake: add missing headers 2022-10-03 12:13:01 +11:00
Campbell Barton 7afee060d0 Cleanup: add license header 2022-10-03 12:04:41 +11:00
Campbell Barton d4d40f3b69 DNA: reduce size of Base struct
Re-order members and remove pad members,
reducing it's size by 24 bytes on 64 bit systems.
2022-10-03 11:19:15 +11:00
Campbell Barton d3ba8826b0 Cleanup: remove 2D region-relative coordinates from Base
Historically, caching these values may have had some advantages,
simplifying drawing object centers and selecting by object center.

Now the only uses of these values would calculate the projection
before use, so there is no reason to store run-time projection in DNA.

This also quiets a `-Wstring-overflow` warning.
2022-10-03 11:07:17 +11:00
Campbell Barton ea2c41c730 Cleanup: spelling in comments
Also replace "dm" for evaluated mesh in some comments.
2022-10-03 11:03:46 +11:00
Campbell Barton 55387197a7 Cleanup: use function style casts for C++ 2022-10-03 11:03:46 +11:00
Campbell Barton d762132a72 Cleanup: quiet undeclared function warning 2022-10-03 10:24:05 +11:00
Hans Goudey 15e6673ccd Cleanup: Move three modifier files to C++ 2022-10-02 11:17:40 -05:00
Ray Molenkamp ed6764dede Fix: build issue with MSVC
Issue introduced by rB208b3a0472b3
which fixed a build issue on linux.

This fix is a band-aid at best but
reverting rB208b3a0472b3 is not
really an option since that would
break linux again.
2022-10-02 10:17:05 -06:00
Clément Foucault 5a982b0695 GPUTexture: Add GPU_texture_create_single_layer_view
This allows the creation of texture arrays from 1D/2D/Cube texture.
This is useful when the shader expect a texture array but the original
texture isn't.
2022-10-02 15:18:42 +02:00
Brecht Van Lommel 208b3a0472 Fix build error on Linux after font thumbnail changes 2022-10-02 15:06:34 +02:00
Antonio Vazquez 9d30adb7eb Cleanup: Rename function `gpencil_point_to_parent_space`
gpencil_point_to_parent_space -> gpencil_point_to_world_space

The old name was not clear because it looked it was moving into
the object space, but really is doing the opposite.
2022-10-02 13:40:42 +02:00
Antonio Vazquez 8f1d3e14d9 Cleanup: Rename functions
gpencil_apply_parent->gpencil_world_to_object_space
gpencil_apply_parent_point->gpencil_world_to_object_space_point

The old name was not descriptive enough.
2022-10-02 13:40:42 +02:00
Hans Goudey e0a261c653 Cleanup: Move more files using mesh runtime data to C++
In preparation for moving mesh runtime data out of DNA.
2022-10-01 22:13:19 -05:00
Charlie Jolly b14ad9114f Fix: Mix node did not set clamp result correctly in versioning code
Files were incorrectly loaded without the Clamp Result option set.

Reported in BA by CarlG
2022-10-02 00:04:30 +01:00
Jason Fielder 0fdb9cd650 GPU: Fix issue with GPU render boundaries being opened while a GPUBackend does not exist.
Fixes regression introduced by rBe8bcca4bdc94 (D15900)

Ref T96261

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D16085
2022-10-02 00:08:52 +02:00
Pratik Borhade ffd8390af7 Fix T101504: Crash when repeat value is zero
Crash triggers due to division by zero
fix is to increase minimum limit for `seg_repeat` to 1

Reviewed By: antoniov, frogstomp

Maniphest Tasks: T101504

Differential Revision: https://developer.blender.org/D16120
2022-10-01 16:28:29 +02:00
Chris Blackbourn e5ccbfab09 Cleanup: simplify uv packing for non-square materials 2022-10-01 17:29:14 +13:00
Joseph Eagar 206dead860 Sculpt: Fix T101467: Improper vertex count in pbvh draw 2022-09-30 15:40:50 -07:00
Joseph Eagar 81f15a51aa Sculpt: Fix sculpt face set undo creating duplicate face set layers 2022-09-30 15:35:11 -07:00
Joseph Eagar 991a35b844 Sculpt: fix crash in relax face sets brush 2022-09-30 15:32:01 -07:00
Joseph Eagar 6b9f45c1d1 Sculpt: Fix T101430: Dyntopo undo crash 2022-09-30 15:28:26 -07:00
Joseph Eagar 5b0485fd77 Sculpt: Upload white for color attributes in multires in sculpt
Even if multires in sculpt mode doesn't yet support color
attributes, we should at least upload white color to avoid
making everything black.

Also fixed a bug where multires PBVHs didn't have access to
their CustomData attribute layout, which PBVH draw needs.
2022-09-30 15:19:10 -07:00
Joseph Eagar 1eba76d8ed Sculpt: Fix T101503: Memory corruption in multires faceset drawing 2022-09-30 15:02:50 -07:00
Joseph Eagar 4cbafba04b Sculpt: Fix T101430: Curve shown improperly in mask from cavity redo 2022-09-30 14:56:06 -07:00
Alexander Gavrilov 554afabf75 Attribute Node: refactor lookup to remove duplication between engines.
Currently lookup of Object and Instancer attributes is completely
duplicated between Cycles, Eevee and Eevee Next. This is bad design,
so this patch aims to deduplicate it by introducing a common API
in blenkernel.

In case of Cycles this requires certain hacks, but according to
Brecht it is planned to be rewritten later for more direct access
to internal Blender data anyway.

Differential Revision: https://developer.blender.org/D16117
2022-09-30 20:01:57 +03:00
Hans Goudey 42eda155df Cleanup: Move draw_manager_data.cc to C++
This will help with moving mesh runtime data to C++
2022-09-30 09:38:02 -05:00
Philipp Oeser 8ba508d70b Fix missing Outliner updates when adding nodetrees
When e.g. grouping nodes into nodegroups, these would not show up
immediately in the Outliner (Blender File / Data API view).

Now send (unique combination, not used elsewhere) notifiers (and listen
for these in the Outliner).

Differential Revision: https://developer.blender.org/D16093
2022-09-30 11:53:03 +02:00
Campbell Barton 2004827bc9 Fix T101347: Curve draw fails to project to cursor depth in ortho views
ED_view3d_win_to_3d_on_plane with do_clip enabled wasn't working in
non-camera orthographic views as it didn't take into account the ray
origin being centered to the view.

Resolve by testing viewport clipping after the ray has been projected.
2022-09-30 18:29:26 +10:00
Philipp Oeser 68ac737d48 Cleanup: format 2022-09-30 10:28:11 +02:00
Philipp Oeser 6865aab133 Cleanup: quiet unused parameter warning in lambda function
Copy-paste error in rB039429faeb41.
2022-09-30 10:27:48 +02:00
Campbell Barton dbc097d6b8 Fix error in blf_get_sample_text returning a pointer to stack memory
Copy-by-value was used when iterating over unicode_samples which
then referenced an array from the value.

Resolve by referencing a const pointer to the unicode_sample array.
2022-09-30 15:03:18 +10:00
Campbell Barton 8bdd4b4685 Cleanup: use function style casts for C++ 2022-09-30 14:51:49 +10:00
Hans Goudey 1c1dc5f844 Cleanup: Move files that use mesh runtime data to C++
In preparation for moving the mesh runtime struct out of DNA.
2022-09-29 18:32:44 -05:00
Hans Goudey 7db79feecd Cleanup: Move object_update.c to C++ 2022-09-29 17:11:20 -05:00
Hans Goudey 0ff485b6ba Cleanup: Move modifier.c to C++ 2022-09-29 16:43:09 -05:00
Hans Goudey 3059c0998a Fix T101118, T101471: Crash with bevel weight in solidify modifier
Just a missing null check for the original edge weight.
2022-09-29 16:40:13 -05:00
Joseph Eagar 688c4f7e51 Sculpt: fix stroke-only attributes not being freed at stroke end 2022-09-29 13:45:17 -07:00
Joseph Eagar b063cfa9cf Sculpt: fix T101465, crash in cloth filter with new automasking modes 2022-09-29 13:38:16 -07:00
Joseph Eagar 6a9b45995d Sculpt: Fix T101464: Crash in mask from cavity 2022-09-29 13:14:42 -07:00
Joseph Eagar f998fa2732 Sculpt: Fix T101463: Don't initialize automask to zero in
factor mode if topology or boundary modes are inactive

Factors mode (precomputing the automask) should initialize the
mask to 1.0 if no additive automasking modes are enabled, instead
of zero.
2022-09-29 13:06:55 -07:00
Hans Goudey c938447ee2 Cleanup: Naming in edge vertices node
- Use `enum class`
- Use shorter names for field input classes for better line wrapping
- Use "Vert" instead of "Vertex"
2022-09-29 15:01:10 -05:00
Hans Goudey 912a1e2820 Fix: Order of node mixins in custom nodes python template
See T101259. This order makes the poll not work, even when called from
Python. The bundled template shouldn't be a source of errors for node
addons.
2022-09-29 11:59:02 -05:00
Hans Goudey c007e84e9e Fix: Viewer node overlay alpha broken on NVidia GPUs
On NVidia GPUs, when the blue channel was between 0 and 0.1,
the overlay's alpha would increase, making it invisible.

With the `overlay_line_fb` frame buffer bound in `overlay_engine.cc`
there are two outputs to write to: the color and the line output, which
is used for making smooth antialiased lines. The overlay is in its
current position in the order of overlays so that it draws on top of
curve wire lines. Not writing to that second output is undefined
behavior, so fix it by writing zeros. In the future, the overlay
could be smoothed on curves using that second texture.

Thanks to Clément for the explanation of the issue!
2022-09-29 11:28:48 -05:00
Antonio Vazquez 520d111eca Cleanup: Simplify code and remove duplications
This commit simplify the previous fix for T101455

f6c2f1c65e
2022-09-29 15:03:23 +02:00
Antonio Vazquez d2e576f34c GPencil: Remove Fill `use_collide_only` option
After a lot of testing, this option is not required and
now this is managed by stroke_collsion.

If the stroke_collision is enabled, only collide strokes 
are used.
2022-09-29 14:58:29 +02:00
Antonio Vazquez 10f1972ff7 GPencil: Fix missing Fill stroke cross detection
If the cross point was in the extreme of the stroke the
collision was not detected because it could be
outside of the bbox.

Removed the bbox check because now it is
not necessary.
2022-09-29 13:51:58 +02:00
Antonio Vazquez f6c2f1c65e Fix T101455: GPencil Gizmo in wrong location when using Active Element
The gizmo was not set when this option was selected.

By design, in grease pencil the active element option uses
the object origin as pivot point.
2022-09-29 13:38:31 +02:00
Jacques Lucke b70b02ee42 Fix: Spline Parameter node produces NaN when curve is a single point
Issue found in file from T101256.
2022-09-29 13:32:03 +02:00
Jacques Lucke ffccdf069b Nodes: fix missing update when input of muted node changes 2022-09-29 13:09:00 +02:00