Commit Graph

120955 Commits

Author SHA1 Message Date
Campbell Barton
bc502f3b19 CMake: add WITH_LIBS_PRECOMPILED option (UNIX only)
This makes it convenient to build blender without referencing
pre-compiled libraries which don't always work on newer Linux systems.

Previously I had to rename ../lib while creating the CMakeCache.txt
to ensure my systems libraries would be used.

This change ensures LIBDIR is undefined when WITH_LIBS_PRECOMPILED is
disabled, so any accidental use warns with CMake's `--warn-unused-vars`
argument is given.
2023-01-19 17:10:42 +11:00
Campbell Barton
66dee44088 CMake: quiet references to undeclared variable warnings
These warnings can reveal errors in logic, so quiet them by checking
if the features are enabled before using variables or by assigning
empty strings in some cases.

- Check CMAKE_THREAD_LIBS_INIT is set before use as CMake docs
  note that this may be left unset if it's not needed.
- Remove BOOST/OPENVDB/VULKAN references when disable.
- Define INC_SYS even when empty.
- Remove PNG_INC from freetype (not defined anywhere).
2023-01-19 17:10:42 +11:00
Campbell Barton
8b7d2d8eb2 CMake: use BULLET_LIBRARIES for both extern_bullet and system libraries
There was no need to differentiate between these and it made
the CMake files more verbose.
2023-01-19 17:10:42 +11:00
Campbell Barton
978a7459f1 CMake: support multi-line strings for the help_features target 2023-01-19 17:10:42 +11:00
Campbell Barton
c2120b8c4f CMake: suppress missing-variable-declarations warnings with Clang
Code generated by wayland-scanner contained missing declarations.
2023-01-19 17:10:42 +11:00
Campbell Barton
9676dce317 Cleanup: CMake indentation 2023-01-19 17:10:42 +11:00
Jesse Yurkovich
163d4aa094 Fix T103707: Use beauty fill for the UV select overlap operator
The original code used `BLI_polyfill_calc` which can create degenerate
triangles during triangulation per T103913. This causes the subsequent
overlap test to produce incorrect results in certain cases. Change to
using a "beauty" fill instead.

Differential Revision: https://developer.blender.org/D17015
2023-01-18 21:25:55 -08:00
Hans Goudey
83f9218801 Cleanup: Remove unused/redundant includes from curves/pointcloud draw 2023-01-18 18:14:44 -06:00
Hans Goudey
6c4e3a9e51 Curves: Deduplicate and parallelize point to curve map creation
There is a utility method on `CurvesGeometry` to build a map of the
curve for each point. Use that in two more places and make sure its
implementation is multithreaded, which gives a slight speedup
in a simple test file.
2023-01-18 16:41:10 -06:00
Ray Molenkamp
d3aaa7d523 Fix: Build issue with VS2019
fix by @JacquesLucke I just sprinkled it to all places
it needed to be.
2023-01-18 12:41:09 -07:00
Julian Eisel
e4e91bf830 Fix crash when listing assets repeatedly in node search menus
When doing partial reloads of asset libraries (only reload assets from
the current file, e.g. after undo re-allocated ID pointers), we'd end up
with assets that don't have their asset data read correctly. It would
execute a branch that didn't set the asset library object necessary to
create and store asset representations.

Steps to reproduce were:
* Open .blend file with geometry node assets in there
* In a geometry node editor, press Shift+A to open the add menu
* Cancel
* Move a node
* Undo
* Press Shift+A again
2023-01-18 18:27:25 +01:00
Brecht Van Lommel
8707cab70b Gitea: don't reference branch in issues by default 2023-01-18 16:58:09 +01:00
Brecht Van Lommel
9ccec5715e Gitea: layout and wording tweaks to issue and pull request templates 2023-01-18 16:43:55 +01:00
Brecht Van Lommel
e8d1d1486e Fix T103960: build issue with GCC 13 in Cycles thread code 2023-01-18 16:43:47 +01:00
Clément Foucault
6f206f713e BLI: Math: Fix matrix tests failling
Regression introduced in rB17768b3df19a
2023-01-18 15:36:46 +01:00
Clément Foucault
c412d2dcfe DRW: View: Allow disabling view test by setting bound sphere radius to -1 2023-01-18 15:36:46 +01:00
Clément Foucault
534214e65c DRW: Make intersect lib not dependent on common_view_lib.glsl
This declares view intersection functions only if the view lib if
required.
2023-01-18 15:36:46 +01:00
Clément Foucault
9e5ada315f DRW: Protect common_math_lib.glsl from duplicated declaration
This avoid most issues when including this header along with some of the
newer `gpu_shader_math_*_lib.glsl`.
2023-01-18 15:36:46 +01:00
Clément Foucault
df74a9b624 DRW: Tests: Add test for PassSimple::Sub 2023-01-18 15:36:46 +01:00
Clément Foucault
e6be3f96d8 DRW: Fix DRW_VIEW_FROM_RESOURCE_ID 2023-01-18 15:36:46 +01:00
Clément Foucault
9c54f2655d DRW: Add double buffering of objects matrices, bounds, and infos
This allows easy delta calculation and access to last known position of
deleted objects.
2023-01-18 15:36:46 +01:00
Clément Foucault
efe51f0220 DRW: View: Allow for GPU side specification of view bounds
This allows an engine to perform GPU side view specification and let the
draw manager extract the culling informations (bounds).

To this end, the matrices ubo gets exposed to be able to write to it.

`compute_procedural_bounds()` need to be explicitely called before any
main pass using the culling result.
2023-01-18 15:36:46 +01:00
Clément Foucault
493e3230b4 DRW: Fix display print
Wrong uniform for viewport size.
2023-01-18 15:36:46 +01:00
Clément Foucault
21b3689fb9 DRW: GPU Wrappers: Add swap to storage buffers, empty framebuffer and fixes
Also add an assert to mip_view to avoid incorrect usage.
2023-01-18 15:36:46 +01:00
Jacques Lucke
cf50a3eabc Cleanup: remove is_same method for virtual arrays
This abstraction is rarely used. It could be replaced by some more
general "query" API in the future. For now it's easier to just compare
pointers in the Set Position node where this was used.

This is possible now, because mesh positions are stored as flat `float3`
arrays (previously, they were stored as `MVert` with some other data
interleaved).
2023-01-18 13:24:19 +01:00
Weizhen Huang
6e6ae17335 Fix reversed cosNI and cosNO in Cycles anisotropic beckmann G1 2023-01-18 13:10:45 +01:00
Brecht Van Lommel
973db6b5c1 Gitea: make bug report template more compact
And split text before and after description field to reduce long distance
between title and description.
2023-01-18 12:50:13 +01:00
Jacques Lucke
2c2178549b Curves: add OffsetIndices abstraction
This changes how we access the points that correspond to each curve in a `CurvesGeometry`.
Previously, `CurvesGeometry::points_for_curve(int curve_index) -> IndexRange`
was called for every curve in many loops. Now one has to call
`CurvesGeometry::points_by_curve() -> OffsetIndices` before the
loop and use the returned value inside the loop.

While this is a little bit more verbose in general, it has some benefits:
* Better standardization of how "offset indices" are used. The new data
  structure can be used independent of curves.
* Allows for better data oriented design. Generally, we want to retrieve
  all the arrays we need for a loop first and then do the processing.
  Accessing the old `CurvesGeometry::points_for_curve(...)` did not follow
  that design because it hid the underlying offset array.
* Makes it easier to pass the offsets to a function without having to
  pass the entire `CurvesGeometry`.
* Can improve performance in theory due to one less memory access
  because `this` does not have to be dereferenced every time.
  This likely doesn't have a noticable impact in practice.

Differential Revision: https://developer.blender.org/D17025
2023-01-18 11:52:37 +01:00
Thomas Dinges
c1d360f7fb Fix urls in LTS script.
The urls were missing /release/, leading to 404 links on the LTS download page.
2023-01-18 10:39:50 +01:00
Campbell Barton
60d9de767d Cleanup: remove redundant forward declarations for structs 2023-01-18 18:41:13 +11:00
Campbell Barton
ca3e19f4c5 Fixes for 'make check_pep8' target
- Skip files in dirs starting with '.' (`.git` was being searched).
- Update --disable list for pylint.
2023-01-18 18:27:49 +11:00
Campbell Barton
9e5e2aa775 Cleanup: rename Mesh/Curve/MetaBall loc/size/texflag
Struct members loc/size were misleading as they read as if the object
data stored object level transform channels. Rename these to match RNA
with a `texspace_*` prefix to make it clear these struct members only
apply to texture-space transform.

Also rename ME_AUTOSPACE & ME_AUTOSPACE_EVALUATED to
ME_TEXSPACE_FLAG_AUTO & ME_TEXSPACE_FLAG_AUTO_EVALUATED.
2023-01-18 17:20:10 +11:00
Campbell Barton
07af7e2266 Cleanup: remove unused MetaBalle.disp & rot 2023-01-18 17:17:31 +11:00
Campbell Barton
988bc3dddf Cleanup: keep dna_rename_defs sorted 2023-01-18 17:17:29 +11:00
Campbell Barton
1c470dbd72 Cleanup: replace BLI_findptr with BKE_collection_has_object
Also swap the order of checks in collection_object_add to perform
the comparison before calling collection_find_child_recursive.
2023-01-18 15:43:20 +11:00
Campbell Barton
b380d25053 Cleanup: define COLLECTION_FLAG_ALL_RUNTIME, use in file read/write 2023-01-18 14:18:58 +11:00
Campbell Barton
fd2bf32dc7 Cleanup: use memset instead of clearing individual runtime members 2023-01-18 14:10:29 +11:00
Campbell Barton
44dd3308a5 DNA: move Collection members into their own Runtime struct
Also add static assert that COLLECTION_COLOR_TOT has the correct number
of items in the enum.
2023-01-18 14:00:09 +11:00
Hans Goudey
9179362e7b Geometry Nodes: Prefer evaluate at index value input in search
Give the "Value" input a higher search weight than the "Index"
input, since it's more likely that users will want to connect to
that. Based on feedback from Simon Thommes.
2023-01-17 19:43:59 -06:00
Iliya Katueshenock
d45ad0acd3 Geometry Nodes: Show supported geometry types tooltip without computing
Socket declarations exist all the time and it would be useful to use
them for tooltips at all times, not just when there is a computed log.

Differential Revision: https://developer.blender.org/D16846
2023-01-17 19:43:59 -06:00
Brecht Van Lommel
bdb34c9804 Gitea: add more complete pull request template 2023-01-18 01:40:25 +01:00
Jacques Lucke
737e7a63b1 Fix: incorrect curve type counts after adding curves of same type 2023-01-18 00:05:54 +01:00
Hans Goudey
301119619c Curves: Remove attribute retrieval, deduplicate evaluation logic
Avoid calling `interpolate_to_evaluate` while evaluating normals,
which has to look up attributes by name for every curve. Also avoid
duplicating the curve type switch in a few functions. I didn't observe
a performance difference, but theoretically this could reduce
overhead for many small curves.
2023-01-17 14:58:54 -06:00
Germano Cavalcante
dcb37959d4 Fix roation snap failing with zero angle
Due to precision issues, the cosine value calculated with
`dot_v3v3(start, end)` can be outside the -1, 1 range causing `acosf`
to return `nan(ind)`.

Use `angle_signed_on_axis_v3v3_v3` instead. It returns more accurate
values, deduplicates code, and avoids these `nan` issues.
2023-01-17 17:21:39 -03:00
Clément Foucault
17768b3df1 BLI: Math: Fix perspective matrix function
The port missed this one component that should have been left to 0.0.
2023-01-17 21:02:57 +01:00
Hans Goudey
d42d4e339f Cleanup: Remove unnecessary includes in geometry set header 2023-01-17 12:50:06 -06:00
Hans Goudey
85ea74ad77 Cleanup: Remove unnecessary curves RNA verification disabling
There is no SDNA data for `position_data` anymore after
e9f82d3dc7eebadcc52fdc43.
2023-01-17 12:50:06 -06:00
Hans Goudey
df54561233 Cleanup: Fix incorrect comments in mesh extrude node 2023-01-17 12:50:06 -06:00
Hans Goudey
d76a0e98ba Fix: Avoid node reevaluations for selection and parenting
Since 90ea1b76434fe175e9, node trees have been reevaluated
after many selection operations because nodes are sorted based on
the selection status and an update tag was added for that. However,
for years the node order was allowed to be different between the
original and evaluated copy of node trees.

Though it is a bit sketchy to have that difference in the evaluated
node tree, reevaluations for just selection are very bad, so use a
"smaller" update tag and add a comment for justification.

Differential Revision: https://developer.blender.org/D17023
2023-01-17 12:50:06 -06:00
Brecht Van Lommel
665732115e Gitea: add separate issue templates for bug, design and todo 2023-01-17 19:44:21 +01:00