1
1

Compare commits

...

456 Commits

Author SHA1 Message Date
83ccca8675 cleanup 2021-04-01 14:53:30 +02:00
77c8070b11 Spreadsheet: Show data of active node (WIP).
Differential Revision: https://developer.blender.org/D10875
2021-04-01 14:52:51 +02:00
1db976521e Merge branch 'master' into spreadsheet-active-node 2021-04-01 14:39:39 +02:00
b00727950c Nodes: separate node name and display name in bNodeTreePath
Previously, `node_name` was rarely actually a name of a node. It is set
correctly as node name in `ED_node_tree_push`. However, later on it
was overwritten by the name of an id data block in `node_draw_space`.

Now, the node_name stays the name of the "parent" node. Whereas
display_name is the name that will be displayed in the breadcrumbs.

With this change, the `node_name` can be used to reconstruct the
actual path from the root node tree to the currently visible tree.

Differential Revision: https://developer.blender.org/D10874
2021-04-01 14:39:12 +02:00
f053bc2ddf fix 2021-04-01 14:31:05 +02:00
51b4162fed direct data ownership 2021-04-01 14:30:51 +02:00
1bdceb813c Cleanup: spelling 2021-04-01 22:20:53 +11:00
4a7736ce1d Merge branch 'master' into spreadsheet-active-node 2021-04-01 13:16:48 +02:00
2a5c0c3491 Geometry Nodes: add socket value logging capability
The node tree evaluator now calls a callback for every used socket with
its corresponding value(s). Right now the callback does nothing.
However, we can use it to collect attribute name hints, socket values
for debugging or data that will be displayed in the spreadsheet.

The main difficulty here was to also call the callback for sockets in
nodes that are not directly executed (such as group nodes, muted
nodes and reroutes).

No functional changes are expected.
2021-04-01 13:10:22 +02:00
26071531d0 cleanup 2021-04-01 12:52:57 +02:00
131550dac1 Merge branch 'master' into spreadsheet-active-node 2021-04-01 12:45:55 +02:00
328b39335e BLI: add call_safe method for FunctionRef
This is useful to avoid nullity checks in some places.
2021-04-01 12:38:14 +02:00
fa50edc999 BLI: return early when copying empty array 2021-04-01 12:38:14 +02:00
0ffbcc4416 Fix "unused variable" warning when compiling without nanovdb 2021-04-01 12:36:23 +02:00
496df39e6f LineArt: Remove "soft selection" option.
After some back and forth with the GP module and some artists, this
option was deemed not that useful. The use case was considered too
obscure so we'll remove it.

It is still posible to have this functionality by using the vertex
weight modiifers or manually clamping the weights.
2021-04-01 12:36:23 +02:00
e1b2cf887f LineArt: Remove resampling settings.
This can be done with an other GP modifier already.
2021-04-01 12:36:23 +02:00
d5cefc1844 Fix T50103: Transform not working if scale is zero
If any axis of the scale of an object was zero, transforming failed.
This was because `td->smtx` was set to a zero matrix.

orthogonalize_m3_zero_axes is used to fill in the zeroed axes.

Thanks to @filedescriptor for the initial fix: D10869.
2021-04-01 21:35:19 +11:00
8a144b73c0 BLI_math: add orthogonalize_m#_zero_axes
Expose a this function to initialize any zeroed axes
to an orthogonal vector based on other non-zeroed axes.

This functionality already existed for `invert_m#_m#_safe_ortho`,
expose as a public function as it's useful to be able to fill in zeroed
axes of transformation matrices since they may be used in matrix
multiplication which would create degenerate matrices.
2021-04-01 21:34:35 +11:00
3f24cfb958 Cycles: light spread importance sampling for rectangular area lights
Compute a subset of the area light that actually affects the shading point
and only samples points within that.

It's not perfect as the real subset is a circle instead of a rectangle, and
the attenuation is not accounted for. However it massively reduces noise for
shading points near the area light anyway.

Ellipse shaped area lights do not have this importance sampling, but do not
have solid angle importance sampling either.

Ref D10594
2021-04-01 12:31:01 +02:00
Matteo Falduto
a4260ac219 Cycles: add a spread setting for area lights
This simulates the effect of a honeycomb or grid placed in front of a softbox.
In practice, it works by attenuating rays coming off-angle as a function of the
provided spread angle parameter.

Setting the parameter to 180 degrees poses no restrictions to the rays, making
the light behave the same way as before this patch.

The total light power is normalized based on the spread angle, so that the
light strength remains the same.

Differential Revision: https://developer.blender.org/D10594
2021-04-01 12:31:01 +02:00
c859e1afa0 Fix: incorrect versioning code for lights properties
Due to T64791 we must still use the old Lamp name rather than Light, work
around that for now.
2021-04-01 12:31:01 +02:00
Nikita Sirgienko
b30cc7071b Fix Cycles build error with "make developer" on some CPUs
The combination of building unit tests and WITH_CYCLES_NATIVE_ONLY did not
correctly detect when AVX/AVX2 support is available.

Differential Revision: https://developer.blender.org/D8201
2021-04-01 12:31:01 +02:00
64538532d4 Fix T87056: Segfault in GPU_batch_clear() involing Lattice evaluation
Fix a segfault by setting the `batch_cache` pointer to `NULL` when copying
a Lattice. That way the copy can get its own batch cache when needed,
preventing a use-after-free.
2021-04-01 12:28:26 +02:00
7bcd0e01af cleanup 2021-04-01 12:18:49 +02:00
d6fcecc471 cleanup 2021-04-01 12:12:18 +02:00
e945564068 Merge branch 'master' into spreadsheet-active-node 2021-04-01 11:55:34 +02:00
1598d57663 cleanup 2021-04-01 11:55:07 +02:00
42a40f4e7c support showing data of group input/output nodes 2021-04-01 11:41:30 +02:00
80865399a8 cleanup 2021-04-01 11:32:58 +02:00
d904271d09 Libmv: Add clang-format for third party sources
Got ignored in the initial commit of clang-format support to the Libmv.
2021-04-01 11:32:47 +02:00
7faf5b0e02 Fix condition for ffmpeg seek workaround
This condition was in contradiction with comment for function
`ffmpeg_generic_seek_workaround()`.

I have noticed, that formats that seeked well used this workaround.
Problem was that I misunderstood code from `av_seek_frame()` - formats
with `read_seek()` function stil don't use generic seeking method.
This is defined in `seek_frame_internal()`
2021-04-01 11:30:11 +02:00
9ed2a7e680 improved handling of skipped sockets 2021-04-01 11:22:06 +02:00
546fa9a759 Fix T87037: Add tooltip for "Paste Flipped"
The "Paste Flipped" operator was missing its own tooltip.

This patch adds the tooltip by implementing the `get_description` callback for
`GRAPH_OT_paste` and `ACTION_OT_paste`.

Reviewed By: sybren

Maniphest Tasks: T87037

Differential Revision: https://developer.blender.org/D10859
2021-04-01 11:04:05 +02:00
6fe2d6b8c8 Fix freezed proxy frames
`ffmpeg_generic_seek_workaround()` applied negative offset for seqrched
packet timestamp, but proxies always start from 0 and timestamp can be
 negative.

Limit timestamp value to 0, because `av_seek_frame()` doesn't accept
negative timestamps and returns with error. This prevents seeking from
working correctly.
2021-04-01 10:45:53 +02:00
3af1903ac7 log more socket values 2021-04-01 10:38:19 +02:00
214a49aae4 refactor 2021-04-01 10:28:36 +02:00
45aa341dd4 initial callback 2021-04-01 10:18:44 +02:00
e0aab87f54 initial node group support 2021-04-01 10:07:59 +02:00
fca8d0f91f separate node from display name 2021-04-01 09:29:01 +02:00
a9fc5be5fa Fix T86331: Preferences menu inaccessible until window resize
The RGN_TYPE_EXECUTE region was zero height - with the "Load & Save"
button drawing outside of those bounds - so it didn't respond to events.

This is because the region started off this size and does not change
with simply adding the buttons. Although it has RGN_FLAG_DYNAMIC_SIZE,
delayed reinit of regions is only currently supported on headers.

This gives the execute region an initial (minimum) vertical size but
also makes the region **hidden** by default.

- Showing Prefs as an editor among others it will show the header
  but not the execute region.

- Showing the Prefs in a popup window, hides the header region
  and shows the execute region.

Ref D10636
2021-04-01 17:42:01 +11:00
ab652c2c90 Cleanup: method naming. 2021-04-01 08:16:43 +02:00
4b595de5e6 Cleanup: Split up methods. 2021-04-01 08:16:43 +02:00
d5c6485372 Cleanup: clang format 2021-04-01 11:18:26 +11:00
93972c8910 Clang Format: bump the minimum version to 8
Make use of `StatementMacros` so Python structs are formatted correctly.

The comment about STRINGIFY doesn't seem to be valid anymore,
so this has been left out.
2021-04-01 11:18:05 +11:00
a641e08227 Cleanup: Use const arguments in curve code 2021-03-31 18:07:15 -05:00
1a100d2d78 Cleanup/CMake: tweak messages in platform_apple 2021-04-01 01:13:22 +05:30
f061de9b3e Cleanup/CMake: warning to status to reduce noise
Correction in e5f0d176d4
2021-04-01 01:12:48 +05:30
910469eccf Cleanup: Remove remaining unused code for DispList "bevel_split"
This was added in rB93aeb6b318a7, last changed in rB8f0a44a5d55d,
and removed in rB51b796ff1528. I assume it was a way for curves to
have split edges at corners. As far as I can tell it only ever worked
in Blender Internal, and that has been gone for years.

Another possible route here would be restoring this functionality,
but it's generally preferrable to reduce complexity in this
area of curve code than adding it back, especially in the context
of other improvements planned related to curves in geometry nodes.

Differential Revision: https://developer.blender.org/D9966
2021-03-31 11:37:21 -05:00
46ee9b599a Fix T87094: Transforming geometry instances component is broken
Caused by an incorrect transformation order in cleanup commit
rBd037fef3bd1dc2e. The fix is to simply reverse the order.
2021-03-31 11:32:52 -05:00
94bfb1ab62 Alembic procedural: fix missing update when editing shaders 2021-03-31 17:18:32 +02:00
6f2e9e9f90 Alembic procedural: comment, speficy the behavior of a function 2021-03-31 17:18:32 +02:00
5580f64d80 Alembic procedural: cleanup, make add_object private
This should only be accessed from within the procedural.
2021-03-31 17:18:32 +02:00
b4e584949c Alembic procedural: fix out of bound access when editing object properties or shaders
The index_data_map was not cleared when clearing a cache, so this would just append
the new correct data to the end of the array instead of overwriting it, which would
cause us to then use outdated indices.
2021-03-31 17:18:32 +02:00
4fd7b1f3db Geometry Nodes: Rename "Grid" to "Density"
For other "Attribute Name" fields we usually give a more specific name
that relates to what the attribute is actually used for, like "Mask" in
the point separate node. This is a similar situation, and would also
be consistent with the naming planned in D10506.
2021-03-31 10:10:44 -05:00
482a42c0f6 Fix T87087: attributes were removed automatically even though they are still needed
The geometry nodes modifier did not specify that it needs all custom data layers.
Therefore the modifier evaluation code tagged some layers so that they will not be
copied later on by calling `mesh_set_only_copy` in `mesh_calc_modifiers`.
2021-03-31 16:25:39 +02:00
23bd6cff81 GPencil: Avoid LineArt modifier uses negative material index
In some situations the material index could be negative, and this is wrong.
2021-03-31 16:17:31 +02:00
d55d4fee30 Fix compiler error in Windows
C7555	use of designated initializers requires at least '/std:c++latest'

This is not supported by the current Windows compiler version.
2021-03-31 16:01:18 +02:00
10272ca788 GPencil: Remove flag PROP_ID_SELF_CHECK from materials
This flag was used by error when the code of RNA object was used as base, but it's not logic in materials.
2021-03-31 15:50:48 +02:00
94079ffc7f Fix T86879 Boolean exact crash with dependency loop.
When boolean's Object also has a modifier that depends back on
the target Object, a crash occurred.
In a case like this, BKE_modifier_get_evaluated_mesh_from_evaluated_object
returns NULL, so just have to protect against that case.
2021-03-31 09:35:40 -04:00
23c1e48e19 Cleanup: naming for edit-mesh nearest distance values
- Don't use `r_` prefix for an argument that's also read from
  (this is meant for return only arguments).
- Rename variables to make it clear the distance is pixels,
  using manhattan length measurement.
2021-04-01 00:01:23 +11:00
5f787b290c Cleanup: Removed Unused Definition. 2021-03-31 14:47:38 +02:00
bc837ad14e Fix: Cryptomatte Picker on Legacy Node Failing.
The new Cryptomatte workflow assumes that the picker is used in the new
workflow. The legacy node wasn't working as it would never find a
correct cryptomatte layer. This fix will use the color sampling like we
used to do.
2021-03-31 14:43:14 +02:00
1a7b94236e Compositor: Keep WorkPackages and Data Around.
WorkPackages struct was created when scheduled. This patch keeps the
WorkPackages around and stores additional data with the workpackages.

The speedup is to small to notice, but it is needed as preparation
to introduce a faster scheduling method.
2021-03-31 14:43:14 +02:00
14901e3774 Fix T87080: Select shortest path fails in face mode
Regression in 80cbbd2843.

Unfortunately keeping selection picking behavior as well as
supporting finding the nearest face within a radius requires an
inconsistency between x-ray and back-buffer selection that
doesn't work well using the current arguments.

Resolve by adding an argument that causes the input distance
to be ignored for back-buffer selection.

This is used by selection picking but not the knife tool.

This changes behavior for path-selection in face mode,
which now uses a margin for back-buffer selection.

From my own testing this doesn't seem to be a problem like it could be
for regular selection picking.
2021-03-31 23:36:51 +11:00
d97dca5106 Fix T86947: Drag & Drop tooltip in Scene mode
The tooltip while dragging a collection in Scene mode in the Outliner
was always "Link inside Collection" even if the action performed was
different. This was because the `collection_drop_init` set the
`from_collection` always to `NULL` if the Outliner display mode was
currently set to Scene.
Commit that introduced this issue:
rB0f54c3a9b75be8f8db9022fb0aeb0f8d0d4f0299

The fix removes the check of the display mode and only sets the
`from_collection` to `NULL` if the ctrl (linking) key is held.

Reviewed By: JacquesLucke

Maniphest Tasks: T86947

Differential Revision: https://developer.blender.org/D10864
2021-03-31 14:23:08 +02:00
8d45a96789 Fix T87082: Smooth thickness not working
When using the smooth operator, the thickness would not be
smoothed on the first iteration. This was becasue the inner loop
was set to run `r * 20` times but `r` starts at 0.

The fix makes sure that "Smooth Thickness" works on the first
iteration by using  a fixed value of `20` as the loop limit. This
makes sure that for every iteration, we run the smoothing of the
thickness 20 more times.

Reviewed By: antoniov

Maniphest Tasks: T87082

Differential Revision: https://developer.blender.org/D10867
2021-03-31 14:19:01 +02:00
f02e1a77c9 Makefile: add update_code target
Convenience target for updating the code, skipping SVN.

The Python script supports it, but this wasn't exposed in the makefile.

Ref D10457
2021-03-31 22:34:11 +11:00
8262c2577e cleanup 2021-03-31 12:52:45 +02:00
993e8af943 cleanup 2021-03-31 12:41:26 +02:00
4d856ecb11 Cleanup: Fix warnings
Introduced in b128ffd539
2021-03-31 12:34:44 +02:00
a535c07417 avoid some copies 2021-03-31 12:24:14 +02:00
5cbecde9c7 node in spreadsheet 2021-03-31 12:16:01 +02:00
4472178094 initial code 2021-03-31 12:03:26 +02:00
e9616c82bd Cleanup: use constexpr for num channels.
Don't assume all compilers are smart. MSVC doesn't inline the call away like CLANG and GCC did.
2021-03-31 11:00:07 +02:00
645fc0c767 Fix build error on windows
Error was caused by using `#if` directive in `PyDoc_STRVAR` macro.

This partially reverts 1e4c35d910
2021-03-31 09:46:38 +02:00
b128ffd539 Cleanup: Remove SEQ_CURRENT_BEGIN macro
Use LISTBASE_FOREACH instead.
SEQ_CURRENT_BEGIN did null checks, so now these must be explicit.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D10823
2021-03-31 09:27:31 +02:00
43369ca80e PyDoc: quiet warning with literalinclude including blank lines
Files that only contain a doc-string still included the last blank line,
since this normally contains code examples.

There are some cases where only a docstring exists
which made sphinx report warnings.
2021-03-31 17:47:31 +11:00
d5f2043ab3 PyDoc: fix indentation with multi-line property descriptions
New lines were written without indentation,
causing invalid RST to be generated.
2021-03-31 17:43:30 +11:00
1e4c35d910 PyDoc: correct sphinx syntax for gpu.state.blend_set 2021-03-31 17:42:21 +11:00
b547ac32d9 Cleanup: use early return for imbuf image loader functions
Most imbuf loaders already did this, use early exit for the remaining
loaders that didn't.
2021-03-31 17:05:57 +11:00
e7f890aa59 WM: use data-path utility functions for WM operators
Use utility functions to decompose data paths and resolve the
RNA property from a data-path.
Replaces in-line string manipulation and RNA access.

This allows more complex data paths to be used, where previously string
literals in a data path could break the simple data-path handling logic.
2021-03-31 15:29:50 +11:00
1beca76934 PyAPI: add bl_rna_utils.decompose_data_path
Utility function for splitting an RNA path, to be used by `bpy.ops.wm.*`
2021-03-31 15:03:19 +11:00
c59a7f44a1 Fix bl_rna_utils._TokenizeDataPath function argument extraction error
Converting functions with single arguments to a string
added an additional comma.
2021-03-31 15:01:44 +11:00
5678e6c2bc Cleanup: improve navigation gizmo flag use
Flag check for V3D_LOCK_CAMERA used boolean style assignment to a char,
which worked with this flag but could fail if other flags are added
that use this convention in the future.

- Add static type checks for values so any change to DNA types
  will need to be made in the navigation gizmo too.
- Move camera lock check from `rv3d` to `v3d`,
  as this isn't stored in the region data.
2021-03-31 13:04:12 +11:00
87aa514611 UI: Gizmo Button to Lock Camera to View
2D gizmo navigation button that toggles 'Lock Camera to View' while in Camera View.

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

Reviewed by Campbell Barton
2021-03-30 14:09:26 -07:00
1425411249 Cleanup/Refactor: Unify functions that redraw the depth buffer
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and
`ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`.

This new function replaces `ED_view3d_autodist_init`.

Also, since `ED_view3d_depth_update` depends on the render context, and
changing the context is a slow operation, that function also was removed,
and the depth buffer cached is now updated inside the new unified drawing
function when the "bool update_cache" parameter is true.

Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to
`runtime.flag`.

Differential revision: https://developer.blender.org/D10678
2021-03-30 16:23:58 -03:00
da1b002c8d UI: Skip undo steps when changing properties of the 3d cursor
Differential revision: https://developer.blender.org/D10695
2021-03-30 16:13:21 -03:00
54d7dea283 Fix: buttons whose property contains an 'owner_id' ignore rna undo check
Introduced in rBce462fa1 but harmless since curretly only `StructRNA`
without `owner_id` have the `STRUCT_UNDO` flag cleared.

So this commit does not bring any functional changes but it will be
useful for {D10695}.
2021-03-30 16:10:58 -03:00
67b40f829e Fix T87058: GPencil Cutter delete all strokes if they are selected and the layer is locked
The problem was produced because the strokes were selected, but the loop to clear this flag before applying cutter was using unlocked layers only, and the protected layer flag was not reset.

Now, the flag is reset for all layers, locked and unlocked.
2021-03-30 19:43:45 +02:00
Wannes Malfait
6ddd280b21 Nodes: Expose multi input socket in python API
It was not possible to determine if a socket was multi input previously
with BPY. This patch exposes the flag as a read-only property of a node
socket. This is important for addons which automatically add connections
between nodes.

Differential Revision: https://developer.blender.org/D10847
2021-03-30 10:15:23 -05:00
6ea09db7a1 Cleanup: Improve comment 2021-03-30 10:03:11 -05:00
e5f0d176d4 CMake: issue warnings when changing options
Only done in top level CMakeLists, and platform_apple.

Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D10343
2021-03-30 20:28:45 +05:30
9f323e9bf7 UI: Bring back hover shortcuts for mesh modifiers
Earlier last year, the shortcuts on hover were built as a way to regain
speed lost by removing the "Apply" and "Copy" buttons from the panel.
For the active modifier concept introduced for geometry nodes, the
shortcuts were changed to only affect the active modifier.

Based on feedback, this change slowed down many people's interaction
with the modifier stack so the UI team decided to return hover shortcuts
for modifier panels.

The downside of this change is that it looks like the active modifier is
"selected" and it could be confusing that the modifier shortcuts don't
apply to it. We can explore different ways to display the active status
to address this.

Ref T87012
2021-03-30 09:56:04 -05:00
1f58a0ea3c Cleanup: use doxy sections and rearrange editmesh_knife.c 2021-03-30 11:50:05 -03:00
b1380101df Geometry Nodes: Set default grid vertices to 3 by 3
This is a relatively arbitrary value, but a good starting point-- it's
simple while also showing the possibility of the subdivisions.

Ref T86819
2021-03-30 09:33:42 -05:00
a4b6c222fa Fix unused variable warning caused by recent cleanup
Caused by a cleanup, rBd037fef3bd1dc.
2021-03-30 09:18:33 -05:00
88b5d7f5f3 Cleanup: remove unneeded method.
size can be accessed via instance attribute.
2021-03-30 16:03:43 +02:00
094c950915 Cleanup: clang-format. 2021-03-30 16:03:43 +02:00
88e0ed3288 Cleanup: Use constexpr. 2021-03-30 16:03:43 +02:00
b48a573adb Compositor: Fix Incorrect Attaching NodeSockets.
Introduced by recent commit.
2021-03-30 16:03:43 +02:00
04a92297dd Cleanup: Replace std::vector with blender::Vector. 2021-03-30 16:03:43 +02:00
d4e76712d4 Cryptomatte: Fix When Image based Cryptomatte Aren't On The First Render Layer.
The image user wasn't updated to reflect the correct render layer.
2021-03-30 16:03:43 +02:00
e125c9329d Fix: Compile Error COM_Debug.
We should replace `ifdef COM_Debug` with a constexpr function.
2021-03-30 16:03:43 +02:00
3ead9b2b36 Cleanup: Replace virtual methods with bitflags. 2021-03-30 16:03:43 +02:00
5a6d5d20de UI: add description methods for wm.context_* operators
Generic context operators now look-up the RNA properties to extract
their description (when it's available).

Add `bl_rna_utils.data_path.property_definition_from_data_path()`
to handle the details of accessing the RNA property definition.
2021-03-31 01:02:08 +11:00
88d94d89fa Fix T87007: Cycles Background not updated if strength is initially null
When the strength is initially set to zero, the shader graph is
optimized out to remove any node which will not be executed because of
this, which removes pretty much every single node, except for the
output. As the graph is empty, the world shader is made invisible to
rays so it is not evaluated in the kernel.

However, when the strength is then modified, the Background is not
updated as the modification happens on the Shader Node and not on the
Background Node, so it is never tagged as modified.

To fix this, we need to tag the Background as modified when its shader
is also modified so the Kernel data is properly updated.

Regression caused by rBbbe6d44928235cd4a5cfbeaf1a1de78ed861bb92.
2021-03-30 15:41:33 +02:00
f1fe42d912 Cycles: Do not allocate tile buffers on all devices when peer memory is active and denoising is not
Separate tile buffers on all devices only need to exist when denoising is active (so any overlap
being rendered simultaneously does not write to the same memory region).
When denoising is not active they can be distributed like all other memory when peer
memory support is available.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D10858
2021-03-30 14:04:56 +02:00
7fd3b07da1 Build Environment: set MAKE_THREADS as per the CPU
It is a better default.

Reviewed By: sebbas, sybren
Differential Revision: https://developer.blender.org/D10652
2021-03-30 16:42:19 +05:30
681a7d724b PyAPI: replace repr with our own escape function in animsys_refactor
Use the same string escaping logic shared by RNA path resolving code.
2021-03-30 21:57:23 +11:00
5da5a1cc2d Geometry Nodes: support multiple group input nodes
Previously this was only supported within nested node groups.
Now it is also supported for the root node group that is referenced
by the modifier.
2021-03-30 12:34:16 +02:00
05fa5ca337 Cleanup: Typo in comment. 2021-03-30 12:15:19 +02:00
Scott Wilson
74d5a93b2b Armature: Add Display Axis Offset
Display the bone axes at the head (root) of the bone by default, instead
of the tail (tip), and add a slider so that it's possible to adjust this
position.

Versioning code is in place to ensure existing files behave the same
(axes shown at tail), whereas new Armatures will be using the new
default (axes shown at head).

Reviewed By: #animation_rigging, #user_interface, Severin, Sybren

Differential Revision: https://developer.blender.org/D7685
2021-03-30 11:40:26 +02:00
0d65d27386 Python: clarify error message when accessing datablock by library
When using `bpy.data.actions[action_name, "nonexistant-library"]`,
use the term `filepath` instead of `name` in the error message.

Also increase the size to match the file path length.

Ref D10253
2021-03-30 19:31:50 +11:00
Henrik Dick
39bead4d51 Fix simple solidify wrong custom data on large ngons
Fixes an unreported issue that vertex data on large ngons (>255)
is messed up due to type conversion to char and back to int.

Ref D10734
2021-03-30 19:13:36 +11:00
fd10c21f51 Cleanup: animation, remove BONE_UNKEYED flag
Remove the `BONE_UNKEYED` flag. It was only written (set/cleared) but
never actually read.

Also remove `framechange_poses_clear_unkeyed()` as its only function was
to clear the `BONE_UNKEYED` flag. It wasn't used anywhere either.

The only code that used the flag was the `extract_pose_from_action()`,
which was removed in 2869ce6cfa (2009).

No functional changes.
2021-03-30 09:46:26 +02:00
563d513e37 Cleanup: clang-tidy warning. 2021-03-30 08:08:43 +02:00
89e46f578f Cleanup: clang-tidy warning. 2021-03-30 08:08:15 +02:00
52d09dad9c Knife: snap refactor, prepare for snap gizmo
Minor changes preparing for snap gizmo inclusion.

- Extract `knife_snap_edge_in_angle` into a utility function.
- Check the snap vertex on closest edge instead of the face.
- Add MODE_INVOKING state.
- Remove unnecessary NULL checks.
- Control 'ignore_edge_snapping' while dragging instead of checking
  dragging in `knife_snap_update_from_mval`.

Ref D8220
2021-03-30 16:19:33 +11:00
73b5afd352 Cleanup: Fix incorrect socket list name 2021-03-29 22:41:34 -05:00
d037fef3bd Cleanup: Use float4x4 type and constructor 2021-03-29 22:15:07 -05:00
f9eaf93d37 MSVC: ASAN support for VS 16.9
This enables ASAN support when used with VS 16.9
enable as usual in cmake with the WITH_COMPILER_ASAN
option, or when using make.bat just tag on `asan'
to the invocation, ie: `make lite 2019 asan`

MSVC: Asan support for 16.9

This enables ASAN support when used with VS 16.9
enable as usual in cmake with the WITH_COMPILER_ASAN
option, or when using make.bat just tag on `asan'
to the invocation, ie: `make lite 2019 asan`

Differential Revision: https://developer.blender.org/D7794
Reviewed By: brecht, sergey
2021-03-29 19:11:17 -06:00
6c33d3d01b Fix T86944: Incorrect seeking in some movies
`av_seek_frame()` failed to seek to nearest I-frame. This seems to be
a bug or not implemented feature in FFmpeg. Looks like same issue as
ticket https://trac.ffmpeg.org/ticket/1607 on ffmpeg tracker.

If seeking is done using format specific function (`read_seek2`)
field of `AVInputFormat` is set, `see av_seek_frame()`, use
`av_seek_frame()` function. Otherwise use wrapper that actively searches
for I-frame packet.

Searching is flexible and tries to do minimum amount of work. Currently
it is limited to equivalent of 25 frames, which may not be enough for
some files, but there may be files with no I-frames at all, so it is
best to keep this limit as low as possible. Previously this problem was
masked by preseek, which was hard-coded to 25 frames. This was removed
in rB88604b79b7d1.

If this approach would be unnecessary for some formats, in worst case
file would be seeked 2 times which is very fast, so there will be no
visible impact on performance.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10845
2021-03-30 02:58:53 +02:00
ffbe803505 VSE: Add fit method to RNA API
Add fit_method argument to new movie and image RNA API functions.
This argument is optional.

ref T86925

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10816
2021-03-30 02:58:53 +02:00
6c6f3baaa8 VSE: Fix image adding inconsistency
When adding images with operator, image file path is split into filename
and directory passed to load function in name and path fields of
SeqLoadData struct. This is because when loading images directory
and filenames are split.

RNA API function passes whole path in path filed.

Apart from loading API inconsistency, this causes initial image loading
to fail, so strip resolution is not set. Also name field of SeqLoadData
should be reserved for strip name.

Let operator code concatenate and split filepath when needed so loading
API can be consistent with RNA API and also between strip types.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10818
2021-03-30 02:58:53 +02:00
7d467915a4 Cleanup: Decrease variable scope 2021-03-29 18:48:34 -05:00
91c44fe885 Cycles: disable NanoVDB for AMD OpenCL
It is causing issue with AMD OpenCL drivers, due to a potential driver bug.

Ref T84461
2021-03-30 00:00:17 +02:00
661e6e0966 Gizmo: Use a utility function to read snap gizmo values
No functional changes.

This makes the `ED_gizmotypes_snap_3d_update` function more specialized.
2021-03-29 14:32:48 -03:00
Germano Cavalcante
d0dd85a820 Snap Gizmo: Minor optimization when updating gizmo properties
As the Snap Gizmo properties are used as return of snapping values and
therefore updated with each change, use callbacks to get these values
through RNA properties.

Differential Revision: https://developer.blender.org/D8525
2021-03-29 14:07:51 -03:00
a702ca3faa Tests/bpy: Add installation verification test
Makes it slightly easier to test whether the installed module works
or not. Depends on D10656

Ref T86579
Reviewed By: mont29, campbellbarton
Differential Revision: https://developer.blender.org/D10665
2021-03-29 22:26:54 +05:30
fbe2c3f422 Tests: disable python tests for blender as python module
Avoid CTest errors and exit codes due to test failures which depend
on Blender executable.

Ref T86579
Reviewed By: mont29, campbellbarton
Differential Revision: https://developer.blender.org/D10656
2021-03-29 22:25:52 +05:30
241f05d53c macOS/bpy: accommodate portable builds, and multi-config generators.
Old code's `install` step did not guarantee that all script files
will be copied from source folder to build folder _before_ copying from
build folder to site-packages. That caused incomplete installation.
Fixed by copying scripts etc., only once. Also match the behavior on
Linux: install to site-packages only if `WITH_INSTALL_PORTABLE` is OFF.

Also fix install and launch issues with Xcode.
2021-03-29 22:25:13 +05:30
77ac67dae4 Cleanup/CMake: remove trailing /; whitespace. 2021-03-29 22:24:33 +05:30
2db2b7de55 Cleanup: Replace is...Operation() methods with a flag. 2021-03-29 17:10:01 +02:00
fe60062a99 Cleanup: Use Bitflags For Booleans. 2021-03-29 17:10:01 +02:00
ca516e78c4 Fix T87013: GPencil SVG export wrong svg xml header settings
The attribute was missing.
2021-03-29 17:02:25 +02:00
f99e703df3 Fix T86975: GPencil interpolate wrong stroke order
When interpolate, the stroke order was not correct because it was assumed the GHash iter would return the items in the same order of insertion, but this is false.

Now, a list is used to keep the order of the strokes and the Hash is used to get the relationship between strokes as before.
2021-03-29 17:02:25 +02:00
81fae56cb9 Fix T86298: crash when loading "corrupted" geometry node tree
The file was not really corrupted (as in, Blender did everything
correctly while saving). I only did not consider the case when
a .blend file is resaved in an older version before.
2021-03-29 16:57:03 +02:00
bc872e0c8e Fix: Line Art panel in properties showing in the wrong order with add-ons
It should set bl_order to show below panels registered by render engine add-ons
like Cycles.
2021-03-29 16:40:31 +02:00
2e7e13442c Fix T76872: Mask created after existing keyframe gets broken handles
The issue was caused by handles not being written to the new mask
spline shape: it was always written as (0, 0), which was making the
handle calculation go wrong later on.

Solved by allocating a temporary array of bezier points and calculating
handles for them. While this is an extra array allocation it is only
done for a small amount of points and it is not in the critical code
path. Having this as an extra array helps to overcome a limitation of
the current mask shape API.

Additionally, disable the interpolation for the shape change:
the spline is brand new, there is nothing to be interpolated there.
2021-03-29 16:19:22 +02:00
51f8dbe081 Mask: Fix possible nan values in the weight interpolation
Noticed while looking into animation data being created as per
steps to reproduce bug in T76872.
2021-03-29 16:19:22 +02:00
10e05bb413 GPencil Cleanup: Remove legacy key to cancel drawing
The 'E' key was set to cancel drawing. This was a change in the
old grease pencil system and is no longer used.
2021-03-29 15:56:25 +02:00
fa8269cc4e Animation: add PBONE_SELECTED macro
Add `PBONE_SELECTED` macro to determine selection state of bones, while
also taking visibility into account.
2021-03-29 15:01:45 +02:00
4d3a2ba6a9 Cleanup: clang-format. 2021-03-29 15:01:09 +02:00
8f38534300 Tracking: Avoid integer overflow in dopesheet update
Straightforward check to discard cases when dopesheet is being updated
for a movie clip which has no markers at all.

Possible bugfix for T86847.
2021-03-29 14:43:58 +02:00
e0ce76f1c5 Fix T86983: bl_description = None crash on RNA class registration 2021-03-29 22:05:05 +11:00
Jeroen Bakker
1ea5157051 Fix: Cryptomatte Metadata Trimmed to 1024.
When reading metadata from image files the metadata is trimmed to 1024.
For cryptomatte the metadata can contain json data and should not be
trimmed. Resulting additional checks in the manifest parser for
incomplete json data.

You could argue to add an exception for cryptomatte, but that would
still allows misuse. When the direction of this patch is accepted we
should consider removing `maxlen` from `IDP_AssignString` as it
doesn't seem to be used anywhere else.

Reviewed By: #images_movies, mont29, sergey

Differential Revision: https://developer.blender.org/D10825
2021-03-29 12:16:39 +02:00
35cf34de6d Fix T86851: PulseAudio randomly asserts in background rendering
Upstream fix from Audaspace with simplified PulseAudio code.

Maniphest Tasks: T86851

Differential Revision: https://developer.blender.org/D10840
2021-03-29 12:16:01 +02:00
Élie Michel
ae9d61e7fe Python API: add template for image processing
Since a few releases it is possible to process Blenders images much
more effficiently than before thanks to the `foreach_get`/`foreach_set`
methods. This new template shows how those methods can be used together
with numpy.

Differential Revision: https://developer.blender.org/D9400
2021-03-29 12:08:41 +02:00
075a19049f Cleanup: Updated Documentation Library Overrides. 2021-03-29 12:04:29 +02:00
ac6d8241fb Fix: Override Test Cases Failing With Asserts. 2021-03-29 11:51:34 +02:00
Sergey Sharybin
19f1c52269 Cleanup: Remove no-op id recalc statement
Initially this is a typo when solving merge conflict back in 2017
in commit rBf4140f2c8138.

The code was so for 3 years, so it is safer to assume that this is
the new expected design. The affected codepath only comes from the
BKE_object_modifier_update_subframe() which is discouraged from use
and have other issues.

Eventually those offending codepaths will be removed completely.

The grade-schema for now is more localized: remove ID_RECALC_ALL
which seems to be misused and is causing issues like the ones which
are described and discussed in T81340.

On user level there should be no measurable changes. In fact, no
functional changes at all are expected to happen.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D9220
2021-03-29 11:37:30 +02:00
f56fddbf9a Clang Tidy: disable WarningsAsErrors
This makes regular development more pleasant, because one does not have
to fix unrelated clang tidy mistakes when one is in the middle of something.
Before this change, I would usually turn clang-tidy off entirely, but then
forget to turn it on again.

This change has been agreed on by Sergey as well.
2021-03-29 11:04:34 +02:00
3681a619de Fix T78650: Lattice evaluation writes to shared data
Fix the data management bug where evaluation of lattice objects would
write back to the CoW copy of the Lattice ID, even when that copy was
shared between objects.

Each lattice object evaluation now stores its own evaluated data copy
via `BKE_object_eval_assign_data()`.

Reviewed By: sergey

Maniphest Tasks: T78650

Differential Revision: https://developer.blender.org/D10790
2021-03-29 11:00:32 +02:00
8034b276ba Fix T86876: cannot modify float properties of geometry nodes modifier from Python
Previously, the code expected the id property to have the `IDP_FLOAT` type.
However, when assigning a Python float (which is a double internally)
to an id property, it would change the type to `IDP_DOUBLE`.
The fix is to allow both types in the geometry nodes modifier.
2021-03-29 10:54:04 +02:00
fa1569a072 Fix T86966: crash when rendering with geometry nodes
UI hints should only be modified when the depsgraph is active.
Otherwise two threads evaluating the same object in different depsgraphs
can conflict with each other.
2021-03-29 10:14:54 +02:00
4e34baddb9 Overrides: Make Experimental API Fail On Usage.
It used to give a warning so test cases couldn't fail. This has been
changed in the test case so we could use an error here.
2021-03-29 09:57:06 +02:00
87f9405c9a Overrides: API to create an override template.
This is functionality that isn't accessible via the user interface. The
API allows the creation and modification of an override template that
holds rules that needs to be checked when overriding the asset.

The API is setup that it cannot be changed after creation. Later on when
the system is more mature we will allow changing overrides operations.

NOTE: This is an experimental feature and should not be used in productions.

Reviewed By: mont29, sebbas

Differential Revision: https://developer.blender.org/D10792
2021-03-29 09:54:34 +02:00
27fa2507a1 Fix T86972: transform node transforms shape keys 2021-03-29 09:35:19 +02:00
240f15c1b6 Comments: improve docstring for ED_view3d_clipping_test
The meaning of the return value wasn't obvious.
2021-03-29 18:30:45 +11:00
b9734f7716 Cleanup: Remove unused node.c.
Was wrongly added back with the anti aliasing node patch.
2021-03-29 09:25:08 +02:00
80cbbd2843 Knife: support vert/edge snapping when not directly over a face
Respect the distance argument to EDBM_face_find_nearest,
when zero, sample a single pixel, otherwise sample a region.

Knife uses the selection-buffer to pick a face when the ray-cast failed.
This was meant to allow snapping to nearby faces however as the margin
was ignored, it was only used in edge cases where the ray-cast missed
but the pixel didn't.

Now the face-picking threshold is working as expected.

Note that other callers to EDBM_face_find_nearest have been updated
so set their distance argument to zero so this only impacts the knife.
Regular selection and path select could be modified separately if users
prefer this behavior.
2021-03-29 18:08:57 +11:00
3659340571 Cleanup: logical error in path select picking
Resolve logical error in edbm_shortest_path_pick_invoke
where any discrepancy between EDBM_unified_findnearest and
edbm_elem_find_nearest caused the active-object to be cleared.

While it's not a problem at the moment, using a larger threshold
for path picking exposes the error.
2021-03-29 18:08:57 +11:00
8994f09a4a Knife: scale points & snapping threshold by the DPI factor
The points were too small on hi-dpi displays.
2021-03-29 18:08:57 +11:00
fc889615f7 Fix vert/edge knife snapping when the cursor wasn't over a face
In this case, the cage location was left zeroed which was then
projected back onto the screen to find the nearest screen space
edge/vertex.

This made snapping to the vertex/edge fail in some corner-cases
where it was intended to work.
2021-03-29 18:08:57 +11:00
ab26be8ff7 Cleanup: use pragma once. 2021-03-29 08:20:21 +02:00
25c02ea703 Cleanup: Add namespace to compositor. 2021-03-29 08:18:33 +02:00
9975af5ffa Cleanup: Add override Keyword. 2021-03-29 08:04:58 +02:00
Habib Gahbiche
805d947810 Compositor: Add Anti-Aliasing node
This is an implementation of Enhanced Subpixel Morphological Antialiasing (SMAA)

The algorithm was proposed by:
  Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez

This node provides only SMAA 1x mode, so the operation will be done with no spatial
multisampling nor temporal supersampling. See Patch for comparisons.

The existing AA operation seems to be used only for binary images by some other nodes.
Using SMAA for binary images needs no important parameter such as "threshold", so we
perhaps can switch the operation to SMAA, though that changes existing behavior.

Notes:
1. The program code assumes the screen coordinates are DirectX style that the
   vertical direction is upside-down, so "top" and "bottom" actually represent bottom
   and top, respectively.

Thanks for Habib Gahbiche (zazizizou) to polish and finalize this patch.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D2411
2021-03-29 07:56:58 +02:00
6af4163a3f Knife: reduce redundant face picking queries
Reduce the maximum number of queries to find the face under the
mouse cursor from 6x to 2x on cursor motion.

Calculating the screen-space detail could perform 2x look-ups
which have already been calculated.
2021-03-29 14:31:05 +11:00
27a7b2e27a Fix T83391: Knife sometimes snaps to object center
Knife snapping logic assumed having a face under the cursor meant
the projected positions were set.

This is not always the case as failure to ray-cast uses the back-buffer
as a fallback.
2021-03-29 13:29:14 +11:00
e47f5cf197 Cleanup: deduplicate attribute creating code 2021-03-28 12:50:14 +02:00
9289c358fb Cleanup: use parentheses in macro 2021-03-28 12:50:14 +02:00
afcfc6eb08 Fix T86060: Texture Paint clone tool misleading texture UI
For projection painting tools besides the `DRAW` tool:

- Don't show the texture from viewport stencil drawing.
- Don't show the texture panel.

Based on D10564 by @lichtwerk with own changes.
2021-03-28 19:45:56 +11:00
3944560b4a Cleanup: re-order expensive checks for indirect ID use
Check for indirect ID use after other simple user count checks are made.

Also assert ED_object_base_free_and_unlink_no_indirect_check object
argument isn't indirectly used.
2021-03-28 18:48:57 +11:00
0a6bca1f75 Cleanup: revert part of da160dc32d
The grease-pencil parent check was enabled when deleting objects,
when previously it was only done when unlinking.

While harmless, the previous logic is correct.
2021-03-28 18:48:57 +11:00
46d980228b Fix T86992: Tagged ID deletion conflicts with freeing objects
Check LIB_TAG_COPIED_ON_WRITE instead of LIB_TAG_NO_MAIN,
matching the behavior of rigid-body shared data.
2021-03-28 18:16:07 +11:00
5b1980859a Workaround T86992: Tagged ID deletion conflicts with freeing objects
da160dc32d exposed a bug in
`BKE_id_multi_tagged_delete` causing a memory leak in soft-body that
made `physics_softbody` test fail.

Use a loop to remove ID's to keep tests working until T86992 is fixed.
2021-03-28 17:32:37 +11:00
a9e7d503dd Cleanup: Apply clang format 2021-03-27 15:01:41 +01:00
Marcelo Demian Gómez
e7c4c9e538 Fix T86967 : Artifacts when tracing image to Grease Pencil
Tracing images to grease pencil objects creates sometimes artifacts, as seen, for example, when tracing the attached image.  {F9910821}
I have found the same behavior both in the 2.92 release and in the current 2.93 master.
The artifacts are caused by a variable that's not initialized or updated when finding a point tagged as POTRACE_CORNER.
This patch solves this issue.

Maniphest Tasks: T86967

Differential Revision: https://developer.blender.org/D10832
2021-03-27 15:01:36 +01:00
dc873c4a7b Fix T86975: GPencil interpolate sequence error when strokes are not selected
If the selection order is not used, need to put the strokes in inverse order because the Hash Iter returns the strokes in inverse order.
2021-03-27 12:51:18 +01:00
c4ab1891cc Automated testing: selection operators test cases
added 22 more test cases for following operators:
    - edges select sharp
    - loop multi select
    - select all
    - select faces by sides
    - select interior faces
    - select less
    - select linked

{F9853218}

Reviewed By: calra, mont29

Differential Revision: https://developer.blender.org/D10400
2021-03-27 09:48:54 +01:00
Pratik Borhade
99dabc156a Cleanup: spelling and comments
- comment added in struct `KnifeTool_OpData`
- struct pointer name `lst` updated to `list` ( Guess its more readable )
- `KNF_MODEL_IGNORE_SNAP_ON` updated to `KNF_MODAL_IGNORE_SNAP_ON`
- `KNF_MODEL_IGNORE_SNAP_OFF` updated to `KNF_MODAL_IGNORE_SNAP_OFF`

Ref D10824
2021-03-27 16:21:37 +11:00
Siddhartha Jejurkar
9f3d41d4ee Fix T86924: UV Sync selection breaks individual origin calculation
Use uvedit_uv_select_test which accounts for UV Sync selection.

Ref D10830
2021-03-27 15:58:31 +11:00
a6ec2de96a Correct header rename error 10cfa75e1d 2021-03-27 15:48:59 +11:00
Fabrício Luis
8e6e8dd871 UV Editor: Add cursor center operator
This matches cursor center operator from the 3D view.

Reviewed By: campbellbarton

Resolves T70142

Ref D8271
2021-03-27 15:07:26 +11:00
414017ac86 Cleanup: clang-format 2021-03-27 14:49:59 +11:00
ee367084a7 Comment: note that structs are zeroed instead of using defaults 2021-03-27 14:48:26 +11:00
10cfa75e1d Cleanup: use .hh extension for C++ headers
Follow documented convention for file naming.
2021-03-27 14:05:30 +11:00
da160dc32d Object: faster object deletion
The `object_delete_exec` lead to `BKE_library_ID_is_indirectly_used`
being called twice. With this patch deleting is around 20% faster.

Example when deleting 10000 objects:
Current: 35.6s
This patch: 18.8s (updated, last rev 29.7s)

Reviewed By: campbellbarton

Ref D9857
2021-03-27 13:38:44 +11:00
Vincent Blankfield
9b87d3f029 Win32: Allow return from fullscreen to maximized
If window is maximized when toggling fullscreen, go back to maximized when done.

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

Reviewed by Harley Acheson
2021-03-26 14:30:57 -07:00
0ec82477af macOS/bpy: install into site-packages
Reviewed By: #platform_macos, brecht
Maniphest Tasks: T86579
Differential Revision: https://developer.blender.org/D10664
2021-03-27 01:14:45 +05:30
ad31b13f91 macOS/bpy: add support for OpenMP
Changes made:
* Add OpenMP linker flags.
* Copy the libomp.dylib to `2.93/lib/libomp.dylib`.
* Change the `LC_LOAD_DYLIB` item such that
  the lib is found at `bpy.so/../../Resources/2.93/lib/libomp.dylib`.
Installation is done by D10664.

Reviewed By: #platform_macos, brecht
Maniphest Tasks: T86579
Differential Revision: https://developer.blender.org/D10657
2021-03-27 01:08:51 +05:30
35d5cc8982 Cleanup: Use enum for "in" vs. "out" node sockets 2021-03-26 14:25:52 -04:00
Vincent Blankfield
12193035ed Fix T86859: Allow covering of Taskbar when Fullscreen from Maximized
When the window is already maximized allow covering Windows Taskbar when toggling fullscreen.

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

Reviewed by Harley Acheson
2021-03-26 10:19:50 -07:00
8408a8fda2 LibOverride: Fix outliner menu showing 'override editing' entries for linked overrides.
One can only resync, reset, delete etc. locl overrides, linked ones are
basically regular linked IDs and fully not editable.

Reported by Demeter from the Studio, thanks.
2021-03-26 18:15:20 +01:00
80530edcae Geometry Nodes: Rename "Plane" primitive to "Grid"
Although "Grid" may not be techincally correct since a grid could be 3D,
it was decided to rename the "Plane" primtive to "Grid". The primitive
node allows subdivisions, so the name is more consistent with the
operator in the 3D view.

Ref T86819

This commit includes a file subversion bump for the versioning.
2021-03-26 13:09:35 -04:00
Yevgeny Makarov
e684c170f9 UI: Change Usages of 'WPaint' to 'Weight Paint'
Changing to a more informative 'Weight Paint' rather than 'WPaint'.

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

Reviewed by Julian Eisel
2021-03-26 09:58:07 -07:00
Charlie Jolly
70061c69b7 Geometry Nodes: Implicit conversion change for float/int/color to bool
Change `float to boolean` and `int32 to boolean` to return false for zero and negative values.

This aligns with how artists would expect these values to work. This is in contrast to what a coder would expect. It was determined on blender.chat that this was a better default. This means that a negative float value would give a boolean false.

Change `Color4f to boolean` to return false for zero and negative grayscale values.

Likewise, for color to boolean, to account for negative value colors, the grayscale value would be used for determining if a colour was false or not.

See {T86454}

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D10685
2021-03-26 16:29:48 +00:00
1e855149b2 Nodes: match Multi-input socket activation distance
Activation distance for multi input sockets had different length
dependend of dpi factor. That caused jumping when activation distance
became shorter than snapping distance.

Fixed by removing activation distance and using same function
which is used to evaluate snapping.

Reviewer: Dalai Felinto

Differential Revision: https://developer.blender.org/D10809
2021-03-26 17:29:10 +01:00
f560bc90c7 OSL: add basic OSL shader template
Add a basic OSL shader that shows how inputs
and outputs work and do some simple math with
them.

This template is a happy medium between the
templates we already ship, empty_shader is a
little too bare, and the other templates are
a little "too much" and you end up having to
delete a whole bunch of stuff.

a great starting point for some experimentation!

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

reviewed by: brecht
2021-03-26 10:27:31 -06:00
689d6032ff Compositor: Fix array out of bounds. 2021-03-26 17:23:14 +01:00
William Reynish
dcd90bf188 UI: Remove "Enable physics for:" text in physics properties
The "Enable physics for:" text makes no semantic sense- i.e.
"Enable physics for Fluid". Additionally, the leading text is just not
necessary, this section is just as clear without it.

Differential Revision: https://developer.blender.org/D10537
2021-03-26 12:21:03 -04:00
Leon Leno
97e212f52e Geometry Nodes: Add remaining operations to the Vector Math node
This patch adds support for the remaining operations of the Vector Math
node within Geometry Nodes.  While the operations are already available
in the UI, they hadn't been implemented, yet. With this patch the node
uses the implementation that was added for the Attribute Vector Math
node - similar to how it's handled with the Math node and Attribute
Math node.

Differential Revision: https://developer.blender.org/D10650
2021-03-26 12:15:33 -04:00
Yevgeny Makarov
63a6268e83 UI: Use unified format for "Warning" in descriptions
Warnings in tooltips were using inconsistent formatting, some in
parantheses, some not, some in caps, others not, some on new lines,
some not, etc.

This patch uses a consistent new line and no capitals for these cases.

Differential Revision: https://developer.blender.org/D9904
2021-03-26 12:07:50 -04:00
3d25669486 Cleanup: Geometry Nodes: Allow using "Auto" domain to avoid adapting
Now that we have `ATTR_DOMAIN_AUTO`, it makes sense to use it to skip
automatic domain interpolation. This can make code that depends on the
non-interpolated domain of the attribute a bit simpler.
2021-03-26 11:38:46 -04:00
Habib Gahbiche
252c87b9e8 Compositor automated testing
Added support for compositor tests. Compositor tests can be added, executed and viewed in a similar way to cycles
and other render engines tests.

Running test:
`ctest -R compositor`

Updating test:
`BLENDER_TEST_UPDATE=1 ctest -R compositor`

Viewing test results:
typically saved under `build_folder/tests/compositor/report.html`

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6334
2021-03-26 16:15:02 +01:00
39ecf90185 LibOverride optimization; Do not compare bound box of objects.
This is runtime only data, no need to deal with it.
2021-03-26 16:13:16 +01:00
921d0851b5 Fix T86942: GPencil does not export SVG or PDF in orthographic camera
The calculation of the 2D point was wrong when using orthographic mode.

Also small cleanup in float3 variable.

Differential Revision: https://developer.blender.org/D10828
2021-03-26 16:07:02 +01:00
2371454b2d Cleanup: Replace Methode Overloading With Default Value. 2021-03-26 16:02:59 +01:00
6524ceb8cf Cleanup: Remove ptr For Owned Children. 2021-03-26 15:51:06 +01:00
930b8a3932 Cleanup: Replace std::vector With blender::Vector. 2021-03-26 15:51:06 +01:00
9d80b3a69c Cleanup: Replaced Typedef Enum With Enum Class. 2021-03-26 15:51:06 +01:00
f725f42af5 Cleanup: Remove SocketReader.
SocketReader was added as an easier to understand interface on top of
the NodeOperation. It was implemented as a base class of the
NodeOperation and adds an additional hierarchy level.

Ths change replaces the abstract class with a typedef. In the end we
want to remove the typedef but will wait for some new nodes before doing
so.
2021-03-26 15:51:06 +01:00
e5fb7eac85 Cleanup: Use Enum Class For PixelSampler. 2021-03-26 15:51:06 +01:00
23b1872d6e Cleanup: Replace std::vector with blender::Vector. 2021-03-26 15:51:06 +01:00
acc6e5c315 LineArt: Fix unreported material user count error when apply modifier
The number of users was 0 after applying the modifier.
2021-03-26 15:48:54 +01:00
4bb70e0ba5 Geometry-Nodes: Sort the Nodes Categories alphabetically
The exception is still Group and Layout to be consistent with the
other node editors. This could use a separator though.
2021-03-26 14:44:15 +01:00
1614795ae2 FFmpeg: improve threading settings
Generalize threading settings in proxy building and use them for encoding
and decoding in general. Check codec capabilities, prefer FF_THREAD_FRAME
threading over FF_THREAD_SLICE and automatic thread count over setting it
explicitly.

ffmpeg-codecs man page suggests that threads option is global and used by
codecs, that supports this option. Form some tests I have done, it seems that

`av_dict_set_int(&codec_opts, "threads", BLI_system_thread_count(), 0)`

has same effect as

```
pCodecCtx->thread_count = BLI_system_thread_count();
pCodecCtx->thread_type = FF_THREAD_FRAME;
```

Looking at `ff_frame_thread_encoder_init()` code, these cases are not
equivalent. It is probably safer to leave threading setup on libavcodec than
setting up each codec threading individually.

From what I have read all over the internet, frame multithreading should be
faster than slice multithreading. Slice multithreading is mainly used for low
latency streaming.

When running Blender with --debug-ffmpeg it complains about
`pCodecCtx->thread_count = BLI_system_thread_count()` that using thread count
above 16 is not recommended. Using too many threads can negatively affect image
quality, but I am not sure if this is the case for decoding as well - see
https://streaminglearningcenter.com/blogs/ffmpeg-command-threads-how-it-affects-quality-and-performance.html
This is fine for proxies but may be undesirable for final renders.

Number of threads is limited by image size, because of size of motion vectors,
so if it is possible let libavcodec determine optimal thread count.

Performance difference:
Proxy building: None
Playback speed: 2x better on 1920x1080 sample h264 file
Scrubbing: Hard to quantify, but it's much more responsive
Rendering speed: None on 1920x1080 sample h264 file, there is improvement with codecs that do support FF_THREAD_FRAME for encoding like MPNG

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10791
2021-03-26 12:43:46 +01:00
847002e1f8 FFMPEG: refactor seeking
Split seeking section of `ffmpeg_fetchibuf()` function into multiple
smaller functions.

Conditional statements are moved to own funtions with human readable
names, so code flow is more clear.

To remove one branch of seeking, first frame is now decoded by
scanning, which will do only one iteration. So nothing has technically
changed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10638
2021-03-26 12:43:46 +01:00
Charlie Jolly
43455f3857 Geometry Nodes: Add Attribute Clamp Node
This adds a Clamp node for Geometry Nodes Attributes.

Supports both Min-Max and Range clamp modes.

Float, Vector, Color and Int data types supported.

Reviewed By: HooglyBoogly, simonthommes

Differential Revision: https://developer.blender.org/D10526
2021-03-26 10:52:50 +00:00
e867f40611 Cleanup: Replaced unneeded branch with assert. 2021-03-26 11:27:28 +01:00
fb6c29f59c Cleanup: redundant expression 2021-03-26 10:50:34 +01:00
ea12df51b8 Fix T86939: Cycles objects bounds not updated when transforming objects
As a rather premature optimization from rBbbe6d4492823, Object bounds
were only computed when either the Object or its Geometry were modified.
Prior to rB42198e9eb03b, this would work, as the Geometry was tagged as
modified if the Object's transform was also modified.

Since this tagging is not done anymore due to side effects, and since at
the time bounds are computed Objects were already processed and tag as
unmodified, the check on the modified status was always false.

For now remove this check, so the bounds are always unconditionally
updated. If this ever becomes a performance problem in large scenes with
motion blur, we will then try to find a way to nicely optimize it.

This would only affect BHV2 as OptiX and Embree handle object bounds
themselves.
2021-03-26 10:50:34 +01:00
d982ea9a9e Fix error when an addon has no __init__.py
When an addon has been removed, but its `.pyc` files are still there,
the Python module can still be loaded. However, because `__init__.py` is
missing, it becomes a namespace instead of a module, and its `__file__`
will be set to `None`. As a result, it's impossible to get the mtime
from the file (because there is none).

This should not influence any regularly uninstalled add-on, as that
would just remove the add-on's directory; I ran into the problem when
switching Git branches caused an add-on's Python files to disappear
while keeping the `__pycache__` directory around.
2021-03-26 10:46:26 +01:00
fda50625cd Cryptomatte: Fix error loading incomplete metadata.
When rendering with cycles at some point the manifest is trimmed. This
leads to incomplete/corrupted metadata. This patch will make sure that
the manifest parser doesn't crash.

This solved the issue when the manifest is trimmed at the start of a
hash. Eg '"Name":"'.
2021-03-26 09:13:46 +01:00
4425bacec4 Cleanup: Fix clang-tidy errors. 2021-03-26 08:38:58 +01:00
64d4e722a0 UV: warn when unwrapping fails
Report an error when unwrapping can't solve some UV islands,
note that edge-seams may need to be set.

Address T86936
2021-03-26 17:59:36 +11:00
8adeab4b0e Cleanup: use code doxy command for Python snippet 2021-03-26 14:58:30 +11:00
ce528d02e1 Cleanup: spelling 2021-03-26 14:55:55 +11:00
Victor-Louis De Gusseme
dda02a448a Geometry Nodes: Add Attribute Map Range Node
This commit adds a node with a "Map Range" operation for attributes
just like the non-attribute version of the node. However, unlike the
regular version of the node, it also supports operations on vectors.

Differential Revision: https://developer.blender.org/D10344
2021-03-25 23:29:33 -04:00
e18091650b Animation: action mirror RNA API using pose contents
This adds a new RNA method `Action.flip_with_pose(ob)` to flip the
action channels that control a pose.
The rest-pose is used to properly flip the bones transformation.

This is useful as a way to flip actions used in pose libraries,
so the same action need not be included for each side.

Reviewed By: sybren

Ref D10781
2021-03-26 13:37:40 +11:00
ff017df318 Animation: add BKE_fcurve_pathcache_find API
Support a cache for fast RNA path look-ups for RNA-path + index.

Unlike a regular hash lookup, this supports using a single lookup
for the RNA path which is then used to fill an array of F-curves.

Reviewed By: sybren

Ref D10781
2021-03-26 13:37:40 +11:00
6fd799c72c Animation: add BKE_fcurves_calc_keyed_frames utility
This function returns an array of keyed frames with rounding,
to avoid duplicates caused by subtle floating point difference.

Reviewed By: sybren

Ref D10781
2021-03-26 13:37:40 +11:00
758c2210ae Cleanup: clang-format 2021-03-26 12:28:49 +11:00
62f5a6bfa7 CMake: add headers to source lists, sort file-lists 2021-03-26 12:24:41 +11:00
Leon Leno
2f77252086 Fix: Geometry Nodes: Incorrect offsets for plane primitive
The recent commit that changed the size (rB83df3545246aada) left out
a few changed. This patch also adjusts the positioning and UV scale of
the generated plane accordingly.

Differential Revision: https://developer.blender.org/D10822
2021-03-25 20:59:29 -04:00
de1eeaa3d2 LibOverride: fix bad ID relationships handling during resync.
Purely local IDs would not always be used as proper barriers when
generating override hierarchy data, leading to imporperly trying to
resync override IDs from other hierarchies, which would break/cause
issues in case they would be duplicate overrides of the same linked
data.

Reported by Pablo from Sprite team, thanks.
2021-03-25 22:32:04 +01:00
2281db72b0 LibOverride: Fix mistake in recent commit.
We do not want to re-generate auto-overrides until everything that
needed to be resynced has been resynced. Otherwise it's a waste of time
and guaranteed loss of some override properties.

Mistake in rB9947f2095610 earlier today.
2021-03-25 22:32:04 +01:00
64ca286540 Cleanup: Pass instance group result vector as an argument
This will allow retrieving the instance groups from multiple geometry
sets and avoiding needing vectors of vectors to store the results.
This is useful when retrieving instances from a multi-input socket
of geometries.
2021-03-25 14:54:27 -04:00
926f7612fd Fix T86867: Node Editor: Avoid deselect-all triggering on every box-
select

In 'Set/Replace' mode this is not a problem, but 'Extend' or 'Subtract'
modes were useless with the current behavior.
The problem here is that 'node.select' fires before 'node.select_box'
(which is fine) but deselects immediately on click.

This issue has come up before in other editors, see
{T70457}
{rB395dfff103e1}
{rBa8ea1ea1b7d5}

Now delay deselection in empty space to mouse release (same as done in
before mentioned report).

also related:
ref T57918
ref T63994

Maniphest Task: T86867

Differential Revision: https://developer.blender.org/D10801
2021-03-25 17:05:35 +01:00
25c4118651 LibOverride: Silence noisy warnings in console.
That one skiped the move to CLOG a few weeks ago, could spam a lot in
the console in some cases.
2021-03-25 16:57:32 +01:00
0f13bded46 Fix T86852: Allow Font Style Changes to Affect Spreadsheet Text Size
Replacing a hard-coded font size with font style widget size so it can be set by user.

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

Reviewed by Dalai Felinto
2021-03-25 08:35:36 -07:00
5ebe74e779 GPencil: Fix compiler warning when HARU and PUGIXML are disabled
The function only must be included if Haru or Pugixml is enabled.
2021-03-25 16:06:31 +01:00
1d7adb6d8a BLI: simplify using DefaultHash 2021-03-25 16:01:41 +01:00
9b42626918 BLI: fix Set.lookup_key_or_add 2021-03-25 16:01:41 +01:00
56df673be2 Fix T86796: moving the cursor in the UV Editor does not take aspect into
account

UV coords are scaled by aspects (see UVsToTransData). This also applies
for the Cursor in the UV Editor which also means that for display and
when the cursor coords are flushed (new 'recalcData_cursor_image' was
added for this), these need to be converted each time.

Maniphest Tasks: T86796

Differential Revision: https://developer.blender.org/D10817
2021-03-25 15:36:53 +01:00
a9cd90135a Make moving the cursor in UV Editor a 2d edit transform
This flags moving the cursor in the Image Editor T_2D_EDIT with the
following benefits:

- dissallowing e.g. Z constraints
- improving the header display:
-- it should not use scene units
-- now respects if we are moving in pixel coords or not

part of upcoming fix for T86796
ref D10817
2021-03-25 15:36:53 +01:00
Erik Abrahamsson
5ffbe439c6 Fix for T86613: Renaming in outliner doesn't trigger rename event
When subscribing to name-changes through the API,
the event doesn't trigger if the object is renamed in the outliner.
Fixed by publishing the RNA changes.

Reviewed By: lichtwerk

Ref D10732
2021-03-26 00:39:35 +11:00
543becac36 Fix T86921: Executing "Operator Cheat Sheet" Crashes Blender
This was only happening without an active object.

The "Operator Cheat Sheet" operator collects info about all operators,
and as part of that executes the callbacks to create dynamic enums. The
callback to enumerate the geometry operators (introduced in
rB370d6e50252b) attribute domains depends on a context object. If this
isn't available, we just have to return `DummyRNA_NULL_items`.

Maniphest Tasks: T86921

Differential Revision: https://developer.blender.org/D10814
2021-03-25 14:03:20 +01:00
0083a7615e Revert "Cleanup: Fix unused-private-field warning."
This reverts commit 43c48965d7.
It created a new warning on GCC: -Wattribute (ignored attribute) as
GCC doesn't warn about unused private fields.
2021-03-25 17:23:46 +05:30
9947f20956 LibOverride; Fix missing re-creation of auto-generated override rules after resync.
While not useful for the override system itself, this is rather
important for user feedback.
2021-03-25 12:45:01 +01:00
51b316dbc2 Fix T83390: Remove temporary, for-one-release deprecation hints
Revert "Point users to new location of "Show Group Colors" option",
commit rB6ed6741ee35930bf81fad9a5eb6bb17eea168725.

These deprecation hints were intended for one release only, and thus can
be removed now.
2021-03-25 12:15:28 +01:00
f7fa0d3974 Geometry Nodes: change order of domains in drop down
This has been requested in D10803.
2021-03-25 12:04:38 +01:00
28cf851a5c Geometry Nodes: rename attribute domains
This patch renames two domains:
* `Polygon` -> `Face`
* `Corner` -> `Face Corner`

For the change from `polygon` to `face` I did a "deep rename" where I updated
all (most?) cases where we refere to the attribute domain in code as well.
The change from `corner` to `face corner` is only a ui change. I did not see
a real need to update all code the code for that. It does not seem to improve
the code, more on the contrary.

Ref T86818.

Differential Revision: https://developer.blender.org/D10803
2021-03-25 12:02:50 +01:00
150e0553da Fix T86853: Critical bug in write code of CacheFile ID.
CacheFile writing code would not write generic ID data (call for it has
been missing since the initial commit, rB61050f75b13e).

While potentially affecting other areas (mostly CustomProperties/IDProperties),
this was a critical failure for liboverrides. Also added some workaround
code to allow opening broken files (though the override of the CacheFile
data-block will be lost).
2021-03-25 11:21:15 +01:00
3b0531154e UI: rename node editor sidebar categories
* `Node` -> `Group`
* `Item` -> `Node`

Differential Revision: https://developer.blender.org/D10804
2021-03-25 09:16:03 +01:00
9ac7946dd0 GPencil: Fix wrong file extension when exporting SVG
Due a code cleanup it was using .PDF all times.
2021-03-24 18:47:33 +01:00
43c48965d7 Cleanup: Fix unused-private-field warning. 2021-03-24 22:45:43 +05:30
e2d362757f Cleanup: Add override keyword. 2021-03-24 17:56:29 +01:00
9ad3d1d36b Cleanup: Remove unecessary enum funcs
The separator can be added directly in the enum items rather than in
a callback.

Differential Revision: https://developer.blender.org/D10806
2021-03-24 12:44:48 -04:00
a363d64b93 UI: Use correct property split ratio for node socket buttons
This makes the buttons drawn on nodes for unconnected string and color
sockets draw with the correct 40% ratio for the label split rather than
the old 50% ratio not used elsewhere in Blender anymore. The benefit is
a cleaner look, because the button edges line up better with others, and
a bit more space to type in attribute names.
2021-03-24 12:36:19 -04:00
d0d0d9d7c6 Fix broken compilation after recent GPencil commit.
rBa8a92cd15a52 was adding external libraries includes to `INC`, which is
reserved to internal project includes.

`INC` does not allow duplicates, and when using system libs both PugiXML
and Haru headers are under the same path.
2021-03-24 17:01:19 +01:00
a6664383c6 Fix (unreported) Outliner: missing override tree items for collections in Viewlayer view.
Probably lost at some point in recent refactor moving the whole tree
building towards a more modular, C++ code.
2021-03-24 16:38:03 +01:00
bf0454b78b Fix build error and warnings in new grease pencil IO code 2021-03-24 11:33:39 -04:00
80450331c7 Fix T86884: Don't remove the "line art object add" enum item
We would not add the "object line art" enum to the operator enum list,
if there were no active object in the scene.

This would make it impossible to call this operator from python code as
the enum would we hidden when we were not in a viewport context.

Always make the operator available, having no active object is not a
strict requirement for the operator to work, so expose it always.
2021-03-24 16:23:32 +01:00
8060293656 Fix T86875: "Show on Cage" crash for geometry nodes primitives
Without `calc_object_remap` turned off in the conversion to and from
BMesh for the primitive nodes, the `CD_ORIGINDEX` custom data layer
has incorrect values. By using a different function to do the conversions,
we can avoid this problem.

Thanks to Jacques for finding the fix here.

Differential Revision: https://developer.blender.org/D10805
2021-03-24 11:05:55 -04:00
a478d502dd GPencil: Fix unreported crash when apply Lattice modifier
This error was produced because now it is possible to have several Lattice modifiers and the Bake was removing the lattice data of all modifiers.

Now the data is only recalculated and removed for the current modifier.

Also some cleanup of comments.
2021-03-24 16:01:44 +01:00
a8a92cd15a GPencil: New modules for Import and Export
This patch adds support to export and import grease pencil in several formats.

Inlude:

* Export SVG
* Export PDF (always from camera view)

* Import SVG

The import and export only support solid colors and not gradients or textures.

Requires libharu and pugixml.

For importing SVG, the NanoSVG lib is used, but this does not require installation (just a .h file embedded in the project  folder)

Example of PDF export: https://youtu.be/BMm0KeMJsI4

Reviewed By: #grease_pencil, HooglyBoogly

Maniphest Tasks: T83190, T79875, T83191, T83192

Differential Revision: https://developer.blender.org/D10482
2021-03-24 15:28:58 +01:00
ce359da5b3 Fix T86894: Geometry nodes drag and drop creates a duplicate node
Added a condition to the poll so that it ignores drag and drop on the button. The Paste Name operator is just not implemented. Doesn't work for shading nodes either.

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D10769
2021-03-24 14:24:56 +00:00
Charlie Jolly
337a122e44 Fix T86722: Missing updates after geometry nodes drag and drop
Add missing call to ED_node_tag_update_nodetree which solves the missing update on initial drag.

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D10769
2021-03-24 14:24:55 +00:00
8bbd6ba8b7 Tweak default ID types processing order, step 17: Group and comments.
Regroup ID type indices by categories, and add some comments about
reasoning of current order.
2021-03-24 15:11:54 +01:00
c1f5a56e32 Tweak default ID types processing order, step 16: Palettes.
Move Palettes type with other weird, not-really-data ID types (like
PaintCurves and Brushes), higher in the process.

Those preset-like types may use a lot of other ID types, but should only
be used by UI-related (and Scene, for tool settings) types.
2021-03-24 15:11:54 +01:00
fd75a4cbd8 Tweak default ID types processing order, step 15: ShapeKeys.
Move shape keys type just after all obdata types, since they are some
sort of sub-geometry data.
2021-03-24 15:11:54 +01:00
7db4ef98fe Tweak default ID types processing order, step 14: Fonts.
Move Font type toward the end of the list, this is a file-wrapper type
with typically no dependency to any other ID.
2021-03-24 15:11:54 +01:00
55683fafc5 Tweak default ID types processing order, step 13: Texts.
Move Texts type toward the end of the list, this is a file-wrapper type
with typically no dependency to any other ID.
2021-03-24 15:11:54 +01:00
fe55ede5ce Tweak default ID types processing order, step 12: Sounds.
Move Sound type toward the end of the list, this is a file-wrapper type
with typically no dependency to any other ID.
2021-03-24 15:11:54 +01:00
f3fe3d965f Tweak default ID types processing order, step 11: Worlds.
Move World type with the other shading types.
2021-03-24 15:11:54 +01:00
ae84a1363d Tweak default ID types processing order, step 10: LineStyles.
Move LineStyles (Freestyle) type with the rest of the shading types.
2021-03-24 15:11:54 +01:00
0e6088f467 Tweak default ID types processing order, step 09: Particles.
Move Particles next to the other physics/simulation types, after obdata
types.
2021-03-24 15:11:54 +01:00
be073d8baf Tweak default ID types processing order, step 08: CacheFiles.
Move them with the rest of the simulation types.
2021-03-24 15:11:54 +01:00
a35d145b72 Tweak default ID types processing order, step 07: MovieClips.
Move them with the other shading/image types, just before Images.
2021-03-24 15:11:54 +01:00
72fa0d48ea Tweak default ID types processing order, step 06: Brushes.
Move Brushes type with other weird, not-really-data ID types (like
Palette and Brushes), higher in the process.

Those preset-like types may use a lot of other ID types, but should only
be used by UI-related (and Scene, for tool settings) types.
2021-03-24 15:11:54 +01:00
c0f5f9ad6e Tweak default ID types processing order, step 05: PaintCurve.
Move PaintCurve type with other weird, not-really-data ID types (like
Palette and Brushes), higher in the process.

Those preset-like types may use a lot of other ID types, but should only
be used by UI-related (and Scene, for tool settings) types.
2021-03-24 15:11:54 +01:00
e96c286e53 Tweak default ID types processing order, step 04: Screen.
Move Screen data type higher in the list, just after the other
UI-related types, and before Scenes.
2021-03-24 15:11:54 +01:00
950f0b8b97 Tweak default ID types processing order, step 03: Mask.
Move it with the rest of the image/shading related types.
2021-03-24 15:11:54 +01:00
39bf5e5022 Tweak default ID types processing order, step 02: Simulations.
This is a fairly low-level ID type, so it needs to be higher in the
list, for now put it just before the shading-related types.
2021-03-24 15:11:54 +01:00
4d18fa268c Tweak default ID types processing order, step 01: Collections.
Move `OB_GR` processing just after scenes, and before objects.

This is much more sensible in general, and fixes glitches in auto-resync
process of library overrides in particular.
2021-03-24 15:11:54 +01:00
93bedcb96a Fix T86895: bpy.ops.curve.select_all(action='INVERT')
The operator should not assume v3d is valid.
2021-03-24 15:00:17 +01:00
c06042afc6 Spelling: getRenderPriotrity -> getRenderPriority 2021-03-24 14:30:22 +01:00
b2246d25a2 Cleanup: Removed commented out code. 2021-03-24 14:30:22 +01:00
31f8d894b9 Cleanup: replace index based forloops with iterators. 2021-03-24 14:30:22 +01:00
0d5cef9898 Cleanup: removed unnecessary allocations. 2021-03-24 14:30:22 +01:00
392efc7d76 Cleanup: Use const in region queries 2021-03-24 14:28:25 +01:00
d37deb19be Cleanup: Move button context based operator poll into utility function
Using the button context for operators is useful for other cases as well (where
the operator isn't the button operator itself). For example we'll need this for
the asset view UI template, where there will be additional operators that
should be able to act on button context.
2021-03-24 14:28:25 +01:00
781f41f633 Alembic procedural: deduplicate cached data accross frames
Currently the procedural will add an entry to the cache for every frame
even if the data only changes seldomly. This means that in some cases we
will have duplicate data accross frames.

The cached data is now stored separately from the time information, and
an index is used to retrieve it based on time. This decoupling allows
for multiple frames to point to the same data.

To check if two arrays are the same, we compute their keys using the
Alembic library's routines (which is based on murmur3), and tell the
cache to reuse the last data if the keys match.

This can drastically reduce memory usage at the cost of more processing
time, although processing time is only increased if the topology may
change.
2021-03-24 14:18:51 +01:00
9b8262021b Geometry Nodes: add versioning for attribute fill
The attribute domain of old nodes should be set to `ATTR_DOMAIN_AUTO`.
2021-03-24 13:27:47 +01:00
Dirk
c0a4c8c3fa Fix T86891: only sort query results for shortest string if there is a query
Differential Revision: https://developer.blender.org/D10802
2021-03-24 12:53:58 +01:00
26b45448ab Fix: Memory Leak When Using Compositor.
When using the compositor inlined static vectors could allocate
memory. This memory wasn't freed. This patch would make them inline
again.
2021-03-24 11:57:04 +01:00
715c746296 Cleanup: clang-tidy errors. 2021-03-24 11:00:31 +01:00
665d8c0e34 Cleanup: unused variable 2021-03-24 10:41:29 +01:00
42198e9eb0 Fix T86601: Cycles accumulates displacement when transforming an Object
In order to update the BVH when only the transformations are changing,
we would tag the Object's Geometry as modified. However, when
displacement is used, and the vertices were not themselves modified,
this would cause us to redo the displacement on already displaced
vertices.

To fix this, use a specific update flag for detecting and notifying that
transformations were modified.

Regression caused by rBbbe6d44928235cd4a5cfbeaf1a1de78ed861bb92.
2021-03-24 10:41:29 +01:00
6b18678e34 Fix T86314: materials not updated correctly after collada import
Make sure we have valid links and link pointers using
'ntreeUpdateTree()'.

Maniphest Tasks: T86314

Differential Revision: https://developer.blender.org/D10793
2021-03-24 10:29:34 +01:00
865025c343 Cleanup: remove stdio.h header from MEM_guardedalloc.h
This was included for `FILE *` which isn't used in the header.

Ref D10799
2021-03-24 19:34:44 +11:00
3f47df577d Cleanup: use new BLI_assert_unreachable macro 2021-03-24 12:38:08 +11:00
3ea1779365 Fix T86753: Connected Proportional editing with individual origins using different orientation than set
The problem happened when the selection only allowed "single_islands"
(only vertices are selected, no edges or faces).

The result of `is_zero_v3(v->no)` was erroneously being compared to `0.0f`

This commit corrects the wrong condition and optimizes it by adding a
earlier return when the islands don't need to be calculated.

(It also improves the code's readability by joining some variables in the
`struct TransIslandData`).
2021-03-23 15:34:31 -03:00
3a68dcb1e6 Cleanup: allow looking up size of unsupported domains
There isn't really a reason for not supporting it.
2021-03-23 16:56:38 +01:00
9a2e623372 Cleanup: use BLI_assert_unreachable in some places 2021-03-23 16:49:47 +01:00
433fb9326e BLI: add macro to indicate unreachable code
This adds a `BLI_assert_unreachable()` macro, that should be used instead
of `BLI_assert(false)` in many places.

* `BLI_assert_unreachable` provides more information than `BLI_assert(false)`
  to people reading the code.
* `BLI_assert_unreachable` will print an error to `stderr` in a release build.
  This makes it more likely that we will get bug reports when the assumptions
  of a developer were wrong.

Differential Revision: https://developer.blender.org/D10780
2021-03-23 16:45:44 +01:00
7046e37ede Cleanup: WorkScheduler.
- Use constexpr for better readability.
- Split in functions per backend.
- Split work scheduler global struct in smaller structs.
- Replaced std::vector with blender::Vector.
- Removed threading defines in COM_defines.h
2021-03-23 16:14:11 +01:00
83df354524 Geometry Nodes: Make plane primitive size consistent
This means the "Size" input is treated as a "diameter" instead of
a "radius", just like the 3D view primitives.
2021-03-23 11:05:18 -04:00
29c0b34b20 Fix (unreported) object duplicate code wrongly duplicating linked objects.
Linked data should only be duplicated if relevant `eDupli_ID_Flags` flag
is set (`USER_DUP_LINKED_ID`), this is being taken care of by generic
`BKE_id_copy_for_duplicate` function, but for some reasons (?)
`BKE_object_duplicate` was directly using `BKE_id_copy` for itself...

Note that this had especially bad consequences when duplicating
overrides of collections...
2021-03-23 16:03:12 +01:00
9f19d01e3c Geometry Nodes: Move mesh primitives to their own category
It makes more sense to avoid mixing the primitives with other mesh
operations. We considered adding a "Mesh" prefix to the names too,
but decided to prioritize improvements to the node search menu instead,
and only consider that if there is an overlapping prefix name for
another data type.
2021-03-23 11:02:38 -04:00
96e60cc22c Fix T86567: Cycles crashes when playing back animated volumes
The crash is caused by an out of bound access in the kernel due to
missing data update when a Volume's voxel data changes. Although the
previous bounding mesh is cleared, the Volume Node was not tagged as
modified, and therefore never rebuilt.

To fix this, tag the Geometries (not just Volumes, to be more robust) as
modified in Geometry.clear().

Regression caused by rBbbe6d44928235cd4a5cfbeaf1a1de78ed861bb92.
2021-03-23 15:59:29 +01:00
9e206039d4 Fix T86073 : Ctrl clicking 3 times without selecting any of the verts in NurbsPath leads crash.
Crash occurs at `assert(builder->index_len < builder->max_index_len)`.

Non-bezier nurbs were being created with abnormal values causing the
causing edge count in the draw manager to be incorrect.

This commit also deduplicates and adds descriptions to the code.

Thanks @PratikPB2123 for pointing out where the error is.
2021-03-23 11:33:53 -03:00
6d97fdc37e Outliner: Do not crash when drawing unknown view type.
Instead default to Viewlayer view.
2021-03-23 14:59:30 +01:00
0fabd045a5 LibOverride: Also consider RNA Collection in 'need resync' detection.
RNA collections can store lists of ID pointers, so they require a similar handling for RNA pointers.
2021-03-23 14:59:19 +01:00
19da44f869 Cleanup: remove internal functions from interface. 2021-03-23 12:05:37 +01:00
Manuel Castilla
9fb5559a0f Compositor: Display generated inputs in Viewers and Previews
Currently viewers and previews only display node trees that have at least one node with fixed resolution size. When all inputs are generated, nothing is displayed in most cases (RGB Node is displayed as a single pixel on previews). By generated I mean inputs not having resolution on their own, they create content dynamically given an output resolution.

This patch adds support for those cases by using an appropriate preferred resolution on Viewers/Previews which propagates to generated inputs as output resolution. Now:
- Viewers will display generated inputs with scene render resolution.
- Previews will display them with scene aspect ratio.
This is consistent with final render result and respects relative space.

The benefit for the user is being able to compose images without any input source. For example for creating mask images or simple backgrounds.

Reviewed By: Jeroen Bakker

Differential Revision: https://developer.blender.org/D10611
2021-03-23 12:04:51 +01:00
8cac85abfe Cleanup: Silence compile warning. 2021-03-23 11:59:42 +01:00
36cb66384d Cleanup: remove unused include. 2021-03-23 11:59:07 +01:00
eed45b655c RNA: support automatically mapping string property to char pointer
The goal of this patch is to remove the boilerplate code required to get
a string property that maps to an allocated char pointer in dna.
Previously, one to to provide three callbacks, all of which are not necessary
anymore for a simple string property.

Currently, when an empty string is assigned, the `set` function will always
allocate it as well, instead of assigning `NULL` to the pointer. Some structs
might support `NULL` while others don't, so this is the safer option for now.

Differential Revision: https://developer.blender.org/D10773
2021-03-23 11:47:09 +01:00
4e0fd7fff1 VSE: Sanitize move_to_meta usage
There were multiple cases that could lead to problems like moving meta
strip into itself or into it's children meta strips.

Print error string to console when invalid action is requested.
2021-03-23 11:23:20 +01:00
Charlie Jolly
d375889298 Nodes: Add Refract and Faceforward functions to Vector Maths nodes
Cycles, Eevee, OSL, Geo, Attribute

Based on outdated refract patch D6619 by @cubic_sloth

`refract` and `faceforward` are standard functions in GLSL, OSL and Godot shader languages.
Adding these functions provides Blender shader artists access to these standard functions.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D10622
2021-03-23 09:59:20 +00:00
4c19fcacc0 Cryptomatte: Node Size.
Made it just a bit smaller (same size as renderlayers node).
2021-03-23 10:50:39 +01:00
028ca67a8d Spreadsheet: show comma separators in number of rows 2021-03-23 10:41:04 +01:00
1dea9701e6 Cryptomatte: Default Node Size.
Set the min/max and default node size of the cryptomatte node.
2021-03-23 10:39:47 +01:00
9c7492e2e0 Geometry Nodes: show domain in attribute fill node
Differential Revision: https://developer.blender.org/D10789
2021-03-23 10:28:52 +01:00
Omar Emara
ec97450ac6 Curves: add taper mode option
Currently, when a taper object is specified, the radius of the spline is
ignored. This patch adds a new option to control how the taper object
affect the effective radius of the spline. The option allow three modes
of operation:

- Override: The old method. The radius of the spline is ignored and
  overridden.
- Multiply: The radius of the spline is multiplied by the taper radius.
- Add: The radius of the spline is added to the taper radius.

Ref D10779
2021-03-23 18:34:46 +11:00
f2f796e623 FIX: Incorrect link drawing after link cutting tool
Sorting of links on multi-input sockets where not recalculated after
 using the knife operator. Added call to resort function before
 cutting operator finishes.

Reviewer: Jacques Lucke

Differential Revision: https://developer.blender.org/D10783
2021-03-23 08:14:29 +01:00
2600b27d26 Cleanup/CMake: Fix comment, sort order of options. 2021-03-23 12:11:46 +05:30
08151b52a2 Fix error in clip.setup_tracking_scene with cycles
Regression in e9182a0f5d
2021-03-23 16:49:38 +11:00
70d2456ff1 Cleanup: unused variables, imports 2021-03-23 16:21:51 +11:00
bb78f38bd1 Cleanup: single quotes for Python enums, spelling 2021-03-23 16:08:53 +11:00
3117de3a73 Cleanup: import operator class directly for Python operators 2021-03-23 16:08:02 +11:00
32301a0700 Fix sequencer text leaving bold & italic flags enabled
Regression in 913b71bb8b
2021-03-23 16:06:02 +11:00
ee07bfa3a0 Fix crash transforming sequences
Regression in 3d9ee83d88
2021-03-23 15:11:38 +11:00
e5b973100d Update RNA to Manual Map 2021-03-22 23:23:47 -04:00
38b7563a4f Cleanup: de-duplicate gpencil logic to ensure materials
- Rename:
  `BKE_gpencil_object_material_get_index_name`, to
  `BKE_gpencil_object_material_index_get_by_name`
  Matching `BKE_gpencil_layer_get_by_name`.
- Move logic to ensure named materials into a new function:
  `BKE_gpencil_object_material_ensure_by_name`
2021-03-23 13:58:09 +11:00
a7239c2bad Fix incorrect flag usage in line art modifier 2021-03-23 13:29:20 +11:00
db5d9ddb1a Cleanup: use e prefix for enum, comment on misleading flag values
Also replace "Feature" with "LineArt" in enum names.
2021-03-23 13:27:17 +11:00
80c86e274d Cleanup: move line art panel into properties_objects
No need for a module to define a single panel, since this is an
object panel it can be included with other object panels.

If centralizing line-art properties is needed in the future,
this can be done in a `*_common` module.
2021-03-23 12:41:45 +11:00
b787581c9c WM: don't set the area when toggling full-screen
The stated reason for this no longer applies.
2021-03-23 11:57:41 +11:00
4820f16b7f RNA: correction to a05cbc9914
The clipping plane bias is an implementation detail,
don't use this in the RNA name.
2021-03-23 11:31:40 +11:00
62987a6f98 Cleanup: lattices, use bool is_editmode instead of int editmode
Replace `int editmode` with `const bool is_editmode`.

No functional changes.
2021-03-22 18:02:02 +01:00
7d4dcfe879 Fix T86822: context.collection not available in Object/Object Data Properties
We need to return the global context collection if it is not found in
the data path.

Also fix pinning of the collection tab.
2021-03-22 17:37:44 +01:00
Jishan Singh
2c427d594f Fix T83638: mirror modifier with mirror object renders wrong motion blur
In this case both the mirror object and object itself moving in time may
change the geometry and must be checked.

Differential Revision: https://developer.blender.org/D10757
2021-03-22 17:22:45 +01:00
21268ad20a Functions: devirtualize virtual arrays in simple functions
In some multi-functions (such as a simple add function), the virtual method
call overhead to access array elements adds significant overhead. For these
simple functions it makes sense to generate optimized versions for different
types of virtual arrays. This is done by giving the compiler all the information
it needs to devirtualize virtual arrays.

In my benchmark this speeds up processing a lot of data with small function 2-3x.

This devirtualization should not be done for larger functions, because it increases
compile time and binary size, while providing a negilible performance benefit.
2021-03-22 17:06:27 +01:00
6cec782970 Cleanup: Collection check return type in button_context 2021-03-22 16:59:08 +01:00
23d2174d6b Geometry Nodes: Remove location and rotation from mesh primitives
Following some discussion among the geometry nodes team, it was decided
that keeping the primitive nodes simpler and requiring a separate
transform node to move the generated geometry from the origin would
be better.
 - It's more consistent with the current general idea of "building
   block nodes"
 - It makes more sense for the future when it will be possible to
   use instancing to control the transforms.
 - It reduces UI clutter when the controls are not necessary.
2021-03-22 11:58:46 -04:00
2d1120c171 BLI: Add "identity" constructor to float4x4 type 2021-03-22 11:52:44 -04:00
9baf39c8da Fix T86666: Lasso and Circle select tools selecting objects behind clip_min
Although it works well in most cases, the algorithm to detect if a point
is within the limits of the camera does not work well in othographic mode.

This commit also adds the option `V3D_PROJ_TEST_CLIP_FAR` (currently unused).

Differential Revision: https://developer.blender.org/D10771
2021-03-22 12:46:29 -03:00
fb1265c5cf Tracking: Fix movie file prefetch freezing interface
The issue was caused by the prefetch code having LOCK_MOVIECLIP lock
acquired while reading frames from the movie files. The need of the
lock was coming from the fact that `clip->anim` can not be accessed
from multiple threads, so that was guarded by a lock. The side effect
of this lock was that the main thread (from which drawing is happening)
did not have any chance passing through it in the cache code because
the prefetch happens so quickly.

The solution is to create a local copy of the clip with its own
anim handler, so that read can happen without such lock.

The prefetch is slower by an absolute number in seconds (within 10%
in tests here), but it is interactive now.
2021-03-22 16:27:35 +01:00
Johannes Jakob
4b9c9a7bea Fix missing document icons on macOS 10.4 and earlier
Re-adds a legacy document icon for macOS 10.14 Mojave that is
consistent with the system generated document icon on macOS 11
Big Sur. It uses the old-style document sheet icon, but includes the
file extension underneath the Blender icon (unlike the previous
legacy document icon that was removed in D10267).

Adds the missing description for the exported type identifier.
Finder now correctly displays “Blender File” instead of “data”
for Blender files.

Differential Revision: https://developer.blender.org/D10746
2021-03-22 16:05:10 +01:00
3e44221b57 Fix build error on macOS/clang 2021-03-22 16:05:10 +01:00
a31b162c6e GPencil: Hide Interpolate Only Selected in Draw Mode
This option is only valid in Edit mode. Also changed the space between options to improve UI.

Reviewed by: @mendio
2021-03-22 15:58:59 +01:00
2889d8dca9 GPencil: Move Automerge button position in topbar
This helps to keep animation buttons grouped.
2021-03-22 15:47:59 +01:00
d955ce1170 Fix T86591: Tracking backwards is slower
The root of the issue was caused by the PredictMarkerPosition()
always returning false when tracking backwards. This was making
it so tracker always had to run brute initialization, which is
an expensive operation.

From own timing here:

- Tracking forward takes 0.667637 seconds
- Tracking backward used to take 2.591856 seconds
- Tracking backward now takes 0.827724 seconds

This is a very nice speedup, although the tracking backwards is
still somewhat slower. Will be investigated further as part of
a regular development.
2021-03-22 15:20:13 +01:00
e3f2c94d39 Fix T86741: Remapping could create doublons of collections in hierarchy.
Code rebuilding/ensuring the sanity of the collection hierarchy was not
checking for a same collection being child of the same parent multiple
times.

This was already prevented to happen in code adding collections to other
collections, but not for the remapping case.
2021-03-22 15:10:27 +01:00
56dabfac5c Fix (unreported) memleak in collection/viewlayer code.
In collection/viewlayer synchronization code, in some cases, there are
extra unused view layer collections left in old list after all needed
ones have been moved to the new list.

Found while working on T86741.
2021-03-22 15:10:27 +01:00
7b7b554f94 Fix: wrong use of assert in recent commit. 2021-03-22 14:11:58 +01:00
1a7f9b5005 UI: Remove text for add and remove buttons in cryptomatte node
The text is unecessary and it's always cut off anyway.
2021-03-22 08:58:20 -04:00
c4c195672d Cleanup: remove unexposed nodes
Those nodes are leftovers from my work on particle nodes and are not needed currently.
They can be added back easily if they become necessary.
2021-03-22 12:23:25 +01:00
77887f95cc Geometry Nodes: make random float node more consistent with other nodes
Previously, different Random Float nodes would generate different values
depending on where they are in the node group hierarchy. This can be useful,
but should definitely not be the default behavior, because it is very inconsistent
with other nodes.
2021-03-22 12:09:06 +01:00
01b6c4b32b Functions: make multi functions smaller and cheaper to construct in many cases
Previously, the signature of a `MultiFunction` was always embedded into the function.
There are two issues with that. First, `MFSignature` is relatively large, because it contains
multiple strings and vectors. Secondly, constructing it can add overhead that should not
be necessary, because often the same signature can be reused.

The solution is to only keep a pointer to a signature in `MultiFunction` that is set during
construction. Child classes are responsible for making sure that the signature lives
long enough. In most cases, the signature is either embedded into the child class or
it is allocated statically (and is only created once).
2021-03-22 12:01:07 +01:00
ccb372d17c Fix regression in bd79691599
The sequencer header needs to be drawn, even if the returned
variables aren't used.
2021-03-22 21:59:55 +11:00
Jeroen Bakker
36fdbed2f0 LibraryOverrides: Initial Test Case.
Added a first test case for review. This will be the base for future test cases.

The current API is sufficient for what is expected for such a low level API.
One concern is that you need to trigger a save in order to update the library overrides
structure. Not expected from TD/Dev point of view.

Test cases are very important when implementing restrictive mode as it is a second evaluation mode that
has impact on the (current) permissive mode.

Reviewed By: Sebastián Barschkis, Bastien Montagne

Differential Revision: https://developer.blender.org/D10747
2021-03-22 11:51:44 +01:00
7a05ebf84b Fix T86405: Always translate when in en_US locale too.
The impact of translations on UI performances is neglectable, and this
gives better handling of some odd cases where original language of an
add-on is not English.
2021-03-22 11:50:15 +01:00
2e213003b8 Cleanup: add comment
See rBb9cd2f4531ca670c196b0b14b1359d0f375103c2 for more info.
2021-03-22 11:35:19 +01:00
Nikhil Shringarpurey
414596cd83 Cleanup, LineArt: Fix MSVC compiler warnings.
Currently 3 of the printf lines use the format specifier "%lu" for data
of type size_t instead of "%zu". While this works, this creates compiler
warnings.

This diff fixes those warnings by using the correct format specifier.
Tested using MSVC, but should be correct on any compliant compiler.

Reviewed By: Sebastian Parborg

Differential Revision: http://developer.blender.org/D10761
2021-03-22 11:30:36 +01:00
a506f87c90 Clang Tidy: disable modernize-raw-string-literal again
This check does not work when gtests are enabled yet.
See rBb9cd2f4531ca670c196b0b14b1359d0f375103c2 for more details.
2021-03-22 11:26:48 +01:00
82d3b0f927 Fix UI (and code!) typos. 2021-03-22 10:56:25 +01:00
14caab7257 Cleanup: check the space type instead of the operators poll function
The poll function may fail for reasons other than the space type,
as this menu is selected based on space-type, check this instead.
2021-03-22 20:12:08 +11:00
a05cbc9914 RNA: rename recently added line-art properties
- Use `use_` prefix for boolean properties.
- Use `_all` instead of `_everything`,
  following existing conventions and the properties UI text.
- Use `object_instances` instead of old term `dupli` / `duplication`.
- Use `clip_plane` instead of `clipping_boundaries`,
  matching the RegionView3D property naming.
2021-03-22 18:09:19 +11:00
958e3a8cc1 RNA: use boolean array for transarency masks
There is no need to expose this as multiple properties,
also use `use_` prefix for boolean properties.
2021-03-22 18:04:12 +11:00
cb521bd37b Cleanup: spelling, expand on comments 2021-03-22 14:48:36 +11:00
f051146ae6 Cleanup: clang-format 2021-03-22 14:39:39 +11:00
dfbaf96753 Revert "Disable clang-format for objective-C bits in GHOST."
This reverts commit 1cb9612d73.

We can now rely on the clang-format version as it's distributed
with pre-compiled binaries.
2021-03-22 14:38:45 +11:00
e6cf74515f Cleanup: disable clang-format for 'intern/libmv/third_party' headers 2021-03-22 14:35:20 +11:00
544b3ab1de Cleanup: clang-format, trailing space
Minor manual tweak to prevent wrapping an array into columns.
2021-03-22 14:25:42 +11:00
2a06657eca Cleanup: Don't use class method to override equality operator
This won't make a difference in this case, but it's consider better
practice since there is no vagueness about implicit conversion.
2021-03-21 20:21:05 -04:00
54bbaa26de Cleanup: compile errors on macos 2021-03-21 19:49:29 +01:00
4fe8d0419c Functions: refactor virtual array data structures
When a function is executed for many elements (e.g. per point) it is often the case
that some parameters are different for every element and other parameters are
the same (there are some more less common cases). To simplify writing such
functions one can use a "virtual array". This is a data structure that has a value
for every index, but might not be stored as an actual array internally. Instead, it
might be just a single value or is computed on the fly. There are various tradeoffs
involved when using this data structure which are mentioned in `BLI_virtual_array.hh`.
It is called "virtual", because it uses inheritance and virtual methods.

Furthermore, there is a new virtual vector array data structure, which is an array
of vectors. Both these types have corresponding generic variants, which can be used
when the data type is not known at compile time. This is typically the case when
building a somewhat generic execution system. The function system used these virtual
data structures before, but now they are more versatile.

I've done this refactor in preparation for the attribute processor and other features of
geometry nodes. I moved the typed virtual arrays to blenlib, so that they can be used
independent of the function system.

One open question for me is whether all the generic data structures (and `CPPType`)
should be moved to blenlib as well. They are well isolated and don't really contain
any business logic. That can be done later if necessary.
2021-03-21 19:33:13 +01:00
68c31c41e5 UI: Title case for Proxy Setup and fix typo 2021-03-21 18:40:38 +01:00
2ddbb2c64f Functions: move CPPType creation related code to separate header
This does not need to be included everywhere, because it is only
needed in very few translation units that actually define CPPType's.
2021-03-21 15:33:30 +01:00
9e437aabdb Cleanup: fix compiling with older compiler on macos
We cannot use `std::variant` yet, because not all of the compilers
we support have a working version of it yet. For now, I just replaced
it with multiple `std::option` which is good enough, because currently
`CellValue` is only used for the cells that are actually drawn in
the spreadsheet.
2021-03-21 14:29:26 +01:00
dcf1a1045d Cleanup: move some headers from MOD_lineart.h to source files 2021-03-21 14:51:37 +11:00
b8cc8b30ec Cleanup: redundant headers in 'source/blender/gpencil_modifiers' 2021-03-21 14:30:08 +11:00
9c0eb1700e Cleanup: correct variable name mixup in BLI_str_quoted_substrN
Also expand doc-string for `BLI_str_escape_find_quote`
2021-03-21 14:22:14 +11:00
dfefafa814 Fix uninitialized memory use loading movie sequence strips
When the movie wasn't found, uninitialized values would be used for
the original width/height.

Also use int instead of float as the image size is stored as an int.
2021-03-21 14:12:58 +11:00
fce3e6646e Fix failure to set transform rotate around single
Regression in 201ab7c540
2021-03-21 14:01:41 +11:00
87b6283918 Cleanup: remove redundant NULL checks 2021-03-21 14:00:40 +11:00
bf13a4d3ff Cleanup: unused return statements 2021-03-21 14:00:40 +11:00
6d97f9a5c1 Cleanup: use static local variables 2021-03-21 14:00:40 +11:00
4abafa2062 Cleanup: remove window manager headers from MOD_lineart
This was only used to return success, which is currently never checked.
2021-03-21 13:47:05 +11:00
dcd9945ebe Cleanup: replace 'unsigned char' with 'uchar' 2021-03-21 13:25:31 +11:00
31e7bc6869 Cleanup: remove redundant casts 2021-03-21 13:24:42 +11:00
6db1fb197c Cleanup: spelling, doxygen comment formatting 2021-03-21 13:18:20 +11:00
b4e96550ce Fix T86643: Win32 Entering Full Screen While Maximized
SetWindowPos must be called after SetWindowLongPtr in order to see changes to window frame style.

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

Reviewed by Ray Molenkamp
2021-03-20 17:24:06 -07:00
9ca67c47a1 Fix T86660 EEVEE: Undefined behaviour in specular_occlusion
Define visibility error to be 1 by default to avoid undefined behaviour.
2021-03-20 22:00:08 +01:00
057292e75a Bevel code: add a null pointer check. 2021-03-20 13:03:43 -04:00
90959c2372 Cleanup: quiet warning 2021-03-20 15:54:52 +01:00
98721c8543 BLI: improve support for generic algorithms with c++ containers
Some generic algorithms from the standard library like `std::any_of`
did not work with all container and iterator types. To improve the
situation, this patch adds various type members to containers
and iterators.

Custom iterators for Set, Map and IndexRange now have an iterator
category, which soe algorithms require. IndexRange could become
a random access iterator, but adding all the missing methods can
be done when it is necessary.
2021-03-20 15:42:35 +01:00
59d3ec1eef Cleanup: quiet warning 2021-03-20 15:38:17 +01:00
56da5ae2ac LineArt: Fix blank baking for when source type is object. 2021-03-20 14:07:51 +01:00
b19bd3692d Fix T86746: Description missing from Quick Liquid
The description was missing from the Quick Liquid operator.

The fix adds the following description:
"Make selected objects liquid"

Reviewed By: sebbas

Maniphest Tasks: T86746

Differential Revision: https://developer.blender.org/D10777
2021-03-20 13:44:36 +01:00
95a2549d90 Fix T86745: trace sequence keyframe offset
The offset when creating the keyframes was set to `frame_target + i` but
`i` starts iterating from the current frame number.

The fix uses just `i` as the frame number.

Reviewed By: antoniov

Maniphest Tasks: T86745

Differential Revision: https://developer.blender.org/D10772
2021-03-20 13:43:00 +01:00
d0f05bfbcd LineArt: Fixed source selection for nested-instanced collection. 2021-03-20 12:36:35 +01:00
3d5239ff40 Fix T86730: LineArt: keep contour when there's perpendicular faces. 2021-03-20 12:36:27 +01:00
d5a705873e Join curves: compensate for different bevel depths
When joining curves, the resulting curve will inherit the bevel depth of
the active curve, but the radii would stay the same which leads to
changed appearance when joining.

Now compensate for this taking the different bevel depths into account
(if present).

Was a feature request here (and I also think we had reports about this
-- which were usually turned down as not-a-bug):
https://blender.community/c/rightclickselect/bhhbbc/

Differential Revision: https://developer.blender.org/D10752
2021-03-20 08:14:49 +01:00
f65a3172a8 Fix issues introduced strip loading refactoring
- Adding effect strip resulted in strip with no name
 - Adding sound strip attempted to read `fit_method` RNA property,
   that did not exist, causing error messages in console

These issues were introduced in bbb1936411.
2021-03-20 01:53:03 +01:00
3433d1b7f4 Fix T86355: Added effect strip has wrong length
SEQ_add_effect_strip used SeqLoadData.image.end_frame to set end
frame. This was mistake introduced in last refactoring patch.

Use effect data, not image data, when adding effect strips.

Reviewed By: sergey

Differential Revision: D10633
2021-03-20 01:40:53 +01:00
c81dfa2426 Fix T85824: Transition between adjustment regression
When transition effect is placed between 2 adjustment layer strips,
only first adjustment layer was rendered by effect.

Limit timeline_frame range to adjustment strip frame range.

This timeline configuration is technically invalid, because strips
should overlap when using transition effect. This was never restricted
and instead of producing no image, transition effect used first and
last frame of source strip. Many users got used to this "feature" so
I think it make sense to fix this case so it behaves like other strip
types.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10562
2021-03-20 01:40:53 +01:00
Peter Fog
8b3f5f755e VSE UI: Cleanup scene panel style
- Make properties alligned
 - Add decorate to volume
 - Add heading to Grease Pencil and Transparent

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10663
2021-03-20 01:40:53 +01:00
Peter Fog
3d9ee83d88 VSE: Preview images when moving strip handles
Add option to override current frame whem transforming strip handles.
Option can be found in View menu of VSE preview, or in timeline when
using backdrop.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10424
2021-03-20 01:40:53 +01:00
Peter Fog
1c095203c2 VSE: Text strip improvements
- Position text in center of image
 - Increase default font size so it's more visible
 - Increase font size limit
 - Increase limit for location, so text can be scolled off screen
 - Wrap text by default
 - Tweak default box and shadow color
 - Change text shadow position
 - Text box no longer casts shadow

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10571
2021-03-20 01:40:53 +01:00
Peter Fog
913b71bb8b VSE: Add bold and italic option for text strip
Bold and italic fonts can be switched quickly by presing corresponding
button.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10542
2021-03-20 01:40:53 +01:00
Eitan
7bf977e9f0 Fix T54395: Original image size set incorrectly
`SequenceElement` type `orig_height` and `orig_width` members were
set to incorrect size when using proxies and not set when strip was
added which caused value to be unset.

Since now image dimensions must be read when strip is created,
these members can be initialized. When proxies are used, do not set
original size since it is not guaranteed, that proxies are exact size.

These values are not guaranteed to be up to date or exact. They should
be used for strictly informative purposes.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6506
2021-03-20 01:40:53 +01:00
Félix
bfad8deb0b VSE: Add new_meta RNA API function
This function can be used to create empty meta strip, which is not
straightforward when using operators. Very useful for import/export
scripts.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10661
2021-03-20 01:40:53 +01:00
Félix
4158405c0b VSE: Add move_to_meta RNA API function
This function can be used to move strips into meta strips with no
side effects like change of selection state.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10759
2021-03-20 01:40:53 +01:00
01f028a677 Theme: Use curved noodles in the nodes editor.
Curved noodles increase readability especially in nodes with multiple input sockets.
2021-03-20 01:12:49 +01:00
3494946560 Nodes: implement dot graph exporter for derived node tree
This visualization of nested node groups makes it easier to debug
some issues. Muted nodes, muted links, reroute nodes and unavailable
sockets are removed from the visualization to keep it clean.

Nested node groups are visualized using colored clusters.
2021-03-19 22:37:48 +01:00
087f8a78f8 Nodes: expose tree name and whether a node is a frame in node tree ref 2021-03-19 22:33:43 +01:00
2dd055b2d4 Geometry Nodes: fix crash when inserting certain invalid links
For example, it would crash when connecting a float to a geometry socket,
under some circumstances.
2021-03-19 22:26:55 +01:00
250a69ee82 Fix T86728: Blender freezes when playhead is dragged in this .blend
Porting the deadlock bugfix in WASAPI from upstream Audaspace.
2021-03-19 21:42:55 +01:00
00215692d1 Nodes: make distinction between directly and logically linked sockets more clear
This also moves the handling of muted nodes from derived node tree to
node tree ref.
2021-03-19 21:13:10 +01:00
48731f45c2 Nodes: provide access to type specific data through node tree ref 2021-03-19 21:13:10 +01:00
b96acd0663 EEVEE: Volumetrics: Add back support for light clamp
The new clamping works by modifying the lamp internal radius which
then soften the light contribution.

However this does remove more light compare to the old solution.
This is because the clamp now affects the light over a much larger
distance since it is smoother. Old scene needs manual tweaking.
2021-03-19 21:11:06 +01:00
89ef0da551 EEVEE: Volumetrics: Add support for soft volumetric shadows
Soft surface shadows were already supported but now we support
soft shadows of the volume themselves.

This is only enabled if the light casts shadow and the scene soft
shadows toggle is enabled.
2021-03-19 21:11:06 +01:00
355f884b2f EEVEE: Volumetrics: Add Area light shape support
Previously area lights were just considered as point lights.
We now use a "most representative point" technique that make the
light shape appearant and gives more homogenous result.

This technique is quite cheap but it is not physically correct.

So I came up with a power function to have almost the same intensity
output as cycles in the general case.
2021-03-19 21:11:06 +01:00
0a0f737f91 EEVEE: Volumetrics: Add special attenuation volume for lights
This makes volume lights more efficient if they have lower power.
2021-03-19 21:11:06 +01:00
54f52cac7c EEVEE: Volumetrics: Fix sun volumetric shadow
Sun lights are treated as distant light source and need to gather
shadowing from the full frustum.

This might have performance impact on certain scenes.
2021-03-19 21:11:06 +01:00
884f934a85 EEVEE: Lights: Add Volume and diffuse light power slider
This adds 2 new sliders for light objects that modulates the diffuse
light and the volume light intensities.

This also changes the way volume light is computed using point lamp
representation. We use "Point Light Attenuation Without Singularity"
from Cem Yuksel instead of the usual inverse square law.
2021-03-19 21:11:06 +01:00
fb3e5b7f98 LineArt: Add missing modifer and sanity checks to bake operator
Previously we could crash because we would not check if the modifier in
question actually was a line art modifier. We also did not query if the
modifier was disabled.
2021-03-19 21:02:21 +01:00
17a5db7303 Geometry Nodes: Add geometry instances data to the spreadsheet
This patch adds data about instances generated by geometry nodes
to the spreadsheet. The transform data is decomposed into position,
rotation, and scale, and there is a name column to display the name
of the instanced object or collection.

This data is implemented specifically for the spreadsheet, because
we're not sure that we want to expose this data as attributes for the
use elsewhere.

Differential Revision: https://developer.blender.org/D10770
2021-03-19 15:30:41 -04:00
9de8c2fa18 BLI: Add accessors for translation, rotation, and scale of float4x4 2021-03-19 15:28:58 -04:00
dd7feb09c9 Cleanup: rename x1/x2/y1/y2 to x/y/width/height 2021-03-19 20:24:56 +01:00
9b806c49d0 Geometry Nodes: Refactor / fix point separate node
The point separate node was failing in situations where one of the
outputs was empty. In addition, the code was not structured very well.
This new implementation stores less temporary information, is more
geometry component type agnostic, and is more self-descriptive.
It also solves the problems mentioned above.

Fixes T86573

Differential Revision: https://developer.blender.org/D10764
2021-03-19 15:09:17 -04:00
a6ab232f8a LineArt: Added back the missing "allow_clipping_boundaries" option.
This option was missing from the UI.
Also add missing camera settings depsgraph relation.
2021-03-19 18:56:26 +01:00
cff4445a86 LineArt: Modifier defaults settings optimization.
Make options that are usually only useful in edge cases off by default.
These settings would requite extra work and thus the modifier evaluation
would be needlessly slower as most users do not need these options to be
on.
2021-03-19 18:31:03 +01:00
3420c3d8c6 LineArt: Remove geometry space chaining
It caused some chaining errors when used in combination with image space
chaining. After some internal discussion, we realized it is not
useful as chaining in image space essentially does the same thing.
2021-03-19 18:26:33 +01:00
a00249dd22 LibOverride: Stash away 'leftover' objects/collections from auto-resync process.
Instead of storing those in scne's master collection, which is fairly
annoying, we now add them to a (hidden) specific collection. Easy to
ignore, or check and cleanup.
2021-03-19 17:33:08 +01:00
a9e64d8613 Cleanup: Use uint8_t for num of channels. 2021-03-19 17:11:47 +01:00
b9d2e2ec97 Cleanup: Use enum class for MemoryBufferExtend. 2021-03-19 17:11:47 +01:00
9f86933f2e Cleanup: Remove unused states and vars from MemoryBuffer. 2021-03-19 17:11:47 +01:00
31d5c5078c Cleanup: MemoryBuffer do not store width and height. 2021-03-19 17:11:47 +01:00
8cb1089795 Cleanup: Rename copyContentFrom to fill_from. 2021-03-19 17:11:47 +01:00
dc9aea9903 Cleanup: Add copy constructor to MemoryBuffer. 2021-03-19 17:11:47 +01:00
260e50ed82 Cleanup: Use ref to read from encapsuled data.
MemoryBuffer->getRect was returning a ptr.
2021-03-19 17:11:47 +01:00
c905dd24b6 Cleanup: Replace ptr with ref (COM_MemoryBuffer). 2021-03-19 17:11:47 +01:00
b9447ab053 Cleanup: Replace ptr with ref. 2021-03-19 17:11:47 +01:00
e5ffefe606 Cleanup: Use enum class for DataType. 2021-03-19 17:11:47 +01:00
b5f70d92c2 Cleanup: enum class ChunkOrdering. 2021-03-19 17:11:47 +01:00
9c2d4ffbc1 Cleanup: Use enum class for CompositorQuality. 2021-03-19 17:11:47 +01:00
de504e6dec Cleanup: Use enum class for CompositorPriority. 2021-03-19 17:11:47 +01:00
50c5435438 Cleanup: compositor - chunk order
No functional changes.
2021-03-19 17:11:47 +01:00
18b87e2e0b Cleanup: Remove unneeded complexity
`determineDependingMemoryProxies` was mapping a value in a temp vector.
2021-03-19 17:11:47 +01:00
1076 changed files with 27523 additions and 10972 deletions

View File

@@ -2,7 +2,7 @@
# Configuration of clang-format
# =============================
#
# Tested to work with versions: 6 to 8.
# Tested to work with versions: 8 to 11.
# This causes parameters on continuations to align to the opening brace.
#
@@ -255,7 +255,6 @@ ForEachMacros:
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
- SEQ_ALL_BEGIN
- SEQ_CURRENT_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- foreach
- ED_screen_areas_iter
@@ -264,8 +263,5 @@ ForEachMacros:
- MAP_SLOT_PROBING_BEGIN
- VECTOR_SET_SLOT_PROBING_BEGIN
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
# StatementMacros:
# - PyObject_VAR_HEAD
# - STRINGIFY
StatementMacros:
- PyObject_VAR_HEAD

View File

@@ -39,8 +39,10 @@ Checks: >
-modernize-use-nodiscard,
-modernize-loop-convert,
-modernize-pass-by-value,
# Cannot be enabled yet, because using raw string literals in tests breaks
# the windows compiler currently.
-modernize-raw-string-literal
WarningsAsErrors: '*'
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment
value: 1

3
.gitignore vendored
View File

@@ -46,3 +46,6 @@ Desktop.ini
# smoke simulation noise tile (generated)
waveletNoiseTile.bin
# testing environment
/Testing

View File

@@ -236,9 +236,7 @@ option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on
mark_as_advanced(WITH_AUDASPACE)
mark_as_advanced(WITH_SYSTEM_AUDASPACE)
if(NOT WITH_AUDASPACE)
set(WITH_SYSTEM_AUDASPACE OFF)
endif()
set_and_warn_dependency(WITH_AUDASPACE WITH_SYSTEM_AUDASPACE OFF)
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON)
if(UNIX AND NOT APPLE)
@@ -522,10 +520,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
mark_as_advanced(WITH_LINKER_LLD)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
mark_as_advanced(WITH_COMPILER_ASAN)
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
mark_as_advanced(WITH_COMPILER_ASAN)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
if(WITH_COMPILER_ASAN)
set(_asan_defaults "\
-fsanitize=address \
@@ -704,10 +702,8 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
if(NOT WITH_PYTHON)
set(WITH_CYCLES OFF)
set(WITH_DRACO OFF)
endif()
set_and_warn_dependency(WITH_PYTHON WITH_CYCLES OFF)
set_and_warn_dependency(WITH_PYTHON WITH_DRACO OFF)
if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL)
message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
@@ -779,6 +775,7 @@ if(WITH_INSTALL_PORTABLE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
message(STATUS "Disabling Ghost Wayland, X11, Input IME, and OpenXR")
set(WITH_GHOST_WAYLAND OFF)
set(WITH_GHOST_X11 OFF)
set(WITH_X11_XINPUT OFF)
@@ -809,7 +806,7 @@ endif()
if(NOT WITH_CUDA_DYNLOAD)
find_package(CUDA)
if(NOT CUDA_FOUND)
message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
message(STATUS "CUDA toolkit not found, using dynamic runtime loading of libraries (WITH_CUDA_DYNLOAD) instead")
set(WITH_CUDA_DYNLOAD ON)
endif()
endif()
@@ -1235,6 +1232,7 @@ if(WITH_OPENMP)
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}")
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
else()
# Typically avoid adding flags as defines but we can't
# pass OpenMP flags to the linker for static builds, meaning
@@ -1245,6 +1243,7 @@ if(WITH_OPENMP)
find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
endif()
else()
message(STATUS "OpenMP not found, disabling WITH_OPENMP")
set(WITH_OPENMP OFF)
endif()
@@ -1320,6 +1319,7 @@ list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
find_package(Bullet)
if(NOT BULLET_FOUND)
message(STATUS "Bullet not found, disabling WITH_BULLET")
set(WITH_BULLET OFF)
endif()
else()
@@ -1955,10 +1955,10 @@ if(FIRST_RUN)
info_cfg_option(WITH_JACK)
info_cfg_option(WITH_JACK_DYNLOAD)
info_cfg_option(WITH_OPENAL)
info_cfg_option(WITH_SDL)
info_cfg_option(WITH_SDL_DYNLOAD)
info_cfg_option(WITH_PULSEAUDIO)
info_cfg_option(WITH_PULSEAUDIO_DYNLOAD)
info_cfg_option(WITH_SDL)
info_cfg_option(WITH_SDL_DYNLOAD)
info_cfg_option(WITH_WASAPI)
info_cfg_text("Compression:")

View File

@@ -129,7 +129,10 @@ Utilities
Create a compressed archive of the source code.
* update:
updates git and all submodules
Updates git and all submodules and svn.
* update_code:
Updates git and all submodules but not svn.
* format:
Format source code using clang (uses PATHS if passed in). For example::
@@ -522,6 +525,9 @@ icons_geom: .FORCE
update: .FORCE
$(PYTHON) ./build_files/utils/make_update.py
update_code: .FORCE
$(PYTHON) ./build_files/utils/make_update.py --no-libraries
format: .FORCE
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)

View File

@@ -21,7 +21,8 @@ if(WIN32)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")

View File

@@ -9,10 +9,10 @@ set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEBUG ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
set(WITH_GTESTS ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS OFF CACHE BOOL "" FORCE)
set(WITH_PYTHON_SAFETY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
if(WIN32)
set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE)
endif()

View File

@@ -37,6 +37,7 @@ set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_NANOVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
@@ -47,8 +48,6 @@ set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
set(WITH_POTRACE ON CACHE BOOL "" FORCE)
set(WITH_PUGIXML ON CACHE BOOL "" FORCE)
set(WITH_NANOVDB ON CACHE BOOL "" FORCE)
set(WITH_POTRACE ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE)

View File

@@ -10,14 +10,14 @@ set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesn't hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
# other features which are not especially useful as a python module
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)

View File

@@ -7,8 +7,8 @@
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_BOOST OFF CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
@@ -18,9 +18,9 @@ set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_OPTIX OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_OPTIX OFF CACHE BOOL "" FORCE)
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
@@ -44,12 +44,11 @@ set(WITH_LZO OFF CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID OFF CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM OFF CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH OFF CACHE BOOL "" FORCE)
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENIMAGEDENOISE OFF CACHE BOOL "" FORCE)
set(WITH_XR_OPENXR OFF CACHE BOOL "" FORCE)
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
@@ -57,11 +56,12 @@ set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_POTRACE OFF CACHE BOOL "" FORCE)
set(WITH_PUGIXML OFF CACHE BOOL "" FORCE)
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_TBB OFF CACHE BOOL "" FORCE)
set(WITH_USD OFF CACHE BOOL "" FORCE)
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
set(WITH_XR_OPENXR OFF CACHE BOOL "" FORCE)
if(UNIX AND NOT APPLE)
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)

View File

@@ -4,9 +4,9 @@
# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender
#
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
set(WITH_ASSERT_ABORT OFF CACHE BOOL "" FORCE)
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
set(WITH_BULLET ON CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
@@ -21,8 +21,8 @@ set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GMP ON CACHE BOOL "" FORCE)
set(WITH_HARU ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
@@ -38,6 +38,7 @@ set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_NANOVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
@@ -48,8 +49,6 @@ set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
set(WITH_POTRACE ON CACHE BOOL "" FORCE)
set(WITH_PUGIXML ON CACHE BOOL "" FORCE)
set(WITH_NANOVDB ON CACHE BOOL "" FORCE)
set(WITH_POTRACE ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE)

View File

@@ -15,24 +15,24 @@ set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesn't hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
# other features which are not especially useful as a python module
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
# Depends on Python install, do this to quiet warning.
set(WITH_DRACO OFF CACHE BOOL "" FORCE)

View File

@@ -56,6 +56,7 @@ list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
if(WITH_OPENAL)
find_package(OpenAL)
if(NOT OPENAL_FOUND)
message(WARNING "OpenAL not found, disabling WITH_OPENAL")
set(WITH_OPENAL OFF)
endif()
endif()
@@ -65,6 +66,7 @@ if(WITH_JACK)
NAMES jackmp
)
if(NOT JACK_FRAMEWORK)
message(STATUS "JACK not found, disabling WITH_JACK")
set(WITH_JACK OFF)
else()
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
@@ -102,6 +104,7 @@ endif()
if(WITH_USD)
find_package(USD)
if(NOT USD_FOUND)
message(STATUS "USD not found, disabling WITH_USD")
set(WITH_USD OFF)
endif()
endif()
@@ -146,7 +149,7 @@ if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}")
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}")
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}")
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}")
# set(PYTHON_LIBRARY python${PYTHON_VERSION})
# set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
@@ -308,7 +311,7 @@ if(WITH_OPENCOLORIO)
if(NOT OPENCOLORIO_FOUND)
set(WITH_OPENCOLORIO OFF)
message(STATUS "OpenColorIO not found")
message(STATUS "OpenColorIO not found, disabling WITH_OPENCOLORIO")
endif()
endif()
@@ -357,7 +360,7 @@ if(WITH_CYCLES_OSL)
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER AND OSL_SHADER_DIR)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
message(WARNING "OSL not found, disabling WITH_CYCLES_OSL")
set(WITH_CYCLES_OSL OFF)
endif()
endif()
@@ -385,7 +388,7 @@ if(WITH_OPENIMAGEDENOISE)
if(NOT OPENIMAGEDENOISE_FOUND)
set(WITH_OPENIMAGEDENOISE OFF)
message(STATUS "OpenImageDenoise not found")
message(STATUS "OpenImageDenoise not found, disabling WITH_OPENIMAGEDENOISE")
endif()
endif()
@@ -413,7 +416,7 @@ if(WITH_OPENMP)
set(OpenMP_LINKER_FLAGS "-L'${LIBDIR}/openmp/lib' -lomp")
# Copy libomp.dylib to allow executables like datatoc and tests to work.
# `@executable_path/../Resources/lib/` is a default dylib search path.
# `@executable_path/../Resources/lib/` `LC_ID_DYLIB` is added by the deps builder.
# For single config generator datatoc, tests etc.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib

View File

@@ -149,11 +149,6 @@ add_definitions(-D_WIN32_WINNT=0x601)
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
remove_cc_flag("/MDd" "/MD" "/Zi")
if(WITH_WINDOWS_PDB)
set(PDB_INFO_OVERRIDE_FLAGS "/Z7")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
endif()
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
@@ -162,6 +157,21 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
endif()
# X64 ASAN is available and usable on MSVC 16.9 preview 4 and up)
if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828)
#set a flag so we don't have to do this comparison all the time
SET(MSVC_ASAN On)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address")
string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
else()
message("-- ASAN not supported on MSVC ${CMAKE_CXX_COMPILER_VERSION}")
endif()
endif()
# C++ standards conformace (/permissive-) is available on msvc 15.5 (1912) and up
if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
string(APPEND CMAKE_CXX_FLAGS " /permissive-")
@@ -174,14 +184,41 @@ if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
set(WITH_WINDOWS_SCCACHE Off)
endif()
# Debug Symbol format
# sccache # MSVC_ASAN # format # why
# On # On # Z7 # sccache will only play nice with Z7
# On # Off # Z7 # sccache will only play nice with Z7
# Off # On # Zi # Asan will not play nice with Edit and Continue
# Off # Off # ZI # Neither asan nor sscache is enabled Edit and Continue is available
# Release Symbol format
# sccache # MSVC_ASAN # format # why
# On # On # Z7 # sccache will only play nice with Z7
# On # Off # Z7 # sccache will only play nice with Z7
# Off # On # Zi # Asan will not play nice with Edit and Continue
# Off # Off # Zi # Edit and Continue disables some optimizations
if(WITH_WINDOWS_SCCACHE)
set(CMAKE_C_COMPILER_LAUNCHER sccache)
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
set(SYMBOL_FORMAT /Z7)
set(SYMBOL_FORMAT_RELEASE /Z7)
else()
unset(CMAKE_C_COMPILER_LAUNCHER)
unset(CMAKE_CXX_COMPILER_LAUNCHER)
set(SYMBOL_FORMAT /ZI)
if(MSVC_ASAN)
set(SYMBOL_FORMAT /Z7)
set(SYMBOL_FORMAT_RELEASE /Z7)
else()
set(SYMBOL_FORMAT /ZI)
set(SYMBOL_FORMAT_RELEASE /Zi)
endif()
endif()
if(WITH_WINDOWS_PDB)
set(PDB_INFO_OVERRIDE_FLAGS "${SYMBOL_FORMAT_RELEASE}")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
endif()
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /MDd ${SYMBOL_FORMAT}")
@@ -190,9 +227,11 @@ string(APPEND CMAKE_CXX_FLAGS_RELEASE " /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_C_FLAGS_RELEASE " /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_C_FLAGS_MINSIZEREL " /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /MD ${SYMBOL_FORMAT}")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " /MD ${SYMBOL_FORMAT}")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /MD ${SYMBOL_FORMAT_RELEASE}")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " /MD ${SYMBOL_FORMAT_RELEASE}")
unset(SYMBOL_FORMAT)
unset(SYMBOL_FORMAT_RELEASE)
# JMC is available on msvc 15.8 (1915) and up
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /JMC")

View File

@@ -9,14 +9,10 @@ if "%BUILD_WITH_SCCACHE%"=="1" (
if "%WITH_CLANG%"=="1" (
set CLANG_CMAKE_ARGS=-T"llvm"
if "%WITH_ASAN%"=="1" (
)
if "%WITH_ASAN%"=="1" (
set ASAN_CMAKE_ARGS=-DWITH_COMPILER_ASAN=On
)
) else (
if "%WITH_ASAN%"=="1" (
echo ASAN is only supported with clang.
exit /b 1
)
)
if "%WITH_PYDEBUG%"=="1" (

View File

@@ -46,16 +46,10 @@ set LLVM_DIR=
set CFLAGS=-m64 -fmsc-version=1914
set CXXFLAGS=-m64 -fmsc-version=1914
)
if "%WITH_ASAN%"=="1" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
)
)
if "%WITH_ASAN%"=="1" (
if "%WITH_CLANG%" == "" (
echo ASAN is only supported with clang.
exit /b 1
)
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
)
if NOT "%verbose%" == "" (

View File

@@ -61,4 +61,3 @@ def unregister():
if __name__ == "__main__":
register()

View File

@@ -553,7 +553,7 @@ def example_extract_docstring(filepath):
line_no += 1
else:
file.close()
return "", 0
return "", 0, False
for line in file:
line_no += 1
@@ -563,15 +563,17 @@ def example_extract_docstring(filepath):
text.append(line.rstrip())
line_no += 1
line_no_has_content = False
# Skip over blank lines so the Python code doesn't have blank lines at the top.
for line in file:
if line.strip():
line_no_has_content = True
break
line_no += 1
file.close()
return "\n".join(text), line_no
return "\n".join(text), line_no, line_no_has_content
def title_string(text, heading_char, double=False):
@@ -590,16 +592,18 @@ def write_example_ref(ident, fw, example_id, ext="py"):
filepath = os.path.join("..", "examples", "%s.%s" % (example_id, ext))
filepath_full = os.path.join(os.path.dirname(fw.__self__.name), filepath)
text, line_no = example_extract_docstring(filepath_full)
text, line_no, line_no_has_content = example_extract_docstring(filepath_full)
for line in text.split("\n"):
fw("%s\n" % (ident + line).rstrip())
fw("\n")
fw("%s.. literalinclude:: %s\n" % (ident, filepath))
if line_no > 0:
fw("%s :lines: %d-\n" % (ident, line_no))
fw("\n")
# Some files only contain a doc-string.
if line_no_has_content:
fw("%s.. literalinclude:: %s\n" % (ident, filepath))
if line_no > 0:
fw("%s :lines: %d-\n" % (ident, line_no))
fw("\n")
EXAMPLE_SET_USED.add(example_id)
else:
if bpy.app.debug:
@@ -1408,7 +1412,8 @@ def pyrna2sphinx(basepath):
else:
fw(" .. attribute:: %s\n\n" % prop.identifier)
if prop.description:
fw(" %s\n\n" % prop.description)
write_indented_lines(" ", fw, prop.description, False)
fw("\n")
# special exception, can't use generic code here for enums
if prop.type == "enum":

View File

@@ -109,3 +109,7 @@ endif()
if(WITH_MOD_FLUID)
add_subdirectory(mantaflow)
endif()
if (WITH_COMPOSITOR)
add_subdirectory(smaa_areatex)
endif()

View File

@@ -42,6 +42,7 @@ set(SRC
src/devices/NULLDevice.cpp
src/devices/ReadDevice.cpp
src/devices/SoftwareDevice.cpp
src/devices/ThreadedDevice.cpp
src/Exception.cpp
src/file/File.cpp
src/file/FileManager.cpp
@@ -148,6 +149,7 @@ set(PUBLIC_HDR
include/devices/NULLDevice.h
include/devices/ReadDevice.h
include/devices/SoftwareDevice.h
include/devices/ThreadedDevice.h
include/Exception.h
include/file/File.h
include/file/FileManager.h

View File

@@ -255,6 +255,7 @@ protected:
/**
* This function tells the device, to start or pause playback.
* \param playing True if device should playback.
* \note This method is only called when the device is locked.
*/
virtual void playing(bool playing)=0;

View File

@@ -0,0 +1,95 @@
/*******************************************************************************
* Copyright 2009-2016 Jörg Müller
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
#pragma once
/**
* @file ThreadedDevice.h
* @ingroup plugin
* The ThreadedDevice class.
*/
#include "devices/SoftwareDevice.h"
#include <thread>
AUD_NAMESPACE_BEGIN
/**
* This device extends the SoftwareDevice with code for running mixing in a separate thread.
*/
class AUD_PLUGIN_API ThreadedDevice : public SoftwareDevice
{
private:
/**
* Whether there is currently playback.
*/
bool m_playing;
/**
* Whether the current playback should stop.
*/
bool m_stop;
/**
* The streaming thread.
*/
std::thread m_thread;
/**
* Starts the streaming thread.
*/
AUD_LOCAL void start();
/**
* Streaming thread main function.
*/
AUD_LOCAL virtual void runMixingThread()=0;
// delete copy constructor and operator=
ThreadedDevice(const ThreadedDevice&) = delete;
ThreadedDevice& operator=(const ThreadedDevice&) = delete;
protected:
virtual void playing(bool playing);
/**
* Empty default constructor. To setup the device call the function create()
* and to uninitialize call destroy().
*/
ThreadedDevice();
/**
* Indicates that the mixing thread should be stopped.
* \return Whether the mixing thread should be stopping.
* \warning For thread safety, the device needs to be locked, when this method is called.
*/
inline bool shouldStop() { return m_stop; }
/**
* This method needs to be called when the mixing thread is stopping.
* \warning For thread safety, the device needs to be locked, when this method is called.
*/
inline void doStop() { m_stop = m_playing = false; }
/**
* Stops all playback and notifies the mixing thread to stop.
* \warning The device has to be unlocked to not run into a deadlock.
*/
void stopMixingThread();
};
AUD_NAMESPACE_END

View File

@@ -27,9 +27,9 @@ void PulseAudioDevice::PulseAudio_state_callback(pa_context *context, void *data
{
PulseAudioDevice* device = (PulseAudioDevice*)data;
device->m_state = AUD_pa_context_get_state(context);
std::lock_guard<ILockable> lock(*device);
AUD_pa_threaded_mainloop_signal(device->m_mainloop, 0);
device->m_state = AUD_pa_context_get_state(context);
}
void PulseAudioDevice::PulseAudio_request(pa_stream *stream, size_t num_bytes, void *data)
@@ -68,29 +68,40 @@ void PulseAudioDevice::PulseAudio_underflow(pa_stream *stream, void *data)
}
}
void PulseAudioDevice::playing(bool playing)
void PulseAudioDevice::runMixingThread()
{
m_playback = playing;
for(;;)
{
{
std::lock_guard<ILockable> lock(*this);
AUD_pa_stream_cork(m_stream, playing ? 0 : 1, nullptr, nullptr);
if(shouldStop())
{
AUD_pa_stream_cork(m_stream, 1, nullptr, nullptr);
doStop();
return;
}
}
if(AUD_pa_stream_is_corked(m_stream))
AUD_pa_stream_cork(m_stream, 0, nullptr, nullptr);
AUD_pa_mainloop_iterate(m_mainloop, true, nullptr);
}
}
PulseAudioDevice::PulseAudioDevice(std::string name, DeviceSpecs specs, int buffersize) :
m_playback(false),
m_state(PA_CONTEXT_UNCONNECTED),
m_buffersize(buffersize),
m_underflows(0)
{
m_mainloop = AUD_pa_threaded_mainloop_new();
m_mainloop = AUD_pa_mainloop_new();
AUD_pa_threaded_mainloop_lock(m_mainloop);
m_context = AUD_pa_context_new(AUD_pa_threaded_mainloop_get_api(m_mainloop), name.c_str());
m_context = AUD_pa_context_new(AUD_pa_mainloop_get_api(m_mainloop), name.c_str());
if(!m_context)
{
AUD_pa_threaded_mainloop_unlock(m_mainloop);
AUD_pa_threaded_mainloop_free(m_mainloop);
AUD_pa_mainloop_free(m_mainloop);
AUD_THROW(DeviceException, "Could not connect to PulseAudio.");
}
@@ -99,26 +110,21 @@ PulseAudioDevice::PulseAudioDevice(std::string name, DeviceSpecs specs, int buff
AUD_pa_context_connect(m_context, nullptr, PA_CONTEXT_NOFLAGS, nullptr);
AUD_pa_threaded_mainloop_start(m_mainloop);
while(m_state != PA_CONTEXT_READY)
{
switch(m_state)
{
case PA_CONTEXT_FAILED:
case PA_CONTEXT_TERMINATED:
AUD_pa_threaded_mainloop_unlock(m_mainloop);
AUD_pa_threaded_mainloop_stop(m_mainloop);
AUD_pa_context_disconnect(m_context);
AUD_pa_context_unref(m_context);
AUD_pa_threaded_mainloop_free(m_mainloop);
AUD_pa_mainloop_free(m_mainloop);
AUD_THROW(DeviceException, "Could not connect to PulseAudio.");
break;
default:
AUD_pa_threaded_mainloop_wait(m_mainloop);
AUD_pa_mainloop_iterate(m_mainloop, true, nullptr);
break;
}
}
@@ -166,13 +172,10 @@ PulseAudioDevice::PulseAudioDevice(std::string name, DeviceSpecs specs, int buff
if(!m_stream)
{
AUD_pa_threaded_mainloop_unlock(m_mainloop);
AUD_pa_threaded_mainloop_stop(m_mainloop);
AUD_pa_context_disconnect(m_context);
AUD_pa_context_unref(m_context);
AUD_pa_threaded_mainloop_free(m_mainloop);
AUD_pa_mainloop_free(m_mainloop);
AUD_THROW(DeviceException, "Could not create PulseAudio stream.");
}
@@ -188,32 +191,27 @@ PulseAudioDevice::PulseAudioDevice(std::string name, DeviceSpecs specs, int buff
buffer_attr.prebuf = -1U;
buffer_attr.tlength = buffersize;
if(AUD_pa_stream_connect_playback(m_stream, nullptr, &buffer_attr, static_cast<pa_stream_flags_t>(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE), nullptr, nullptr) < 0)
if(AUD_pa_stream_connect_playback(m_stream, nullptr, &buffer_attr, static_cast<pa_stream_flags_t>(PA_STREAM_START_CORKED | PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE), nullptr, nullptr) < 0)
{
AUD_pa_threaded_mainloop_unlock(m_mainloop);
AUD_pa_threaded_mainloop_stop(m_mainloop);
AUD_pa_context_disconnect(m_context);
AUD_pa_context_unref(m_context);
AUD_pa_threaded_mainloop_free(m_mainloop);
AUD_pa_mainloop_free(m_mainloop);
AUD_THROW(DeviceException, "Could not connect PulseAudio stream.");
}
AUD_pa_threaded_mainloop_unlock(m_mainloop);
create();
}
PulseAudioDevice::~PulseAudioDevice()
{
AUD_pa_threaded_mainloop_stop(m_mainloop);
stopMixingThread();
AUD_pa_context_disconnect(m_context);
AUD_pa_context_unref(m_context);
AUD_pa_threaded_mainloop_free(m_mainloop);
AUD_pa_mainloop_free(m_mainloop);
destroy();
}

View File

@@ -26,7 +26,7 @@
* The PulseAudioDevice class.
*/
#include "devices/SoftwareDevice.h"
#include "devices/ThreadedDevice.h"
#include <pulse/pulseaudio.h>
@@ -35,15 +35,10 @@ AUD_NAMESPACE_BEGIN
/**
* This device plays back through PulseAudio, the simple direct media layer.
*/
class AUD_PLUGIN_API PulseAudioDevice : public SoftwareDevice
class AUD_PLUGIN_API PulseAudioDevice : public ThreadedDevice
{
private:
/**
* Whether there is currently playback.
*/
volatile bool m_playback;
pa_threaded_mainloop* m_mainloop;
pa_mainloop* m_mainloop;
pa_context* m_context;
pa_stream* m_stream;
pa_context_state_t m_state;
@@ -74,13 +69,15 @@ private:
*/
AUD_LOCAL static void PulseAudio_underflow(pa_stream* stream, void* data);
/**
* Streaming thread main function.
*/
AUD_LOCAL void runMixingThread();
// delete copy constructor and operator=
PulseAudioDevice(const PulseAudioDevice&) = delete;
PulseAudioDevice& operator=(const PulseAudioDevice&) = delete;
protected:
virtual void playing(bool playing);
public:
/**
* Opens the PulseAudio audio device for playback.

View File

@@ -24,18 +24,14 @@ PULSEAUDIO_SYMBOL(pa_context_unref);
PULSEAUDIO_SYMBOL(pa_stream_begin_write);
PULSEAUDIO_SYMBOL(pa_stream_connect_playback);
PULSEAUDIO_SYMBOL(pa_stream_cork);
PULSEAUDIO_SYMBOL(pa_stream_is_corked);
PULSEAUDIO_SYMBOL(pa_stream_new);
PULSEAUDIO_SYMBOL(pa_stream_set_buffer_attr);
PULSEAUDIO_SYMBOL(pa_stream_set_underflow_callback);
PULSEAUDIO_SYMBOL(pa_stream_set_write_callback);
PULSEAUDIO_SYMBOL(pa_stream_write);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_free);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_get_api);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_lock);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_new);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_signal);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_start);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_stop);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_unlock);
PULSEAUDIO_SYMBOL(pa_threaded_mainloop_wait);
PULSEAUDIO_SYMBOL(pa_mainloop_free);
PULSEAUDIO_SYMBOL(pa_mainloop_get_api);
PULSEAUDIO_SYMBOL(pa_mainloop_new);
PULSEAUDIO_SYMBOL(pa_mainloop_iterate);

View File

@@ -31,63 +31,43 @@ template <class T> void SafeRelease(T **ppT)
}
}
void WASAPIDevice::start()
{
lock();
if(!m_playing)
{
if(m_thread.joinable())
m_thread.join();
m_playing = true;
m_thread = std::thread(&WASAPIDevice::updateStream, this);
}
unlock();
}
void WASAPIDevice::updateStream()
void WASAPIDevice::runMixingThread()
{
UINT32 buffer_size;
UINT32 padding;
UINT32 length;
data_t* buffer;
if(FAILED(m_audio_client->GetBufferSize(&buffer_size)))
return;
IAudioRenderClient* render_client = nullptr;
const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
if(FAILED(m_audio_client->GetService(IID_IAudioRenderClient, reinterpret_cast<void**>(&render_client))))
return;
UINT32 padding;
if(FAILED(m_audio_client->GetCurrentPadding(&padding)))
{
SafeRelease(&render_client);
return;
}
std::lock_guard<ILockable> lock(*this);
UINT32 length = buffer_size - padding;
const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
if(FAILED(render_client->GetBuffer(length, &buffer)))
{
SafeRelease(&render_client);
return;
}
if(FAILED(m_audio_client->GetBufferSize(&buffer_size)))
goto init_error;
lock();
if(FAILED(m_audio_client->GetService(IID_IAudioRenderClient, reinterpret_cast<void**>(&render_client))))
goto init_error;
mix((data_t*)buffer, length);
if(FAILED(m_audio_client->GetCurrentPadding(&padding)))
goto init_error;
unlock();
length = buffer_size - padding;
if(FAILED(render_client->ReleaseBuffer(length, 0)))
{
SafeRelease(&render_client);
return;
if(FAILED(render_client->GetBuffer(length, &buffer)))
goto init_error;
mix((data_t*)buffer, length);
if(FAILED(render_client->ReleaseBuffer(length, 0)))
{
init_error:
SafeRelease(&render_client);
doStop();
return;
}
}
m_audio_client->Start();
@@ -96,58 +76,38 @@ void WASAPIDevice::updateStream()
for(;;)
{
if(FAILED(m_audio_client->GetCurrentPadding(&padding)))
{
m_audio_client->Stop();
SafeRelease(&render_client);
return;
}
std::lock_guard<ILockable> lock(*this);
length = buffer_size - padding;
if(FAILED(m_audio_client->GetCurrentPadding(&padding)))
goto stop_thread;
if(FAILED(render_client->GetBuffer(length, &buffer)))
{
m_audio_client->Stop();
SafeRelease(&render_client);
return;
}
length = buffer_size - padding;
lock();
if(FAILED(render_client->GetBuffer(length, &buffer)))
goto stop_thread;
mix((data_t*)buffer, length);
mix((data_t*)buffer, length);
unlock();
if(FAILED(render_client->ReleaseBuffer(length, 0)))
goto stop_thread;
if(FAILED(render_client->ReleaseBuffer(length, 0)))
{
m_audio_client->Stop();
SafeRelease(&render_client);
return;
}
// stop thread
if(!m_playing)
{
m_audio_client->Stop();
SafeRelease(&render_client);
return;
// stop thread
if(shouldStop())
{
stop_thread:
m_audio_client->Stop();
SafeRelease(&render_client);
doStop();
return;
}
}
std::this_thread::sleep_for(sleepDuration);
}
}
void WASAPIDevice::playing(bool playing)
{
if(!m_playing && playing)
start();
else
m_playing = playing;
}
WASAPIDevice::WASAPIDevice(DeviceSpecs specs, int buffersize) :
m_playing(false),
m_imm_device_enumerator(nullptr),
m_imm_device(nullptr),
m_audio_client(nullptr),
@@ -325,14 +285,7 @@ WASAPIDevice::WASAPIDevice(DeviceSpecs specs, int buffersize) :
WASAPIDevice::~WASAPIDevice()
{
lock();
stopAll();
unlock();
if(m_thread.joinable())
m_thread.join();
stopMixingThread();
SafeRelease(&m_audio_client);
SafeRelease(&m_imm_device);

View File

@@ -26,7 +26,7 @@
* The WASAPIDevice class.
*/
#include "devices/SoftwareDevice.h"
#include "devices/ThreadedDevice.h"
#include <thread>
@@ -40,41 +40,23 @@ AUD_NAMESPACE_BEGIN
/**
* This device plays back through WASAPI, the Windows audio API.
*/
class AUD_PLUGIN_API WASAPIDevice : public SoftwareDevice
class AUD_PLUGIN_API WASAPIDevice : public ThreadedDevice
{
private:
/**
* Whether there is currently playback.
*/
bool m_playing;
IMMDeviceEnumerator* m_imm_device_enumerator;
IMMDevice* m_imm_device;
IAudioClient* m_audio_client;
WAVEFORMATEXTENSIBLE m_wave_format_extensible;
/**
* The streaming thread.
*/
std::thread m_thread;
/**
* Starts the streaming thread.
*/
AUD_LOCAL void start();
/**
* Streaming thread main function.
*/
AUD_LOCAL void updateStream();
AUD_LOCAL void runMixingThread();
// delete copy constructor and operator=
WASAPIDevice(const WASAPIDevice&) = delete;
WASAPIDevice& operator=(const WASAPIDevice&) = delete;
protected:
virtual void playing(bool playing);
public:
/**
* Opens the WASAPI audio device for playback.

View File

@@ -737,7 +737,7 @@ void SoftwareDevice::mix(data_t* buffer, int length)
{
m_buffer.assureSize(length * AUD_SAMPLE_SIZE(m_specs));
std::lock_guard<std::recursive_mutex> lock(m_mutex);
std::lock_guard<ILockable> lock(*this);
{
std::shared_ptr<SoftwareDevice::SoftwareHandle> sound;
@@ -880,7 +880,7 @@ std::shared_ptr<IHandle> SoftwareDevice::play(std::shared_ptr<IReader> reader, b
// play sound
std::shared_ptr<SoftwareDevice::SoftwareHandle> sound = std::shared_ptr<SoftwareDevice::SoftwareHandle>(new SoftwareDevice::SoftwareHandle(this, reader, pitch, resampler, mapper, keep));
std::lock_guard<std::recursive_mutex> lock(m_mutex);
std::lock_guard<ILockable> lock(*this);
m_playingSounds.push_back(sound);
@@ -897,7 +897,7 @@ std::shared_ptr<IHandle> SoftwareDevice::play(std::shared_ptr<ISound> sound, boo
void SoftwareDevice::stopAll()
{
std::lock_guard<std::recursive_mutex> lock(m_mutex);
std::lock_guard<ILockable> lock(*this);
while(!m_playingSounds.empty())
m_playingSounds.front()->stop();

View File

@@ -0,0 +1,65 @@
/*******************************************************************************
* Copyright 2009-2016 Jörg Müller
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
#include "devices/ThreadedDevice.h"
#include <mutex>
AUD_NAMESPACE_BEGIN
void ThreadedDevice::start()
{
std::lock_guard<ILockable> lock(*this);
// thread is still running, we can abort stopping it
if(m_stop)
m_stop = false;
// thread is not running, let's start it
else if(!m_playing)
{
if(m_thread.joinable())
m_thread.join();
m_playing = true;
m_thread = std::thread(&ThreadedDevice::runMixingThread, this);
}
}
void ThreadedDevice::playing(bool playing)
{
if((!m_playing || m_stop) && playing)
start();
else
m_stop = true;
}
ThreadedDevice::ThreadedDevice() :
m_playing(false),
m_stop(false)
{
}
void aud::ThreadedDevice::stopMixingThread()
{
stopAll();
if(m_thread.joinable())
m_thread.join();
}
AUD_NAMESPACE_END

26
extern/smaa_areatex/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,26 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2017, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): IRIE Shinsuke
#
# ***** END GPL LICENSE BLOCK *****
add_executable(smaa_areatex smaa_areatex.cpp)

5
extern/smaa_areatex/README.blender vendored Normal file
View File

@@ -0,0 +1,5 @@
Project: smaa-cpp
URL: https://github.com/iRi-E/smaa-cpp
License: MIT
Upstream version: 0.4.0
Local modifications:

1208
extern/smaa_areatex/smaa_areatex.cpp vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,7 @@
#include <assert.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -1409,15 +1409,15 @@ class CYCLES_LIGHT_PT_nodes(CyclesButtonsPanel, Panel):
panel_node_draw(layout, light, 'OUTPUT_LIGHT', 'Surface')
class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel):
bl_label = "Spot Shape"
class CYCLES_LIGHT_PT_beam_shape(CyclesButtonsPanel, Panel):
bl_label = "Beam Shape"
bl_parent_id = "CYCLES_LIGHT_PT_light"
bl_context = "data"
@classmethod
def poll(cls, context):
light = context.light
return (light and light.type == 'SPOT') and CyclesButtonsPanel.poll(context)
if context.light.type in {'SPOT', 'AREA'}:
return context.light and CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
@@ -1425,9 +1425,12 @@ class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel):
layout.use_property_split = True
col = layout.column()
col.prop(light, "spot_size", text="Size")
col.prop(light, "spot_blend", text="Blend", slider=True)
col.prop(light, "show_cone")
if light.type == 'SPOT':
col.prop(light, "spot_size", text="Spot Size")
col.prop(light, "spot_blend", text="Blend", slider=True)
col.prop(light, "show_cone")
elif light.type == 'AREA':
col.prop(light, "spread", text="Spread")
class CYCLES_WORLD_PT_preview(CyclesButtonsPanel, Panel):
@@ -2284,7 +2287,7 @@ classes = (
CYCLES_LIGHT_PT_preview,
CYCLES_LIGHT_PT_light,
CYCLES_LIGHT_PT_nodes,
CYCLES_LIGHT_PT_spot,
CYCLES_LIGHT_PT_beam_shape,
CYCLES_WORLD_PT_preview,
CYCLES_WORLD_PT_surface,
CYCLES_WORLD_PT_volume,
@@ -2314,7 +2317,7 @@ classes = (
node_panel(CYCLES_WORLD_PT_settings_surface),
node_panel(CYCLES_WORLD_PT_settings_volume),
node_panel(CYCLES_LIGHT_PT_light),
node_panel(CYCLES_LIGHT_PT_spot),
node_panel(CYCLES_LIGHT_PT_beam_shape)
)

View File

@@ -29,7 +29,7 @@ BlenderImageLoader::BlenderImageLoader(BL::Image b_image, int frame)
{
}
bool BlenderImageLoader::load_metadata(ImageMetaData &metadata)
bool BlenderImageLoader::load_metadata(const ImageDeviceFeatures &, ImageMetaData &metadata)
{
metadata.width = b_image.size()[0];
metadata.height = b_image.size()[1];
@@ -171,7 +171,7 @@ BlenderPointDensityLoader::BlenderPointDensityLoader(BL::Depsgraph b_depsgraph,
{
}
bool BlenderPointDensityLoader::load_metadata(ImageMetaData &metadata)
bool BlenderPointDensityLoader::load_metadata(const ImageDeviceFeatures &, ImageMetaData &metadata)
{
metadata.channels = 4;
metadata.width = b_node.resolution();

View File

@@ -27,7 +27,7 @@ class BlenderImageLoader : public ImageLoader {
public:
BlenderImageLoader(BL::Image b_image, int frame);
bool load_metadata(ImageMetaData &metadata) override;
bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) override;
bool load_pixels(const ImageMetaData &metadata,
void *pixels,
const size_t pixels_size,
@@ -44,7 +44,7 @@ class BlenderPointDensityLoader : public ImageLoader {
public:
BlenderPointDensityLoader(BL::Depsgraph depsgraph, BL::ShaderNodeTexPointDensity b_node);
bool load_metadata(ImageMetaData &metadata) override;
bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) override;
bool load_pixels(const ImageMetaData &metadata,
void *pixels,
const size_t pixels_size,

View File

@@ -82,6 +82,7 @@ void BlenderSync::sync_light(BL::Object &b_parent,
light->set_axisu(transform_get_column(&tfm, 0));
light->set_axisv(transform_get_column(&tfm, 1));
light->set_sizeu(b_area_light.size());
light->set_spread(b_area_light.spread());
switch (b_area_light.shape()) {
case BL::AreaLight::shape_SQUARE:
light->set_sizev(light->get_sizeu());

View File

@@ -375,7 +375,7 @@ static void attr_create_generic(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, bool
case BL::Attribute::domain_POINT:
element = ATTR_ELEMENT_VERTEX;
break;
case BL::Attribute::domain_POLYGON:
case BL::Attribute::domain_FACE:
element = ATTR_ELEMENT_FACE;
break;
default:

View File

@@ -41,7 +41,7 @@ class BlenderSmokeLoader : public ImageLoader {
mesh_texture_space(b_mesh, texspace_loc, texspace_size);
}
bool load_metadata(ImageMetaData &metadata) override
bool load_metadata(const ImageDeviceFeatures &, ImageMetaData &metadata) override
{
if (!b_domain) {
return false;

View File

@@ -619,6 +619,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices,
info.num = 0;
info.has_half_images = true;
info.has_nanovdb = true;
info.has_volume_decoupled = true;
info.has_branched_path = true;
info.has_adaptive_stop_per_sample = true;
@@ -665,6 +666,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices,
/* Accumulate device info. */
info.has_half_images &= device.has_half_images;
info.has_nanovdb &= device.has_nanovdb;
info.has_volume_decoupled &= device.has_volume_decoupled;
info.has_branched_path &= device.has_branched_path;
info.has_adaptive_stop_per_sample &= device.has_adaptive_stop_per_sample;

View File

@@ -78,6 +78,7 @@ class DeviceInfo {
int num;
bool display_device; /* GPU is used as a display device. */
bool has_half_images; /* Support half-float textures. */
bool has_nanovdb; /* Support NanoVDB volumes. */
bool has_volume_decoupled; /* Decoupled volume shading. */
bool has_branched_path; /* Supports branched path tracing. */
bool has_adaptive_stop_per_sample; /* Per-sample adaptive sampling stopping. */
@@ -99,6 +100,7 @@ class DeviceInfo {
cpu_threads = 0;
display_device = false;
has_half_images = false;
has_nanovdb = false;
has_volume_decoupled = false;
has_branched_path = true;
has_adaptive_stop_per_sample = false;

View File

@@ -1654,6 +1654,7 @@ void device_cpu_info(vector<DeviceInfo> &devices)
info.has_adaptive_stop_per_sample = true;
info.has_osl = true;
info.has_half_images = true;
info.has_nanovdb = true;
info.has_profiling = true;
info.denoisers = DENOISER_NLM;
if (openimagedenoise_supported()) {

View File

@@ -128,6 +128,7 @@ void device_cuda_info(vector<DeviceInfo> &devices)
info.num = num;
info.has_half_images = (major >= 3);
info.has_nanovdb = true;
info.has_volume_decoupled = false;
info.has_adaptive_stop_per_sample = false;
info.denoisers = DENOISER_NLM;

View File

@@ -46,10 +46,13 @@ class MultiDevice : public Device {
list<SubDevice> devices, denoising_devices;
device_ptr unique_key;
vector<vector<SubDevice *>> peer_islands;
bool use_denoising;
bool matching_rendering_and_denoising_devices;
MultiDevice(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background_)
: Device(info, stats, profiler, background_), unique_key(1)
: Device(info, stats, profiler, background_),
unique_key(1),
use_denoising(!info.denoising_devices.empty())
{
foreach (DeviceInfo &subinfo, info.multi_devices) {
/* Always add CPU devices at the back since GPU devices can change
@@ -194,6 +197,7 @@ class MultiDevice : public Device {
if (!sub.device->load_kernels(requested_features))
return false;
use_denoising = requested_features.use_denoising;
if (requested_features.use_denoising) {
/* Only need denoising feature, everything else is unused. */
DeviceRequestedFeatures denoising_features;
@@ -400,7 +404,7 @@ class MultiDevice : public Device {
size_t existing_size = mem.device_size;
/* The tile buffers are allocated on each device (see below), so copy to all of them */
if (strcmp(mem.name, "RenderBuffers") == 0) {
if (strcmp(mem.name, "RenderBuffers") == 0 && use_denoising) {
foreach (SubDevice &sub, devices) {
mem.device = sub.device;
mem.device_pointer = (existing_key) ? sub.ptr_map[existing_key] : 0;
@@ -466,7 +470,7 @@ class MultiDevice : public Device {
/* This is a hack to only allocate the tile buffers on denoising devices
* Similarly the tile buffers also need to be allocated separately on all devices so any
* overlap rendered for denoising does not interfere with each other */
if (strcmp(mem.name, "RenderBuffers") == 0) {
if (strcmp(mem.name, "RenderBuffers") == 0 && use_denoising) {
vector<device_ptr> device_pointers;
device_pointers.reserve(devices.size());
@@ -518,7 +522,7 @@ class MultiDevice : public Device {
size_t existing_size = mem.device_size;
/* Free memory that was allocated for all devices (see above) on each device */
if (strcmp(mem.name, "RenderBuffers") == 0 || mem.type == MEM_PIXELS) {
if (mem.type == MEM_PIXELS || (strcmp(mem.name, "RenderBuffers") == 0 && use_denoising)) {
foreach (SubDevice &sub, devices) {
mem.device = sub.device;
mem.device_pointer = sub.ptr_map[key];

View File

@@ -126,6 +126,9 @@ void device_opencl_info(vector<DeviceInfo> &devices)
/* Check OpenCL extensions */
info.has_half_images = platform_device.device_extensions.find("cl_khr_fp16") != string::npos;
/* Disabled for now due to apparent AMD driver bug. */
info.has_nanovdb = platform_name != "AMD Accelerated Parallel Processing";
devices.push_back(info);
num_devices++;
}

View File

@@ -2036,7 +2036,9 @@ string OpenCLDevice::kernel_build_options(const string *debug_src)
# endif
# ifdef WITH_NANOVDB
build_options += "-DWITH_NANOVDB ";
if (info.has_nanovdb) {
build_options += "-DWITH_NANOVDB ";
}
# endif
return build_options;

View File

@@ -119,11 +119,11 @@ ccl_device_inline bool lamp_light_sample(
klight->area.axisu[0], klight->area.axisu[1], klight->area.axisu[2]);
float3 axisv = make_float3(
klight->area.axisv[0], klight->area.axisv[1], klight->area.axisv[2]);
float3 D = make_float3(klight->area.dir[0], klight->area.dir[1], klight->area.dir[2]);
float3 Ng = make_float3(klight->area.dir[0], klight->area.dir[1], klight->area.dir[2]);
float invarea = fabsf(klight->area.invarea);
bool is_round = (klight->area.invarea < 0.0f);
if (dot(ls->P - P, D) > 0.0f) {
if (dot(ls->P - P, Ng) > 0.0f) {
return false;
}
@@ -135,20 +135,37 @@ ccl_device_inline bool lamp_light_sample(
ls->pdf = invarea;
}
else {
float3 sample_axisu = axisu;
float3 sample_axisv = axisv;
if (klight->area.tan_spread > 0.0f) {
if (!light_spread_clamp_area_light(
P, Ng, &ls->P, &sample_axisu, &sample_axisv, klight->area.tan_spread)) {
return false;
}
}
inplane = ls->P;
ls->pdf = rect_light_sample(P, &ls->P, axisu, axisv, randu, randv, true);
ls->pdf = rect_light_sample(P, &ls->P, sample_axisu, sample_axisv, randu, randv, true);
inplane = ls->P - inplane;
}
ls->u = dot(inplane, axisu) * (1.0f / dot(axisu, axisu)) + 0.5f;
ls->v = dot(inplane, axisv) * (1.0f / dot(axisv, axisv)) + 0.5f;
ls->Ng = D;
ls->Ng = Ng;
ls->D = normalize_len(ls->P - P, &ls->t);
ls->eval_fac = 0.25f * invarea;
if (klight->area.tan_spread > 0.0f) {
/* Area Light spread angle attenuation */
ls->eval_fac *= light_spread_attenuation(
ls->D, ls->Ng, klight->area.tan_spread, klight->area.normalize_spread);
}
if (is_round) {
ls->pdf *= lamp_light_pdf(kg, D, -ls->D, ls->t);
ls->pdf *= lamp_light_pdf(kg, Ng, -ls->D, ls->t);
}
}
}
@@ -283,9 +300,28 @@ ccl_device bool lamp_light_eval(
ls->pdf = invarea * lamp_light_pdf(kg, Ng, -D, ls->t);
}
else {
ls->pdf = rect_light_sample(P, &light_P, axisu, axisv, 0, 0, false);
float3 sample_axisu = axisu;
float3 sample_axisv = axisv;
if (klight->area.tan_spread > 0.0f) {
if (!light_spread_clamp_area_light(
P, Ng, &light_P, &sample_axisu, &sample_axisv, klight->area.tan_spread)) {
return false;
}
}
ls->pdf = rect_light_sample(P, &light_P, sample_axisu, sample_axisv, 0, 0, false);
}
ls->eval_fac = 0.25f * invarea;
if (klight->area.tan_spread > 0.0f) {
/* Area Light spread angle attenuation */
ls->eval_fac *= light_spread_attenuation(
ls->D, ls->Ng, klight->area.tan_spread, klight->area.normalize_spread);
if (ls->eval_fac == 0.0f) {
return false;
}
}
}
else {
return false;

View File

@@ -146,6 +146,70 @@ ccl_device float spot_light_attenuation(float3 dir, float spot_angle, float spot
return attenuation;
}
ccl_device float light_spread_attenuation(const float3 D,
const float3 lightNg,
const float tan_spread,
const float normalize_spread)
{
/* Model a soft-box grid, computing the ratio of light not hidden by the
* slats of the grid at a given angle. (see D10594). */
const float cos_a = -dot(D, lightNg);
const float sin_a = safe_sqrtf(1.0f - sqr(cos_a));
const float tan_a = sin_a / cos_a;
return max((1.0f - (tan_spread * tan_a)) * normalize_spread, 0.0f);
}
/* Compute subset of area light that actually has an influence on the shading point, to
* reduce noise with low spread. */
ccl_device bool light_spread_clamp_area_light(const float3 P,
const float3 lightNg,
float3 *lightP,
float3 *axisu,
float3 *axisv,
const float tan_spread)
{
/* Closest point in area light plane and distance to that plane. */
const float3 closest_P = P - dot(lightNg, P - *lightP) * lightNg;
const float t = len(closest_P - P);
/* Radius of circle on area light that actually affects the shading point. */
const float radius = t / tan_spread;
/* TODO: would be faster to store as normalized vector + length, also in rect_light_sample. */
float len_u, len_v;
const float3 u = normalize_len(*axisu, &len_u);
const float3 v = normalize_len(*axisv, &len_v);
/* Local uv coordinates of closest point. */
const float closest_u = dot(u, closest_P - *lightP);
const float closest_v = dot(v, closest_P - *lightP);
/* Compute rectangle encompassing the circle that affects the shading point,
* clamped to the bounds of the area light. */
const float min_u = max(closest_u - radius, -len_u * 0.5f);
const float max_u = min(closest_u + radius, len_u * 0.5f);
const float min_v = max(closest_v - radius, -len_v * 0.5f);
const float max_v = min(closest_v + radius, len_v * 0.5f);
/* Skip if rectangle is empty. */
if (min_u >= max_u || min_v >= max_v) {
return false;
}
/* Compute new area light center position and axes from rectangle in local
* uv coordinates. */
const float new_center_u = 0.5f * (min_u + max_u);
const float new_center_v = 0.5f * (min_v + max_v);
const float new_len_u = 0.5f * (max_u - min_u);
const float new_len_v = 0.5f * (max_v - min_v);
*lightP = *lightP + new_center_u * u + new_center_v * v;
*axisu = u * new_len_u * 2.0f;
*axisv = v * new_len_v * 2.0f;
return true;
}
ccl_device float lamp_light_pdf(KernelGlobals *kg, const float3 Ng, const float3 I, float t)
{
float cos_pi = dot(Ng, I);

View File

@@ -1501,9 +1501,9 @@ typedef struct KernelAreaLight {
float axisu[3];
float invarea;
float axisv[3];
float pad1;
float tan_spread;
float dir[3];
float pad2;
float normalize_spread;
} KernelAreaLight;
typedef struct KernelDistantLight {

View File

@@ -88,6 +88,13 @@ point wrap(point value, point max, point min)
wrap(value[2], max[2], min[2]));
}
/* Built in OSL faceforward is `(dot(I, Nref) > 0) ? -N : N;` which is different to
* GLSL `dot(Nref, I) < 0 ? N : -N` for zero values. */
point compatible_faceforward(point vec, point incident, point reference)
{
return dot(reference, incident) < 0.0 ? vec : -vec;
}
matrix euler_to_mat(point euler)
{
float cx = cos(euler[0]);

View File

@@ -46,6 +46,12 @@ shader node_vector_math(string math_type = "add",
else if (math_type == "reflect") {
Vector = reflect(Vector1, normalize(Vector2));
}
else if (math_type == "refract") {
Vector = refract(Vector1, normalize(Vector2), Scale);
}
else if (math_type == "faceforward") {
Vector = compatible_faceforward(Vector1, Vector2, Vector3);
}
else if (math_type == "dot_product") {
Value = dot(Vector1, Vector2);
}

View File

@@ -44,26 +44,26 @@ ccl_device void svm_node_vector_math(KernelGlobals *kg,
int *offset)
{
uint value_stack_offset, vector_stack_offset;
uint a_stack_offset, b_stack_offset, scale_stack_offset;
uint a_stack_offset, b_stack_offset, param1_stack_offset;
svm_unpack_node_uchar3(
inputs_stack_offsets, &a_stack_offset, &b_stack_offset, &scale_stack_offset);
inputs_stack_offsets, &a_stack_offset, &b_stack_offset, &param1_stack_offset);
svm_unpack_node_uchar2(outputs_stack_offsets, &value_stack_offset, &vector_stack_offset);
float3 a = stack_load_float3(stack, a_stack_offset);
float3 b = stack_load_float3(stack, b_stack_offset);
float3 c = make_float3(0.0f, 0.0f, 0.0f);
float scale = stack_load_float(stack, scale_stack_offset);
float param1 = stack_load_float(stack, param1_stack_offset);
float value;
float3 vector;
/* 3 Vector Operators */
if (type == NODE_VECTOR_MATH_WRAP) {
if (type == NODE_VECTOR_MATH_WRAP || type == NODE_VECTOR_MATH_FACEFORWARD) {
uint4 extra_node = read_node(kg, offset);
c = stack_load_float3(stack, extra_node.x);
}
svm_vector_math(&value, &vector, (NodeVectorMathType)type, a, b, c, scale);
svm_vector_math(&value, &vector, (NodeVectorMathType)type, a, b, c, param1);
if (stack_valid(value_stack_offset))
stack_store_float(stack, value_stack_offset, value);

View File

@@ -22,7 +22,7 @@ ccl_device void svm_vector_math(float *value,
float3 a,
float3 b,
float3 c,
float scale)
float param1)
{
switch (type) {
case NODE_VECTOR_MATH_ADD:
@@ -46,6 +46,12 @@ ccl_device void svm_vector_math(float *value,
case NODE_VECTOR_MATH_REFLECT:
*vector = reflect(a, b);
break;
case NODE_VECTOR_MATH_REFRACT:
*vector = refract(a, normalize(b), param1);
break;
case NODE_VECTOR_MATH_FACEFORWARD:
*vector = faceforward(a, b, c);
break;
case NODE_VECTOR_MATH_DOT_PRODUCT:
*value = dot(a, b);
break;
@@ -56,7 +62,7 @@ ccl_device void svm_vector_math(float *value,
*value = len(a);
break;
case NODE_VECTOR_MATH_SCALE:
*vector = a * scale;
*vector = a * param1;
break;
case NODE_VECTOR_MATH_NORMALIZE:
*vector = safe_normalize(a);
@@ -98,7 +104,7 @@ ccl_device void svm_vector_math(float *value,
*vector = make_float3(tanf(a.x), tanf(a.y), tanf(a.z));
break;
default:
*vector = make_float3(0.0f, 0.0f, 0.0f);
*vector = zero_float3();
*value = 0.0f;
}
}
@@ -236,10 +242,15 @@ ccl_device float3 svm_math_blackbody_color(float t)
return make_float3(4.70366907f, 0.0f, 0.0f);
}
int i = (t >= 6365.0f) ?
5 :
(t >= 3315.0f) ? 4 :
(t >= 1902.0f) ? 3 : (t >= 1449.0f) ? 2 : (t >= 1167.0f) ? 1 : 0;
/* Manually align for readability. */
/* clang-format off */
int i = (t >= 6365.0f) ? 5 :
(t >= 3315.0f) ? 4 :
(t >= 1902.0f) ? 3 :
(t >= 1449.0f) ? 2 :
(t >= 1167.0f) ? 1 :
0;
/* clang-format on */
ccl_constant float *r = blackbody_table_r[i];
ccl_constant float *g = blackbody_table_g[i];

View File

@@ -339,6 +339,8 @@ typedef enum NodeVectorMathType {
NODE_VECTOR_MATH_SINE,
NODE_VECTOR_MATH_COSINE,
NODE_VECTOR_MATH_TANGENT,
NODE_VECTOR_MATH_REFRACT,
NODE_VECTOR_MATH_FACEFORWARD,
} NodeVectorMathType;
typedef enum NodeClampType {

View File

@@ -396,6 +396,10 @@ static void add_uvs(AlembicProcedural *proc,
ccl::set<chrono_t> times = get_relevant_sample_times(proc, time_sampling, uvs.getNumSamples());
/* Keys used to determine if the UVs do actually change over time. */
ArraySample::Key previous_indices_key;
ArraySample::Key previous_values_key;
foreach (chrono_t time, times) {
if (progress.get_cancel()) {
return;
@@ -422,21 +426,32 @@ static void add_uvs(AlembicProcedural *proc,
float2 *data_float2 = reinterpret_cast<float2 *>(data.data());
const unsigned int *indices = uvsample.getIndices()->get();
const V2f *values = uvsample.getVals()->get();
const ArraySample::Key indices_key = uvsample.getIndices()->getKey();
const ArraySample::Key values_key = uvsample.getVals()->getKey();
for (const int3 &loop : *triangles_loops) {
unsigned int v0 = indices[loop.x];
unsigned int v1 = indices[loop.y];
unsigned int v2 = indices[loop.z];
if (indices_key == previous_indices_key && values_key == previous_values_key) {
attr.data.reuse_data_for_last_time(time);
}
else {
const unsigned int *indices = uvsample.getIndices()->get();
const V2f *values = uvsample.getVals()->get();
data_float2[0] = make_float2(values[v0][0], values[v0][1]);
data_float2[1] = make_float2(values[v1][0], values[v1][1]);
data_float2[2] = make_float2(values[v2][0], values[v2][1]);
data_float2 += 3;
for (const int3 &loop : *triangles_loops) {
unsigned int v0 = indices[loop.x];
unsigned int v1 = indices[loop.y];
unsigned int v2 = indices[loop.z];
data_float2[0] = make_float2(values[v0][0], values[v0][1]);
data_float2[1] = make_float2(values[v1][0], values[v1][1]);
data_float2[2] = make_float2(values[v2][0], values[v2][1]);
data_float2 += 3;
}
attr.data.add_data(data, time);
}
attr.data.add_data(data, time);
previous_indices_key = indices_key;
previous_values_key = values_key;
}
}
@@ -736,6 +751,11 @@ void AlembicObject::load_all_data(AlembicProcedural *proc,
ccl::set<chrono_t> times = get_relevant_sample_times(
proc, *time_sampling, schema.getNumSamples());
/* Key used to determine if the triangles change over time, if the key is the same as the
* last one, we can avoid creating a new entry in the cache and simply point to the last
* frame. */
ArraySample::Key previous_key;
/* read topology */
foreach (chrono_t time, times) {
if (progress.get_cancel()) {
@@ -747,22 +767,27 @@ void AlembicObject::load_all_data(AlembicProcedural *proc,
add_positions(sample.getPositions(), time, cached_data);
/* Only copy triangles for other frames if the topology is changing over time as well.
*
* TODO(@kevindietrich): even for dynamic simulations, this is a waste of memory and
* processing time if only the positions are changing in a subsequence of frames but we
* cannot optimize in this current system if the attributes are changing over time as well,
* as we need valid data for each time point. This can be solved by using reference counting
* on the ccl::array and simply share the array across frames. */
/* Only copy triangles for other frames if the topology is changing over time as well. */
if (schema.getTopologyVariance() != kHomogenousTopology || cached_data.triangles.size() == 0) {
/* start by reading the face sets (per face shader), as we directly split polygons to
* triangles
*/
array<int> polygon_to_shader;
read_face_sets(schema, polygon_to_shader, iss);
const ArraySample::Key key = sample.getFaceIndices()->getKey();
add_triangles(
sample.getFaceCounts(), sample.getFaceIndices(), time, cached_data, polygon_to_shader);
if (key == previous_key) {
cached_data.triangles.reuse_data_for_last_time(time);
cached_data.triangles_loops.reuse_data_for_last_time(time);
cached_data.shader.reuse_data_for_last_time(time);
}
else {
/* start by reading the face sets (per face shader), as we directly split polygons to
* triangles
*/
array<int> polygon_to_shader;
read_face_sets(schema, polygon_to_shader, iss);
add_triangles(
sample.getFaceCounts(), sample.getFaceIndices(), time, cached_data, polygon_to_shader);
}
previous_key = key;
}
if (normals.valid()) {
@@ -1382,6 +1407,15 @@ void AlembicProcedural::generate(Scene *scene, Progress &progress)
need_data_updates = true;
}
/* Check if the shaders were modified. */
if (object->used_shaders_is_modified() && object->get_object() &&
object->get_object()->get_geometry()) {
Geometry *geometry = object->get_object()->get_geometry();
array<Node *> used_shaders = object->get_used_shaders();
geometry->set_used_shaders(used_shaders);
need_shader_updates = true;
}
/* Check for changes in shaders (e.g. newly requested attributes). */
foreach (Node *shader_node, object->get_used_shaders()) {
Shader *shader = static_cast<Shader *>(shader_node);
@@ -1561,6 +1595,11 @@ void AlembicProcedural::read_mesh(AlembicObject *abc_object, Abc::chrono_t frame
Mesh *mesh = static_cast<Mesh *>(object->get_geometry());
/* Make sure shader ids are also updated. */
if (mesh->used_shaders_is_modified()) {
mesh->tag_shader_modified();
}
cached_data.vertices.copy_to_socket(frame_time, mesh, mesh->get_verts_socket());
cached_data.shader.copy_to_socket(frame_time, mesh, mesh->get_shader_socket());
@@ -1628,6 +1667,11 @@ void AlembicProcedural::read_subd(AlembicObject *abc_object, Abc::chrono_t frame
Mesh *mesh = static_cast<Mesh *>(object->get_geometry());
/* Make sure shader ids are also updated. */
if (mesh->used_shaders_is_modified()) {
mesh->tag_shader_modified();
}
/* Cycles overwrites the original triangles when computing displacement, so we always have to
* repass the data if something is animated (vertices most likely) to avoid buffer overflows. */
if (!cached_data.is_constant()) {
@@ -1718,6 +1762,11 @@ void AlembicProcedural::read_curves(AlembicObject *abc_object, Abc::chrono_t fra
Hair *hair = static_cast<Hair *>(object->get_geometry());
/* Make sure shader ids are also updated. */
if (hair->used_shaders_is_modified()) {
hair->tag_curve_shader_modified();
}
cached_data.curve_keys.copy_to_socket(frame_time, hair, hair->get_curve_keys_socket());
cached_data.curve_radius.copy_to_socket(frame_time, hair, hair->get_curve_radius_socket());

View File

@@ -43,14 +43,14 @@ struct MatrixSamplesData {
Alembic::AbcCoreAbstract::TimeSamplingPtr time_sampling;
};
/* Helpers to detect if some type is a ccl::array. */
/* Helpers to detect if some type is a `ccl::array`. */
template<typename> struct is_array : public std::false_type {
};
template<typename T> struct is_array<array<T>> : public std::true_type {
};
/* Holds the data for a cache lookup at a given time, as well as informations to
/* Holds the data for a cache lookup at a given time, as well as information to
* help disambiguate successes or failures to get data from the cache. */
template<typename T> class CacheLookupResult {
enum class State {
@@ -128,12 +128,25 @@ template<typename T> class CacheLookupResult {
* The data is supposed to be stored in chronological order, and is looked up using the current
* animation time in seconds using the TimeSampling from the Alembic property. */
template<typename T> class DataStore {
struct DataTimePair {
/* Holds information to map a cache entry for a given time to an index into the data array. */
struct TimeIndexPair {
/* Frame time for this entry. */
double time = 0;
T data{};
/* Frame time for the data pointed to by `index`. */
double source_time = 0;
/* Index into the data array. */
size_t index = 0;
};
vector<DataTimePair> data{};
/* This is the actual data that is stored. We deduplicate data across frames to avoid storing
* values if they have not changed yet (e.g. the triangles for a building before fracturing, or a
* fluid simulation before a break or splash) */
vector<T> data{};
/* This is used to map they entry for a given time to an index into the data array, multiple
* frames can point to the same index. */
vector<TimeIndexPair> index_data_map{};
Alembic::AbcCoreAbstract::TimeSampling time_sampling{};
double last_loaded_time = std::numeric_limits<double>::max();
@@ -157,17 +170,21 @@ template<typename T> class DataStore {
return CacheLookupResult<T>::no_data_found_for_time();
}
std::pair<size_t, Alembic::Abc::chrono_t> index_pair;
index_pair = time_sampling.getNearIndex(time, data.size());
DataTimePair &data_pair = data[index_pair.first];
const TimeIndexPair &index = get_index_for_time(time);
if (last_loaded_time == data_pair.time) {
if (index.index == -1ul) {
return CacheLookupResult<T>::no_data_found_for_time();
}
if (last_loaded_time == index.time || last_loaded_time == index.source_time) {
return CacheLookupResult<T>::already_loaded();
}
last_loaded_time = data_pair.time;
last_loaded_time = index.source_time;
return CacheLookupResult<T>::new_data(&data_pair.data);
assert(index.index < data.size());
return CacheLookupResult<T>::new_data(&data[index.index]);
}
/* get the data for the specified time, but do not check if the data was already loaded for this
@@ -178,22 +195,34 @@ template<typename T> class DataStore {
return CacheLookupResult<T>::no_data_found_for_time();
}
std::pair<size_t, Alembic::Abc::chrono_t> index_pair;
index_pair = time_sampling.getNearIndex(time, data.size());
DataTimePair &data_pair = data[index_pair.first];
return CacheLookupResult<T>::new_data(&data_pair.data);
const TimeIndexPair &index = get_index_for_time(time);
if (index.index == -1ul) {
return CacheLookupResult<T>::no_data_found_for_time();
}
assert(index.index < data.size());
return CacheLookupResult<T>::new_data(&data[index.index]);
}
void add_data(T &data_, double time)
{
index_data_map.push_back({time, time, data.size()});
if constexpr (is_array<T>::value) {
data.emplace_back();
data.back().data.steal_data(data_);
data.back().time = time;
data.back().steal_data(data_);
return;
}
data.push_back({time, data_});
data.push_back(data_);
}
void reuse_data_for_last_time(double time)
{
const TimeIndexPair &data_index = index_data_map.back();
index_data_map.push_back({time, data_index.source_time, data_index.index});
}
bool is_constant() const
@@ -210,6 +239,7 @@ template<typename T> class DataStore {
{
invalidate_last_loaded_time();
data.clear();
index_data_map.clear();
}
void invalidate_last_loaded_time()
@@ -232,6 +262,14 @@ template<typename T> class DataStore {
T value = result.get_data();
node->set(*socket, value);
}
private:
const TimeIndexPair &get_index_for_time(double time) const
{
std::pair<size_t, Alembic::Abc::chrono_t> index_pair;
index_pair = time_sampling.getNearIndex(time, index_data_map.size());
return index_data_map[index_pair.first];
}
};
/* Actual cache for the stored data.
@@ -443,16 +481,23 @@ class AlembicProcedural : public Procedural {
* invocation, and updates the data on subsequent invocations if the frame changed. */
void generate(Scene *scene, Progress &progress);
/* Add an object to our list of objects, and tag the socket as modified. */
void add_object(AlembicObject *object);
/* Tag for an update only if something was modified. */
void tag_update(Scene *scene);
/* Returns a pointer to an existing or a newly created AlembicObject for the given path. */
/* This should be called by scene exporters to request the rendering of an object located
* in the Alembic archive at the given path.
*
* Since we lazily load object, the function does not validate the existence of the object
* in the archive. If no objects with such path if found in the archive during the next call
* to `generate`, it will be ignored.
*
* Returns a pointer to an existing or a newly created AlembicObject for the given path. */
AlembicObject *get_or_create_object(const ustring &path);
private:
/* Add an object to our list of objects, and tag the socket as modified. */
void add_object(AlembicObject *object);
/* Load the data for all the objects whose data has not yet been loaded. */
void load_objects(Progress &progress);

View File

@@ -130,6 +130,14 @@ void Background::device_free(Device * /*device*/, DeviceScene * /*dscene*/)
void Background::tag_update(Scene *scene)
{
Shader *bg_shader = get_shader(scene);
if (bg_shader && bg_shader->is_modified()) {
/* Tag as modified to update the KernelBackground visibility information.
* We only tag the use_shader socket as modified as it is related to the shader
* and to avoid doing unnecessary updates anywhere else. */
tag_use_shader_modified();
}
if (ao_factor_is_modified() || use_ao_is_modified()) {
scene->integrator->tag_update(scene, Integrator::BACKGROUND_AO_MODIFIED);
}

View File

@@ -90,6 +90,7 @@ void Geometry::clear(bool preserve_shaders)
transform_applied = false;
transform_negative_scaled = false;
transform_normal = transform_identity();
tag_modified();
}
bool Geometry::need_attribute(Scene *scene, AttributeStandard std)
@@ -1583,7 +1584,6 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
dscene->tri_vnormal.tag_realloc();
dscene->tri_vindex.tag_realloc();
dscene->tri_patch.tag_realloc();
dscene->tri_vnormal.tag_realloc();
dscene->tri_patch_uv.tag_realloc();
dscene->tri_shader.tag_realloc();
dscene->patches.tag_realloc();
@@ -1916,9 +1916,12 @@ void GeometryManager::device_update(Device *device,
}
}
/* update the bvh even when there is no geometry so the kernel bvh data is still valid,
* especially when removing all of the objects during interactive renders */
bool need_update_scene_bvh = (scene->bvh == nullptr);
/* Update the BVH even when there is no geometry so the kernel's BVH data is still valid,
* especially when removing all of the objects during interactive renders.
* Also update the BVH if the transformations change, we cannot rely on tagging the Geometry
* as modified in this case, as we may accumulate displacement if the vertices do not also
* change. */
bool need_update_scene_bvh = (scene->bvh == nullptr || (update_flags & TRANSFORM_MODIFIED) != 0);
{
scoped_callback_timer timer([scene](double time) {
if (scene->update_stats) {
@@ -1960,7 +1963,6 @@ void GeometryManager::device_update(Device *device,
scene->update_stats->geometry.times.add_entry({"device_update (compute bounds)", time});
}
});
vector<Object *> volume_objects;
foreach (Object *object, scene->objects) {
object->compute_bounds(motion_blur);
}

View File

@@ -189,6 +189,8 @@ class GeometryManager {
GEOMETRY_ADDED = MESH_ADDED | HAIR_ADDED,
GEOMETRY_REMOVED = MESH_REMOVED | HAIR_REMOVED,
TRANSFORM_MODIFIED = (1 << 10),
/* tag everything in the manager for an update */
UPDATE_ALL = ~0u,

View File

@@ -303,7 +303,8 @@ ImageManager::ImageManager(const DeviceInfo &info)
animation_frame = 0;
/* Set image limits */
has_half_images = info.has_half_images;
features.has_half_float = info.has_half_images;
features.has_nanovdb = info.has_nanovdb;
}
ImageManager::~ImageManager()
@@ -347,7 +348,7 @@ void ImageManager::load_image_metadata(Image *img)
metadata = ImageMetaData();
metadata.colorspace = img->params.colorspace;
if (img->loader->load_metadata(metadata)) {
if (img->loader->load_metadata(features, metadata)) {
assert(metadata.type != IMAGE_DATA_NUM_TYPES);
}
else {
@@ -356,15 +357,10 @@ void ImageManager::load_image_metadata(Image *img)
metadata.detect_colorspace();
/* No half textures on OpenCL, use full float instead. */
if (!has_half_images) {
if (metadata.type == IMAGE_DATA_TYPE_HALF4) {
metadata.type = IMAGE_DATA_TYPE_FLOAT4;
}
else if (metadata.type == IMAGE_DATA_TYPE_HALF) {
metadata.type = IMAGE_DATA_TYPE_FLOAT;
}
}
assert(features.has_half_float ||
(metadata.type != IMAGE_DATA_TYPE_HALF4 && metadata.type != IMAGE_DATA_TYPE_HALF));
assert(features.has_nanovdb || (metadata.type != IMAGE_DATA_TYPE_NANOVDB_FLOAT ||
metadata.type != IMAGE_DATA_TYPE_NANOVDB_FLOAT3));
img->need_metadata = false;
}

View File

@@ -97,6 +97,13 @@ class ImageMetaData {
void detect_colorspace();
};
/* Information about supported features that Image loaders can use. */
class ImageDeviceFeatures {
public:
bool has_half_float;
bool has_nanovdb;
};
/* Image loader base class, that can be subclassed to load image data
* from custom sources (file, memory, procedurally generated, etc). */
class ImageLoader {
@@ -105,7 +112,7 @@ class ImageLoader {
virtual ~ImageLoader(){};
/* Load metadata without actual image yet, should be fast. */
virtual bool load_metadata(ImageMetaData &metadata) = 0;
virtual bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) = 0;
/* Load actual image contents. */
virtual bool load_pixels(const ImageMetaData &metadata,
@@ -212,7 +219,8 @@ class ImageManager {
private:
bool need_update_;
bool has_half_images;
ImageDeviceFeatures features;
thread_mutex device_mutex;
thread_mutex images_mutex;

View File

@@ -30,7 +30,7 @@ OIIOImageLoader::~OIIOImageLoader()
{
}
bool OIIOImageLoader::load_metadata(ImageMetaData &metadata)
bool OIIOImageLoader::load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata)
{
/* Perform preliminary checks, with meaningful logging. */
if (!path_exists(filepath.string())) {
@@ -76,7 +76,7 @@ bool OIIOImageLoader::load_metadata(ImageMetaData &metadata)
}
/* check if it's half float */
if (spec.format == TypeDesc::HALF) {
if (spec.format == TypeDesc::HALF && features.has_half_float) {
is_half = true;
}

View File

@@ -26,7 +26,7 @@ class OIIOImageLoader : public ImageLoader {
OIIOImageLoader(const string &filepath);
~OIIOImageLoader();
bool load_metadata(ImageMetaData &metadata) override;
bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) override;
bool load_pixels(const ImageMetaData &metadata,
void *pixels,

View File

@@ -40,7 +40,7 @@ SkyLoader::SkyLoader(float sun_elevation,
SkyLoader::~SkyLoader(){};
bool SkyLoader::load_metadata(ImageMetaData &metadata)
bool SkyLoader::load_metadata(const ImageDeviceFeatures &, ImageMetaData &metadata)
{
metadata.width = 512;
metadata.height = 128;

View File

@@ -34,7 +34,7 @@ class SkyLoader : public ImageLoader {
float ozone_density);
~SkyLoader();
bool load_metadata(ImageMetaData &metadata) override;
bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) override;
bool load_pixels(const ImageMetaData &metadata,
void *pixels,

View File

@@ -34,7 +34,7 @@ VDBImageLoader::~VDBImageLoader()
{
}
bool VDBImageLoader::load_metadata(ImageMetaData &metadata)
bool VDBImageLoader::load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata)
{
#ifdef WITH_OPENVDB
if (!grid) {
@@ -56,55 +56,71 @@ bool VDBImageLoader::load_metadata(ImageMetaData &metadata)
if (grid->isType<openvdb::FloatGrid>()) {
metadata.channels = 1;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(*openvdb::gridConstPtrCast<openvdb::FloatGrid>(grid));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(*openvdb::gridConstPtrCast<openvdb::FloatGrid>(grid));
}
# endif
}
else if (grid->isType<openvdb::Vec3fGrid>()) {
metadata.channels = 3;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(*openvdb::gridConstPtrCast<openvdb::Vec3fGrid>(grid));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(*openvdb::gridConstPtrCast<openvdb::Vec3fGrid>(grid));
}
# endif
}
else if (grid->isType<openvdb::BoolGrid>()) {
metadata.channels = 1;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::BoolGrid>(grid)));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::BoolGrid>(grid)));
}
# endif
}
else if (grid->isType<openvdb::DoubleGrid>()) {
metadata.channels = 1;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::DoubleGrid>(grid)));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::DoubleGrid>(grid)));
}
# endif
}
else if (grid->isType<openvdb::Int32Grid>()) {
metadata.channels = 1;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::Int32Grid>(grid)));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::Int32Grid>(grid)));
}
# endif
}
else if (grid->isType<openvdb::Int64Grid>()) {
metadata.channels = 1;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::Int64Grid>(grid)));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(
openvdb::FloatGrid(*openvdb::gridConstPtrCast<openvdb::Int64Grid>(grid)));
}
# endif
}
else if (grid->isType<openvdb::Vec3IGrid>()) {
metadata.channels = 3;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(
openvdb::Vec3fGrid(*openvdb::gridConstPtrCast<openvdb::Vec3IGrid>(grid)));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(
openvdb::Vec3fGrid(*openvdb::gridConstPtrCast<openvdb::Vec3IGrid>(grid)));
}
# endif
}
else if (grid->isType<openvdb::Vec3dGrid>()) {
metadata.channels = 3;
# ifdef WITH_NANOVDB
nanogrid = nanovdb::openToNanoVDB(
openvdb::Vec3fGrid(*openvdb::gridConstPtrCast<openvdb::Vec3dGrid>(grid)));
if (features.has_nanovdb) {
nanogrid = nanovdb::openToNanoVDB(
openvdb::Vec3fGrid(*openvdb::gridConstPtrCast<openvdb::Vec3dGrid>(grid)));
}
# endif
}
else if (grid->isType<openvdb::MaskGrid>()) {
@@ -118,21 +134,25 @@ bool VDBImageLoader::load_metadata(ImageMetaData &metadata)
}
# ifdef WITH_NANOVDB
metadata.byte_size = nanogrid.size();
if (metadata.channels == 1) {
metadata.type = IMAGE_DATA_TYPE_NANOVDB_FLOAT;
}
else {
metadata.type = IMAGE_DATA_TYPE_NANOVDB_FLOAT3;
}
# else
if (metadata.channels == 1) {
metadata.type = IMAGE_DATA_TYPE_FLOAT;
}
else {
metadata.type = IMAGE_DATA_TYPE_FLOAT4;
if (nanogrid) {
metadata.byte_size = nanogrid.size();
if (metadata.channels == 1) {
metadata.type = IMAGE_DATA_TYPE_NANOVDB_FLOAT;
}
else {
metadata.type = IMAGE_DATA_TYPE_NANOVDB_FLOAT3;
}
}
else
# endif
{
if (metadata.channels == 1) {
metadata.type = IMAGE_DATA_TYPE_FLOAT;
}
else {
metadata.type = IMAGE_DATA_TYPE_FLOAT4;
}
}
/* Set transform from object space to voxel index. */
openvdb::math::Mat4f grid_matrix = grid->transform().baseMap()->getAffineMap()->getMat4();
@@ -143,20 +163,29 @@ bool VDBImageLoader::load_metadata(ImageMetaData &metadata)
}
}
Transform texture_to_index;
# ifdef WITH_NANOVDB
Transform texture_to_index = transform_identity();
# else
openvdb::Coord min = bbox.min();
Transform texture_to_index = transform_translate(min.x(), min.y(), min.z()) *
transform_scale(dim.x(), dim.y(), dim.z());
if (nanogrid) {
texture_to_index = transform_identity();
}
else
# endif
{
openvdb::Coord min = bbox.min();
texture_to_index = transform_translate(min.x(), min.y(), min.z()) *
transform_scale(dim.x(), dim.y(), dim.z());
}
metadata.transform_3d = transform_inverse(index_to_object * texture_to_index);
metadata.use_transform_3d = true;
# ifndef WITH_NANOVDB
(void)features;
# endif
return true;
#else
(void)metadata;
(void)features;
return false;
#endif
}
@@ -165,48 +194,52 @@ bool VDBImageLoader::load_pixels(const ImageMetaData &, void *pixels, const size
{
#ifdef WITH_OPENVDB
# ifdef WITH_NANOVDB
memcpy(pixels, nanogrid.data(), nanogrid.size());
# else
if (grid->isType<openvdb::FloatGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::FloatGrid>(grid), dense);
}
else if (grid->isType<openvdb::Vec3fGrid>()) {
openvdb::tools::Dense<openvdb::Vec3f, openvdb::tools::LayoutXYZ> dense(
bbox, (openvdb::Vec3f *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Vec3fGrid>(grid), dense);
}
else if (grid->isType<openvdb::BoolGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::BoolGrid>(grid), dense);
}
else if (grid->isType<openvdb::DoubleGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::DoubleGrid>(grid), dense);
}
else if (grid->isType<openvdb::Int32Grid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Int32Grid>(grid), dense);
}
else if (grid->isType<openvdb::Int64Grid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Int64Grid>(grid), dense);
}
else if (grid->isType<openvdb::Vec3IGrid>()) {
openvdb::tools::Dense<openvdb::Vec3f, openvdb::tools::LayoutXYZ> dense(
bbox, (openvdb::Vec3f *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Vec3IGrid>(grid), dense);
}
else if (grid->isType<openvdb::Vec3dGrid>()) {
openvdb::tools::Dense<openvdb::Vec3f, openvdb::tools::LayoutXYZ> dense(
bbox, (openvdb::Vec3f *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Vec3dGrid>(grid), dense);
}
else if (grid->isType<openvdb::MaskGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::MaskGrid>(grid), dense);
if (nanogrid) {
memcpy(pixels, nanogrid.data(), nanogrid.size());
}
else
# endif
{
if (grid->isType<openvdb::FloatGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::FloatGrid>(grid), dense);
}
else if (grid->isType<openvdb::Vec3fGrid>()) {
openvdb::tools::Dense<openvdb::Vec3f, openvdb::tools::LayoutXYZ> dense(
bbox, (openvdb::Vec3f *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Vec3fGrid>(grid), dense);
}
else if (grid->isType<openvdb::BoolGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::BoolGrid>(grid), dense);
}
else if (grid->isType<openvdb::DoubleGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::DoubleGrid>(grid), dense);
}
else if (grid->isType<openvdb::Int32Grid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Int32Grid>(grid), dense);
}
else if (grid->isType<openvdb::Int64Grid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Int64Grid>(grid), dense);
}
else if (grid->isType<openvdb::Vec3IGrid>()) {
openvdb::tools::Dense<openvdb::Vec3f, openvdb::tools::LayoutXYZ> dense(
bbox, (openvdb::Vec3f *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Vec3IGrid>(grid), dense);
}
else if (grid->isType<openvdb::Vec3dGrid>()) {
openvdb::tools::Dense<openvdb::Vec3f, openvdb::tools::LayoutXYZ> dense(
bbox, (openvdb::Vec3f *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::Vec3dGrid>(grid), dense);
}
else if (grid->isType<openvdb::MaskGrid>()) {
openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense(bbox, (float *)pixels);
openvdb::tools::copyToDense(*openvdb::gridConstPtrCast<openvdb::MaskGrid>(grid), dense);
}
}
return true;
#else
(void)pixels;

View File

@@ -33,7 +33,8 @@ class VDBImageLoader : public ImageLoader {
VDBImageLoader(const string &grid_name);
~VDBImageLoader();
virtual bool load_metadata(ImageMetaData &metadata) override;
virtual bool load_metadata(const ImageDeviceFeatures &features,
ImageMetaData &metadata) override;
virtual bool load_pixels(const ImageMetaData &metadata,
void *pixels,

View File

@@ -129,6 +129,7 @@ NODE_DEFINE(Light)
SOCKET_VECTOR(axisv, "Axis V", zero_float3());
SOCKET_FLOAT(sizev, "Size V", 1.0f);
SOCKET_BOOLEAN(round, "Round", false);
SOCKET_FLOAT(spread, "Spread", M_PI_F);
SOCKET_INT(map_resolution, "Map Resolution", 0);
@@ -858,6 +859,15 @@ void LightManager::device_update_points(Device *, DeviceScene *dscene, Scene *sc
float invarea = (area != 0.0f) ? 1.0f / area : 1.0f;
float3 dir = light->dir;
/* Convert from spread angle 0..180 to 90..0, clamping to a minimum
* angle to avoid excessive noise. */
const float min_spread_angle = 1.0f * M_PI_F / 180.0f;
const float spread_angle = 0.5f * (M_PI_F - max(light->spread, min_spread_angle));
/* Normalization computed using:
* integrate cos(x) (1 - tan(x) * tan(a)) * sin(x) from x = a to pi/2. */
const float tan_spread = tanf(spread_angle);
const float normalize_spread = 2.0f / (2.0f + (2.0f * spread_angle - M_PI_F) * tan_spread);
dir = safe_normalize(dir);
if (light->use_mis && area != 0.0f)
@@ -877,6 +887,8 @@ void LightManager::device_update_points(Device *, DeviceScene *dscene, Scene *sc
klights[light_index].area.dir[0] = dir.x;
klights[light_index].area.dir[1] = dir.y;
klights[light_index].area.dir[2] = dir.z;
klights[light_index].area.tan_spread = tan_spread;
klights[light_index].area.normalize_spread = normalize_spread;
}
else if (light->light_type == LIGHT_SPOT) {
shader_id &= ~SHADER_AREA_LIGHT;

View File

@@ -58,6 +58,7 @@ class Light : public Node {
NODE_SOCKET_API(float3, axisv)
NODE_SOCKET_API(float, sizev)
NODE_SOCKET_API(bool, round)
NODE_SOCKET_API(float, spread)
NODE_SOCKET_API(Transform, tfm)

View File

@@ -6091,6 +6091,9 @@ NODE_DEFINE(VectorMathNode)
type_enum.insert("cross_product", NODE_VECTOR_MATH_CROSS_PRODUCT);
type_enum.insert("project", NODE_VECTOR_MATH_PROJECT);
type_enum.insert("reflect", NODE_VECTOR_MATH_REFLECT);
type_enum.insert("refract", NODE_VECTOR_MATH_REFRACT);
type_enum.insert("faceforward", NODE_VECTOR_MATH_FACEFORWARD);
type_enum.insert("dot_product", NODE_VECTOR_MATH_DOT_PRODUCT);
type_enum.insert("distance", NODE_VECTOR_MATH_DISTANCE);
@@ -6151,24 +6154,24 @@ void VectorMathNode::compile(SVMCompiler &compiler)
{
ShaderInput *vector1_in = input("Vector1");
ShaderInput *vector2_in = input("Vector2");
ShaderInput *scale_in = input("Scale");
ShaderInput *param1_in = input("Scale");
ShaderOutput *value_out = output("Value");
ShaderOutput *vector_out = output("Vector");
int vector1_stack_offset = compiler.stack_assign(vector1_in);
int vector2_stack_offset = compiler.stack_assign(vector2_in);
int scale_stack_offset = compiler.stack_assign(scale_in);
int param1_stack_offset = compiler.stack_assign(param1_in);
int value_stack_offset = compiler.stack_assign_if_linked(value_out);
int vector_stack_offset = compiler.stack_assign_if_linked(vector_out);
/* 3 Vector Operators */
if (math_type == NODE_VECTOR_MATH_WRAP) {
if (math_type == NODE_VECTOR_MATH_WRAP || math_type == NODE_VECTOR_MATH_FACEFORWARD) {
ShaderInput *vector3_in = input("Vector3");
int vector3_stack_offset = compiler.stack_assign(vector3_in);
compiler.add_node(
NODE_VECTOR_MATH,
math_type,
compiler.encode_uchar4(vector1_stack_offset, vector2_stack_offset, scale_stack_offset),
compiler.encode_uchar4(vector1_stack_offset, vector2_stack_offset, param1_stack_offset),
compiler.encode_uchar4(value_stack_offset, vector_stack_offset));
compiler.add_node(vector3_stack_offset);
}
@@ -6176,7 +6179,7 @@ void VectorMathNode::compile(SVMCompiler &compiler)
compiler.add_node(
NODE_VECTOR_MATH,
math_type,
compiler.encode_uchar4(vector1_stack_offset, vector2_stack_offset, scale_stack_offset),
compiler.encode_uchar4(vector1_stack_offset, vector2_stack_offset, param1_stack_offset),
compiler.encode_uchar4(value_stack_offset, vector_stack_offset));
}
}

View File

@@ -153,10 +153,6 @@ void Object::update_motion()
void Object::compute_bounds(bool motion_blur)
{
if (!is_modified() && !geometry->is_modified()) {
return;
}
BoundBox mbounds = geometry->bounds;
if (motion_blur && use_motion()) {
@@ -221,16 +217,7 @@ void Object::tag_update(Scene *scene)
if (geometry) {
if (tfm_is_modified()) {
/* tag the geometry as modified so the BVH is updated, but do not tag everything as modified
*/
if (geometry->is_mesh() || geometry->is_volume()) {
Mesh *mesh = static_cast<Mesh *>(geometry);
mesh->tag_verts_modified();
}
else if (geometry->is_hair()) {
Hair *hair = static_cast<Hair *>(geometry);
hair->tag_curve_keys_modified();
}
flag |= ObjectManager::TRANSFORM_MODIFIED;
}
foreach (Node *node, geometry->get_used_shaders()) {
@@ -923,6 +910,10 @@ void ObjectManager::tag_update(Scene *scene, uint32_t flag)
geometry_flag |= (GeometryManager::GEOMETRY_ADDED | GeometryManager::GEOMETRY_REMOVED);
}
if ((flag & TRANSFORM_MODIFIED) != 0) {
geometry_flag |= GeometryManager::TRANSFORM_MODIFIED;
}
scene->geometry_manager->tag_update(scene, geometry_flag);
}

View File

@@ -133,6 +133,7 @@ class ObjectManager {
OBJECT_REMOVED = (1 << 4),
OBJECT_MODIFIED = (1 << 5),
HOLDOUT_MODIFIED = (1 << 6),
TRANSFORM_MODIFIED = (1 << 7),
/* tag everything in the manager for an update */
UPDATE_ALL = ~0u,

View File

@@ -18,6 +18,7 @@
#define TEST_CATEGORY_NAME util_avx2
#if defined(i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
#if (defined(i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)) && \
defined(__AVX2__)
# include "util_avxf_test.h"
#endif

View File

@@ -18,6 +18,7 @@
#define TEST_CATEGORY_NAME util_avx
#if defined(i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
#if (defined(i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)) && \
defined(__AVX__)
# include "util_avxf_test.h"
#endif

View File

@@ -388,6 +388,22 @@ ccl_device_inline float3 reflect(const float3 incident, const float3 normal)
return incident - 2.0f * unit_normal * dot(incident, unit_normal);
}
ccl_device_inline float3 refract(const float3 incident, const float3 normal, const float eta)
{
float k = 1.0f - eta * eta * (1.0f - dot(normal, incident) * dot(normal, incident));
if (k < 0.0f)
return zero_float3();
else
return eta * incident - (eta * dot(normal, incident) + sqrt(k)) * normal;
}
ccl_device_inline float3 faceforward(const float3 vector,
const float3 incident,
const float3 reference)
{
return (dot(reference, incident) < 0.0f) ? vector : -vector;
}
ccl_device_inline float3 project(const float3 v, const float3 v_proj)
{
float len_squared = dot(v_proj, v_proj);

View File

@@ -178,8 +178,8 @@ DWORD GHOST_DropTargetWin32::allowedDropEffect(DWORD dwAllowed)
GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject *pDataObject)
{
/* Text
* Note: Unicode text is available as CF_TEXT too, the system can do the
* conversion, but we do the conversion ourself with WC_NO_BEST_FIT_CHARS.
* NOTE: Unicode text is available as CF_TEXT too, the system can do the
* conversion, but we do the conversion our self with #WC_NO_BEST_FIT_CHARS.
*/
FORMATETC fmtetc = {CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
if (pDataObject->QueryGetData(&fmtetc) == S_OK) {

View File

@@ -24,7 +24,8 @@
#pragma once
/*
/**
* \code{.py}
* import bpy
* import textwrap
*
@@ -42,6 +43,7 @@
* print("%d,%d," % (w, h))
* text = ", ".join(["0x%x" % p for p in pixels])
* print(textwrap.fill(text, width=120), end=",\n")
* \endcode
*/
/**

View File

@@ -357,7 +357,6 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
}
}
/* clang-format off */
#pragma mark Cocoa objects
/**
@@ -500,8 +499,6 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
#pragma mark initialization/finalization
/* clang-format on */
GHOST_SystemCocoa::GHOST_SystemCocoa()
{
int mib[2];

View File

@@ -34,8 +34,6 @@
#include <sys/sysctl.h>
/* clang-format off */
#pragma mark Cocoa window delegate object
@interface CocoaWindowDelegate : NSObject <NSWindowDelegate>
@@ -120,8 +118,8 @@
- (void)windowDidResize:(NSNotification *)notification
{
//if (![[notification object] inLiveResize]) {
//Send event only once, at end of resize operation (when user has released mouse button)
// if (![[notification object] inLiveResize]) {
// Send event only once, at end of resize operation (when user has released mouse button)
systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow);
//}
/* Live resize, send event, gets handled in wm_window.c.
@@ -139,7 +137,7 @@
- (BOOL)windowShouldClose:(id)sender;
{
//Let Blender close the window rather than closing immediately
// Let Blender close the window rather than closing immediately
systemCocoa->handleWindowEvent(GHOST_kEventWindowClose, associatedWindow);
return false;
}
@@ -178,7 +176,7 @@
return (associatedWindow->isDialog() || !systemCocoa->hasDialogWindow());
}
//The drag'n'drop dragging destination methods
// The drag'n'drop dragging destination methods
- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender
{
NSPoint mouseLocation = [sender draggingLocation];
@@ -193,7 +191,7 @@
else
return NSDragOperationNone;
associatedWindow->setAcceptDragOperation(TRUE); //Drag operation is accepted by default
associatedWindow->setAcceptDragOperation(TRUE); // Drag operation is accepted by default
systemCocoa->handleDraggingEvent(GHOST_kEventDraggingEntered,
m_draggedObjectType,
associatedWindow,
@@ -205,7 +203,7 @@
- (BOOL)wantsPeriodicDraggingUpdates
{
return NO; //No need to overflow blender event queue. Events shall be sent only on changes
return NO; // No need to overflow blender event queue. Events shall be sent only on changes
}
- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender
@@ -288,8 +286,6 @@
#pragma mark initialization / finalization
/* clang-format on */
GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
const char *title,
GHOST_TInt32 left,

View File

@@ -533,14 +533,23 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
wp.showCmd = SW_SHOWMAXIMIZED;
wp.ptMaxPosition.x = 0;
wp.ptMaxPosition.y = 0;
style &= ~WS_CAPTION;
style &= ~(WS_CAPTION | WS_MAXIMIZE);
break;
case GHOST_kWindowStateNormal:
default:
wp.showCmd = SW_SHOWNORMAL;
if (curstate == GHOST_kWindowStateFullScreen &&
m_normal_state == GHOST_kWindowStateMaximized) {
wp.showCmd = SW_SHOWMAXIMIZED;
m_normal_state = GHOST_kWindowStateNormal;
}
else {
wp.showCmd = SW_SHOWNORMAL;
}
break;
}
::SetWindowLongPtr(m_hWnd, GWL_STYLE, style);
/* SetWindowLongPtr Docs: frame changes not visible until SetWindowPos with SWP_FRAMECHANGED. */
::SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}

View File

@@ -49,8 +49,6 @@
#ifndef __MEM_GUARDEDALLOC_H__
#define __MEM_GUARDEDALLOC_H__
#include <stdio.h> /* needed for FILE* */
/* Needed for uintptr_t and attributes, exception, don't use BLI anywhere else in `MEM_*` */
#include "../../source/blender/blenlib/BLI_compiler_attrs.h"
#include "../../source/blender/blenlib/BLI_sys_types.h"

View File

@@ -18,6 +18,7 @@
* \ingroup MEM
*/
#include <cstdio> /* Needed for `printf` on WIN32/APPLE. */
#include <cstdlib>
#include "MEM_guardedalloc.h"

View File

@@ -25,6 +25,7 @@
#include <stdarg.h>
#include <stddef.h> /* offsetof */
#include <stdio.h> /* printf */
#include <stdlib.h>
#include <string.h> /* memcpy */
#include <sys/types.h>

View File

@@ -21,6 +21,7 @@
*/
#include <stdarg.h>
#include <stdio.h> /* printf */
#include <stdlib.h>
#include <string.h> /* memcpy */
#include <sys/types.h>

View File

@@ -337,7 +337,7 @@ bool PredictMarkerPosition(const Tracks& tracks,
previous_markers.push_back(boxed_markers[i]);
}
RunPrediction(previous_markers, marker);
return false;
return true;
}
}

View File

@@ -0,0 +1,2 @@
DisableFormat: true
SortIncludes: false

View File

@@ -1,32 +1,35 @@
/* No need to format 3rd-party compatibility headers. */
/* clang-format off */
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006 Alexander Chemeris
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [

View File

@@ -1,32 +1,35 @@
/* No need to format 3rd-party compatibility headers. */
/* clang-format off */
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [

View File

@@ -11,6 +11,8 @@
<array>
<string>blend</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>Blender_Legacy_Document_Icon.icns</string>
<key>CFBundleTypeName</key>
<string>Blender File</string>
<key>CFBundleTypeOSTypes</key>
@@ -62,6 +64,8 @@
</array>
<key>UTTypeIdentifier</key>
<string>org.blenderfoundation.blender.file</string>
<key>UTTypeDescription</key>
<string>Blender File</string>
<key>UTTypeIcons</key>
<dict>
<key>UTTypeIconName</key>

View File

@@ -825,6 +825,7 @@ const bTheme U_theme_default = {
.vertex_size = 3,
.outline_width = 1,
.facedot_size = 4,
.noodle_curving = 4,
.grid_levels = 2,
.syntaxl = RGBA(0x565656ff),
.syntaxs = RGBA(0x975b5bff),

View File

@@ -349,6 +349,10 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
# 1) try import
try:
mod = __import__(module_name)
if mod.__file__ is None:
# This can happen when the addon has been removed but there are
# residual `.pyc` files left behind.
raise ImportError(name=module_name)
mod.__time__ = os.path.getmtime(mod.__file__)
mod.__addon_enabled__ = False
except Exception as ex:

View File

@@ -32,12 +32,6 @@ import bpy
IS_TESTING = False
def drepr(string):
# is there a less crappy way to do this in python?, re.escape also escapes
# single quotes strings so can't use it.
return '"%s"' % repr(string)[1:-1].replace("\"", "\\\"").replace("\\'", "'")
def classes_recursive(base_type, clss=None):
if clss is None:
clss = [base_type]
@@ -66,7 +60,7 @@ class DataPathBuilder:
if type(key) is int:
str_value = '[%d]' % key
elif type(key) is str:
str_value = '[%s]' % drepr(key)
str_value = '["%s"]' % bpy.utils.escape_identifier(key)
else:
raise Exception("unsupported accessor %r of type %r (internal error)" % (key, type(key)))
return DataPathBuilder(self.data_path + (str_value, ))

View File

@@ -0,0 +1,91 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
__all__ = (
"property_definition_from_data_path",
"decompose_data_path",
)
class _TokenizeDataPath:
"""
Class to split up tokens of a data-path.
Note that almost all access generates new objects with additional paths,
with the exception of iteration which is the intended way to access the resulting data."""
__slots__ = (
"data_path",
)
def __init__(self, attrs):
self.data_path = attrs
def __getattr__(self, attr):
return _TokenizeDataPath(self.data_path + ((".%s" % attr),))
def __getitem__(self, key):
return _TokenizeDataPath(self.data_path + (("[%r]" % (key,)),))
def __call__(self, *args, **kw):
value_str = ", ".join([
val for val in (
", ".join(repr(value) for value in args),
", ".join(["%s=%r" % (key, value) for key, value in kw.items()]),
) if val])
return _TokenizeDataPath(self.data_path + ('(%s)' % value_str, ))
def __iter__(self):
return iter(self.data_path)
def decompose_data_path(data_path):
"""
Return the components of a data path split into a list.
"""
ns = {"base": _TokenizeDataPath(())}
return list(eval("base" + data_path, ns, ns))
def property_definition_from_data_path(base, data_path):
"""
Return an RNA property definition from an object and a data path.
In Blender this is often used with ``context`` as the base and a
path that it references, for example ``.space_data.lock_camera``.
"""
data = decompose_data_path(data_path)
while data and (not data[-1].startswith(".")):
data.pop()
if (not data) or (not data[-1].startswith(".")) or (len(data) < 2):
return None
data_path_head = "".join(data[:-1])
data_path_tail = data[-1]
value_head = eval("base" + data_path_head)
value_head_rna = getattr(value_head, "bl_rna", None)
if value_head_rna is None:
return None
value_tail = value_head.bl_rna.properties.get(data_path_tail[1:])
if not value_tail:
return None
return value_tail

View File

@@ -89,9 +89,11 @@ url_manual_mapping = (
("bpy.types.fluiddomainsettings.gridlines_lower_bound*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-gridlines-lower-bound"),
("bpy.types.fluiddomainsettings.gridlines_range_color*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-gridlines-range-color"),
("bpy.types.fluiddomainsettings.gridlines_upper_bound*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-gridlines-upper-bound"),
("bpy.types.materialgpencilstyle.use_fill_texture_mix*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-use-fill-texture-mix"),
("bpy.types.materialgpencilstyle.use_fill_texture_mix*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-fill-texture-mix"),
("bpy.types.rendersettings_simplify_gpencil_shader_fx*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-shader-fx"),
("bpy.types.rendersettings_simplify_gpencil_view_fill*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-view-fill"),
("bpy.types.spacesequenceeditor.waveform_display_type*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-waveform-display-type"),
("bpy.types.toolsettings.use_mesh_automerge_and_split*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-mesh-automerge-and-split"),
("bpy.types.brush.cloth_constraint_softbody_strength*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-constraint-softbody-strength"),
("bpy.types.brush.elastic_deform_volume_preservation*", "sculpt_paint/sculpting/tools/elastic_deform.html#bpy-types-brush-elastic-deform-volume-preservation"),
("bpy.types.brushgpencilsettings.fill_simplify_level*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-simplify-level"),
@@ -104,7 +106,7 @@ url_manual_mapping = (
("bpy.types.fluiddomainsettings.sys_particle_maximum*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-sys-particle-maximum"),
("bpy.types.fluiddomainsettings.use_bubble_particles*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-use-bubble-particles"),
("bpy.types.linestylegeometrymodifier_simplification*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/simplification.html#bpy-types-linestylegeometrymodifier-simplification"),
("bpy.types.materialgpencilstyle.use_overlap_strokes*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-use-overlap-strokes"),
("bpy.types.materialgpencilstyle.use_overlap_strokes*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-overlap-strokes"),
("bpy.types.toolsettings.use_gpencil_weight_data_add*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-weight-data-add"),
("bpy.types.view3doverlay.texture_paint_mode_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-texture-paint-mode-opacity"),
("bpy.types.bakesettings.use_pass_ambient_occlusion*", "render/cycles/baking.html#bpy-types-bakesettings-use-pass-ambient-occlusion"),
@@ -123,11 +125,12 @@ url_manual_mapping = (
("bpy.types.fluiddomainsettings.vector_display_type*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-vector-display-type"),
("bpy.types.linestylegeometrymodifier_perlinnoise1d*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/perlin_noise_1d.html#bpy-types-linestylegeometrymodifier-perlinnoise1d"),
("bpy.types.linestylegeometrymodifier_perlinnoise2d*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/perlin_noise_2d.html#bpy-types-linestylegeometrymodifier-perlinnoise2d"),
("bpy.types.materialgpencilstyle.use_stroke_holdout*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-use-stroke-holdout"),
("bpy.types.materialgpencilstyle.use_stroke_holdout*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-stroke-holdout"),
("bpy.types.movietrackingsettings.use_tripod_solver*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-use-tripod-solver"),
("bpy.types.rendersettings.use_high_quality_normals*", "render/eevee/render_settings/performance.html#bpy-types-rendersettings-use-high-quality-normals"),
("bpy.types.spaceoutliner.use_filter_case_sensitive*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-case-sensitive"),
("bpy.types.spaceoutliner.use_filter_object_content*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-content"),
("bpy.types.spacesequenceeditor.show_strip_duration*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-duration"),
("bpy.types.toolsettings.use_proportional_connected*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-connected"),
("bpy.types.toolsettings.use_proportional_projected*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-projected"),
("bpy.types.view3doverlay.vertex_paint_mode_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-vertex-paint-mode-opacity"),
@@ -182,11 +185,13 @@ url_manual_mapping = (
("bpy.types.linestyle*modifier_distancefromobject*", "render/freestyle/parameter_editor/line_style/modifiers/color/distance_from_object.html#bpy-types-linestyle-modifier-distancefromobject"),
("bpy.types.linestylegeometrymodifier_2dtransform*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/2d_transform.html#bpy-types-linestylegeometrymodifier-2dtransform"),
("bpy.types.linestylegeometrymodifier_beziercurve*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/bezier_curve.html#bpy-types-linestylegeometrymodifier-beziercurve"),
("bpy.types.materialgpencilstyle.use_fill_holdout*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-use-fill-holdout"),
("bpy.types.materialgpencilstyle.use_fill_holdout*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-fill-holdout"),
("bpy.types.particlesettings.use_parent_particles*", "physics/particles/emitter/render.html#bpy-types-particlesettings-use-parent-particles"),
("bpy.types.rigidbodyconstraint.solver_iterations*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-solver-iterations"),
("bpy.types.spaceoutliner.use_filter_object_empty*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-empty"),
("bpy.types.spaceoutliner.use_filter_object_light*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-light"),
("bpy.types.spacesequenceeditor.show_strip_offset*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-offset"),
("bpy.types.spacesequenceeditor.show_strip_source*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-source"),
("bpy.types.toolsettings.gpencil_stroke_placement*", "grease_pencil/modes/draw/stroke_placement.html#bpy-types-toolsettings-gpencil-stroke-placement"),
("bpy.types.viewlayer.use_pass_cryptomatte_object*", "render/layers/passes.html#bpy-types-viewlayer-use-pass-cryptomatte-object"),
("bpy.ops.armature.rigify_apply_selection_colors*", "addons/rigging/rigify/metarigs.html#bpy-ops-armature-rigify-apply-selection-colors"),
@@ -228,11 +233,14 @@ url_manual_mapping = (
("bpy.types.fluideffectorsettings.effector_type*", "physics/fluid/type/effector.html#bpy-types-fluideffectorsettings-effector-type"),
("bpy.types.fluidflowsettings.use_particle_size*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-particle-size"),
("bpy.types.linestylegeometrymodifier_blueprint*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/blueprint.html#bpy-types-linestylegeometrymodifier-blueprint"),
("bpy.types.materialgpencilstyle.alignment_mode*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-alignment-mode"),
("bpy.types.materialgpencilstyle.alignment_mode*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-alignment-mode"),
("bpy.types.particlesettings.use_modifier_stack*", "physics/particles/emitter/emission.html#bpy-types-particlesettings-use-modifier-stack"),
("bpy.types.rendersettings.simplify_subdivision*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-subdivision"),
("bpy.types.spaceoutliner.use_filter_collection*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-collection"),
("bpy.types.spacesequenceeditor.show_annotation*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-annotation"),
("bpy.types.spacesequenceeditor.show_region_hud*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-region-hud"),
("bpy.types.spacesequenceeditor.show_safe_areas*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-safe-areas"),
("bpy.types.spacesequenceeditor.show_strip_name*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-name"),
("bpy.types.toolsettings.use_snap_grid_absolute*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-grid-absolute"),
("bpy.types.view3doverlay.show_face_orientation*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-face-orientation"),
("bpy.ops.object.blenderkit_material_thumbnail*", "addons/3d_view/blenderkit.html#bpy-ops-object-blenderkit-material-thumbnail"),
@@ -259,6 +267,7 @@ url_manual_mapping = (
("bpy.types.fluideffectorsettings.use_effector*", "physics/fluid/type/effector.html#bpy-types-fluideffectorsettings-use-effector"),
("bpy.types.fluidflowsettings.surface_distance*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-surface-distance"),
("bpy.types.fluidflowsettings.texture_map_type*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-texture-map-type"),
("bpy.types.geometrynodeattributesampletexture*", "modeling/geometry_nodes/attribute/attribute_sample_texture.html#bpy-types-geometrynodeattributesampletexture"),
("bpy.types.gpencilsculptguide.reference_point*", "grease_pencil/modes/draw/guides.html#bpy-types-gpencilsculptguide-reference-point"),
("bpy.types.greasepencil.edit_curve_resolution*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-edit-curve-resolution"),
("bpy.types.linestylegeometrymodifier_2doffset*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/2d_offset.html#bpy-types-linestylegeometrymodifier-2doffset"),
@@ -284,7 +293,7 @@ url_manual_mapping = (
("bpy.types.fluidflowsettings.velocity_normal*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-velocity-normal"),
("bpy.types.geometrynodealignrotationtovector*", "modeling/geometry_nodes/point/align_rotation_to_vector.html#bpy-types-geometrynodealignrotationtovector"),
("bpy.types.greasepencil.curve_edit_threshold*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-curve-edit-threshold"),
("bpy.types.materialgpencilstyle.stroke_style*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-stroke-style"),
("bpy.types.materialgpencilstyle.stroke_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-stroke-style"),
("bpy.types.rendersettings.preview_pixel_size*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-preview-pixel-size"),
("bpy.types.rendersettings.use_crop_to_border*", "render/output/properties/dimensions.html#bpy-types-rendersettings-use-crop-to-border"),
("bpy.types.rendersettings.use_file_extension*", "render/output/properties/output.html#bpy-types-rendersettings-use-file-extension"),
@@ -292,6 +301,7 @@ url_manual_mapping = (
("bpy.types.spaceclipeditor.annotation_source*", "movie_clip/tracking/clip/sidebar/annotation.html#bpy-types-spaceclipeditor-annotation-source"),
("bpy.types.spaceoutliner.use_filter_children*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-children"),
("bpy.types.spaceoutliner.use_filter_complete*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-complete"),
("bpy.types.spacesequenceeditor.show_metadata*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-metadata"),
("bpy.types.spaceview3d.transform_orientation*", "editors/3dview/controls/orientation.html#bpy-types-spaceview3d-transform-orientation"),
("bpy.types.spaceview3d.use_local_collections*", "editors/3dview/sidebar.html#bpy-types-spaceview3d-use-local-collections"),
("bpy.types.toolsettings.use_snap_peel_object*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-peel-object"),
@@ -318,13 +328,14 @@ url_manual_mapping = (
("bpy.types.fluidflowsettings.use_plane_init*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-plane-init"),
("bpy.types.fluidflowsettings.velocity_coord*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-velocity-coord"),
("bpy.types.fluidflowsettings.volume_density*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-volume-density"),
("bpy.types.materialgpencilstyle.show_stroke*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-show-stroke"),
("bpy.types.materialgpencilstyle.show_stroke*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-show-stroke"),
("bpy.types.movietrackingcamera.focal_length*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-focal-length"),
("bpy.types.movietrackingcamera.pixel_aspect*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-pixel-aspect"),
("bpy.types.movietrackingcamera.sensor_width*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-sensor-width"),
("bpy.types.posebone.use_ik_rotation_control*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-use-ik-rotation-control"),
("bpy.types.rendersettings.use_bake_multires*", "render/cycles/baking.html#bpy-types-rendersettings-use-bake-multires"),
("bpy.types.scenegpencil.antialias_threshold*", "render/cycles/render_settings/grease_pencil.html#bpy-types-scenegpencil-antialias-threshold"),
("bpy.types.spacesequenceeditor.show_fcurves*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-fcurves"),
("bpy.types.spaceuveditor.sticky_select_mode*", "editors/uv/selecting.html#bpy-types-spaceuveditor-sticky-select-mode"),
("bpy.types.spaceview3d.show_object_viewport*", "editors/3dview/display/visibility.html#bpy-types-spaceview3d-show-object-viewport"),
("bpy.types.view3doverlay.show_fade_inactive*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-fade-inactive"),
@@ -335,7 +346,7 @@ url_manual_mapping = (
("bpy.ops.object.vertex_group_normalize_all*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize-all"),
("bpy.ops.outliner.collection_color_tag_set*", "editors/outliner/editing.html#bpy-ops-outliner-collection-color-tag-set"),
("bpy.ops.outliner.collection_enable_render*", "editors/outliner/editing.html#bpy-ops-outliner-collection-enable-render"),
("bpy.ops.outliner.collection_exclude_clear*", "editors/outliner/editing.html#bpy-ops-outliner-collection-exclude-clear"),
("bpy.ops.outliner.collection_exclude_clear*", "render/layers/introduction.html#bpy-ops-outliner-collection-exclude-clear"),
("bpy.ops.outliner.collection_holdout_clear*", "render/layers/introduction.html#bpy-ops-outliner-collection-holdout-clear"),
("bpy.ops.sculpt.face_set_change_visibility*", "sculpt_paint/sculpting/editing/face_sets.html#bpy-ops-sculpt-face-set-change-visibility"),
("bpy.ops.sculpt.face_sets_randomize_colors*", "sculpt_paint/sculpting/editing/face_sets.html#bpy-ops-sculpt-face-sets-randomize-colors"),
@@ -358,9 +369,10 @@ url_manual_mapping = (
("bpy.types.imageformatsettings.file_format*", "render/output/properties/output.html#bpy-types-imageformatsettings-file-format"),
("bpy.types.imagepaint.use_backface_culling*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-use-backface-culling"),
("bpy.types.linestyle*modifier_curvature_3d*", "render/freestyle/parameter_editor/line_style/modifiers/color/curvature_3d.html#bpy-types-linestyle-modifier-curvature-3d"),
("bpy.types.materialgpencilstyle.fill_color*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-fill-color"),
("bpy.types.materialgpencilstyle.fill_style*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-fill-style"),
("bpy.types.materialgpencilstyle.mix_factor*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-mix-factor"),
("bpy.types.materialgpencilstyle.fill_color*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-fill-color"),
("bpy.types.materialgpencilstyle.fill_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-fill-style"),
("bpy.types.materialgpencilstyle.mix_factor*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mix-factor"),
("bpy.types.materialgpencilstyle.pass_index*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-pass-index"),
("bpy.types.rendersettings.dither_intensity*", "render/output/properties/post_processing.html#bpy-types-rendersettings-dither-intensity"),
("bpy.types.rendersettings.simplify_volumes*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-volumes"),
("bpy.types.rendersettings.use_render_cache*", "render/output/properties/output.html#bpy-types-rendersettings-use-render-cache"),
@@ -374,6 +386,7 @@ url_manual_mapping = (
("bpy.types.spaceview3d.show_reconstruction*", "editors/3dview/display/overlays.html#bpy-types-spaceview3d-show-reconstruction"),
("bpy.types.toolsettings.gpencil_selectmode*", "grease_pencil/selecting.html#bpy-types-toolsettings-gpencil-selectmode"),
("bpy.types.toolsettings.use_auto_normalize*", "sculpt_paint/weight_paint/tool_settings/options.html#bpy-types-toolsettings-use-auto-normalize"),
("bpy.types.toolsettings.use_mesh_automerge*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-mesh-automerge"),
("bpy.types.toolsettings.use_snap_translate*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-translate"),
("bpy.types.toolsettings.use_uv_select_sync*", "editors/uv/selecting.html#bpy-types-toolsettings-use-uv-select-sync"),
("bpy.types.view3doverlay.wireframe_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-wireframe-opacity"),
@@ -402,14 +415,15 @@ url_manual_mapping = (
("bpy.types.fluidflowsettings.texture_size*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-texture-size"),
("bpy.types.fluidflowsettings.use_absolute*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-absolute"),
("bpy.types.geometrynodeattributecolorramp*", "modeling/geometry_nodes/attribute/attribute_color_ramp.html#bpy-types-geometrynodeattributecolorramp"),
("bpy.types.geometrynodeattributeproximity*", "modeling/geometry_nodes/attribute/attribute_proximity.html#bpy-types-geometrynodeattributeproximity"),
("bpy.types.geometrynodeattributerandomize*", "modeling/geometry_nodes/attribute/attribute_randomize.html#bpy-types-geometrynodeattributerandomize"),
("bpy.types.geometrynodesubdivisionsurface*", "modeling/geometry_nodes/mesh/subdivision_surface.html#bpy-types-geometrynodesubdivisionsurface"),
("bpy.types.imageformatsettings.color_mode*", "render/output/properties/output.html#bpy-types-imageformatsettings-color-mode"),
("bpy.types.linestyle*modifier_alongstroke*", "render/freestyle/parameter_editor/line_style/modifiers/color/along_stroke.html#bpy-types-linestyle-modifier-alongstroke"),
("bpy.types.linestyle*modifier_creaseangle*", "render/freestyle/parameter_editor/line_style/modifiers/color/crease_angle.html#bpy-types-linestyle-modifier-creaseangle"),
("bpy.types.linestylecolormodifier_tangent*", "render/freestyle/parameter_editor/line_style/modifiers/color/tangent.html#bpy-types-linestylecolormodifier-tangent"),
("bpy.types.materialgpencilstyle.mix_color*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-mix-color"),
("bpy.types.materialgpencilstyle.show_fill*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-show-fill"),
("bpy.types.materialgpencilstyle.mix_color*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mix-color"),
("bpy.types.materialgpencilstyle.show_fill*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-show-fill"),
("bpy.types.mesh.use_mirror_vertex_group_x*", "sculpt_paint/weight_paint/tool_settings/symmetry.html#bpy-types-mesh-use-mirror-vertex-group-x"),
("bpy.types.movietrackingcamera.division_k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-division-k"),
("bpy.types.movietrackingobject.keyframe_a*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingobject-keyframe-a"),
@@ -431,7 +445,7 @@ url_manual_mapping = (
("bpy.ops.object.assign_property_defaults*", "animation/armatures/posing/editing/apply.html#bpy-ops-object-assign-property-defaults"),
("bpy.ops.object.vertex_group_limit_total*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-limit-total"),
("bpy.ops.object.vertex_group_remove_from*", "modeling/meshes/properties/vertex_groups/vertex_groups.html#bpy-ops-object-vertex-group-remove-from"),
("bpy.ops.outliner.collection_exclude_set*", "editors/outliner/editing.html#bpy-ops-outliner-collection-exclude-set"),
("bpy.ops.outliner.collection_exclude_set*", "render/layers/introduction.html#bpy-ops-outliner-collection-exclude-set"),
("bpy.ops.outliner.collection_hide_inside*", "editors/outliner/editing.html#bpy-ops-outliner-collection-hide-inside"),
("bpy.ops.outliner.collection_holdout_set*", "render/layers/introduction.html#bpy-ops-outliner-collection-holdout-set"),
("bpy.ops.outliner.collection_show_inside*", "editors/outliner/editing.html#bpy-ops-outliner-collection-show-inside"),
@@ -470,11 +484,15 @@ url_manual_mapping = (
("bpy.types.spacetexteditor.use_find_wrap*", "editors/text_editor.html#bpy-types-spacetexteditor-use-find-wrap"),
("bpy.types.spaceuveditor.pixel_snap_mode*", "modeling/meshes/uv/editing.html#bpy-types-spaceuveditor-pixel-snap-mode"),
("bpy.types.spaceuveditor.use_live_unwrap*", "modeling/meshes/uv/editing.html#bpy-types-spaceuveditor-use-live-unwrap"),
("bpy.types.toolsettings.double_threshold*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-double-threshold"),
("bpy.types.toolsettings.lock_object_mode*", "interface/window_system/topbar.html#bpy-types-toolsettings-lock-object-mode"),
("bpy.types.toolsettings.mesh_select_mode*", "modeling/meshes/selecting/introduction.html#bpy-types-toolsettings-mesh-select-mode"),
("bpy.types.toolsettings.use_snap_project*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-project"),
("bpy.types.transformorientationslot.type*", "editors/3dview/controls/orientation.html#bpy-types-transformorientationslot-type"),
("bpy.types.vertexweightproximitymodifier*", "modeling/modifiers/modify/weight_proximity.html#bpy-types-vertexweightproximitymodifier"),
("bpy.types.view3doverlay.show_wireframes*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-wireframes"),
("bpy.types.view3dshading.background_type*", "editors/3dview/display/shading.html#bpy-types-view3dshading-background-type"),
("bpy.types.workspace.use_filter_by_owner*", "interface/window_system/workspaces.html#bpy-types-workspace-use-filter-by-owner"),
("bpy.ops.mesh.vertices_smooth_laplacian*", "modeling/meshes/editing/vertex/laplacian_smooth.html#bpy-ops-mesh-vertices-smooth-laplacian"),
("bpy.ops.object.multires_rebuild_subdiv*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-rebuild-subdiv"),
("bpy.ops.sequencer.select_side_of_frame*", "video_editing/sequencer/selecting.html#bpy-ops-sequencer-select-side-of-frame"),
@@ -492,9 +510,10 @@ url_manual_mapping = (
("bpy.types.fluiddomainsettings.clipping*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-clipping"),
("bpy.types.fluiddomainsettings.use_mesh*", "physics/fluid/type/domain/liquid/mesh.html#bpy-types-fluiddomainsettings-use-mesh"),
("bpy.types.geometrynodeattributecompare*", "modeling/geometry_nodes/attribute/attribute_compare.html#bpy-types-geometrynodeattributecompare"),
("bpy.types.geometrynodeattributeconvert*", "modeling/geometry_nodes/attribute/attribute_convert.html#bpy-types-geometrynodeattributeconvert"),
("bpy.types.material.preview_render_type*", "render/materials/preview.html#bpy-types-material-preview-render-type"),
("bpy.types.materialgpencilstyle.pattern*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-pattern"),
("bpy.types.materialgpencilstyle.texture*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-texture"),
("bpy.types.materialgpencilstyle.pattern*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-pattern"),
("bpy.types.materialgpencilstyle.texture*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-texture"),
("bpy.types.object.use_empty_image_alpha*", "modeling/empties.html#bpy-types-object-use-empty-image-alpha"),
("bpy.types.rendersettings.frame_map_new*", "render/output/properties/dimensions.html#bpy-types-rendersettings-frame-map-new"),
("bpy.types.rendersettings.frame_map_old*", "render/output/properties/dimensions.html#bpy-types-rendersettings-frame-map-old"),
@@ -539,7 +558,9 @@ url_manual_mapping = (
("bpy.types.fluiddomainsettings.gravity*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-gravity"),
("bpy.types.fluidflowsettings.flow_type*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-flow-type"),
("bpy.types.fluidflowsettings.subframes*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-subframes"),
("bpy.types.geometrynodeattributeremove*", "modeling/geometry_nodes/attribute/attribute_remove.html#bpy-types-geometrynodeattributeremove"),
("bpy.types.geometrynodepointdistribute*", "modeling/geometry_nodes/point/point_distribute.html#bpy-types-geometrynodepointdistribute"),
("bpy.types.gpencillayer.use_mask_layer*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-use-mask-layer"),
("bpy.types.greasepencil.use_curve_edit*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-use-curve-edit"),
("bpy.types.imagepaint.screen_grab_size*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-screen-grab-size"),
("bpy.types.linestyle*modifier_material*", "render/freestyle/parameter_editor/line_style/modifiers/color/material.html#bpy-types-linestyle-modifier-material"),
@@ -558,6 +579,7 @@ url_manual_mapping = (
("bpy.types.sculpt.detail_refine_method*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-detail-refine-method"),
("bpy.types.sculpt.symmetrize_direction*", "sculpt_paint/sculpting/tool_settings/symmetry.html#bpy-types-sculpt-symmetrize-direction"),
("bpy.types.sequenceeditor.show_overlay*", "video_editing/preview/sidebar.html#bpy-types-sequenceeditor-show-overlay"),
("bpy.types.soundsequence.show_waveform*", "video_editing/sequencer/sidebar/strip.html#bpy-types-soundsequence-show-waveform"),
("bpy.types.spaceoutliner.filter_invert*", "editors/outliner/interface.html#bpy-types-spaceoutliner-filter-invert"),
("bpy.types.spacetexteditor.show_margin*", "editors/text_editor.html#bpy-types-spacetexteditor-show-margin"),
("bpy.types.spline.radius_interpolation*", "modeling/curves/properties/active_spline.html#bpy-types-spline-radius-interpolation"),
@@ -571,6 +593,7 @@ url_manual_mapping = (
("bpy.ops.mesh.offset_edge_loops_slide*", "modeling/meshes/editing/edge/offset_edge_slide.html#bpy-ops-mesh-offset-edge-loops-slide"),
("bpy.ops.mesh.primitive_uv_sphere_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-uv-sphere-add"),
("bpy.ops.object.duplicate_move_linked*", "scene_layout/object/editing/duplicate_linked.html#bpy-ops-object-duplicate-move-linked"),
("bpy.ops.object.make_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-make-override-library"),
("bpy.ops.object.parent_no_inverse_set*", "scene_layout/object/editing/parent.html#bpy-ops-object-parent-no-inverse-set"),
("bpy.ops.object.vertex_group_quantize*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-quantize"),
("bpy.ops.outliner.collection_instance*", "editors/outliner/editing.html#bpy-ops-outliner-collection-instance"),
@@ -592,10 +615,11 @@ url_manual_mapping = (
("bpy.types.dynamicpaintcanvassettings*", "physics/dynamic_paint/canvas.html#bpy-types-dynamicpaintcanvassettings"),
("bpy.types.fluidflowsettings.use_flow*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-flow"),
("bpy.types.fmodifierfunctiongenerator*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierfunctiongenerator"),
("bpy.types.geometrynodecollectioninfo*", "modeling/geometry_nodes/input/collection_info.html#bpy-types-geometrynodecollectioninfo"),
("bpy.types.geometrynodepointstovolume*", "modeling/geometry_nodes/volume/points_to_volume.html#bpy-types-geometrynodepointstovolume"),
("bpy.types.geometrynodepointtranslate*", "modeling/geometry_nodes/point/point_translate.html#bpy-types-geometrynodepointtranslate"),
("bpy.types.gpencillayer.use_solo_mode*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-use-solo-mode"),
("bpy.types.greasepencil.use_multiedit*", "grease_pencil/multiframe.html#bpy-types-greasepencil-use-multiedit"),
("bpy.types.materialgpencilstyle.color*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-color"),
("bpy.types.materialgpencilstyle.color*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-color"),
("bpy.types.movietrackingcamera.nuke_k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-nuke-k"),
("bpy.types.movietrackingstabilization*", "movie_clip/tracking/clip/sidebar/stabilization/index.html#bpy-types-movietrackingstabilization"),
("bpy.types.object.display_bounds_type*", "scene_layout/object/properties/display.html#bpy-types-object-display-bounds-type"),
@@ -611,7 +635,6 @@ url_manual_mapping = (
("bpy.types.toolsettings.use_snap_self*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-self"),
("bpy.types.viewlayer.active_aov_index*", "render/layers/passes.html#bpy-types-viewlayer-active-aov-index"),
("bpy.ops.gpencil.bake_mesh_animation*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-bake-mesh-animation"),
("bpy.ops.gpencil.interpolate_reverse*", "grease_pencil/animation/interpolation.html#bpy-ops-gpencil-interpolate-reverse"),
("bpy.ops.gpencil.select_vertex_color*", "grease_pencil/selecting.html#bpy-ops-gpencil-select-vertex-color"),
("bpy.ops.gpencil.set_active_material*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-set-active-material"),
("bpy.ops.gpencil.stroke_change_color*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-change-color"),
@@ -629,6 +652,7 @@ url_manual_mapping = (
("bpy.ops.outliner.collection_isolate*", "editors/outliner/editing.html#bpy-ops-outliner-collection-isolate"),
("bpy.ops.pose.visual_transform_apply*", "animation/armatures/posing/editing/apply.html#bpy-ops-pose-visual-transform-apply"),
("bpy.ops.sequencer.view_ghost_border*", "video_editing/preview/sidebar.html#bpy-ops-sequencer-view-ghost-border"),
("bpy.ops.ui.override_type_set_button*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-type-set-button"),
("bpy.ops.view3d.blenderkit_asset_bar*", "addons/3d_view/blenderkit.html#bpy-ops-view3d-blenderkit-asset-bar"),
("bpy.types.animdata.action_influence*", "editors/nla/sidebar.html#bpy-types-animdata-action-influence"),
("bpy.types.armature.layers_protected*", "animation/armatures/properties/skeleton.html#bpy-types-armature-layers-protected"),
@@ -652,8 +676,8 @@ url_manual_mapping = (
("bpy.types.geometrynodepointinstance*", "modeling/geometry_nodes/point/point_instance.html#bpy-types-geometrynodepointinstance"),
("bpy.types.geometrynodepointseparate*", "modeling/geometry_nodes/point/point_separate.html#bpy-types-geometrynodepointseparate"),
("bpy.types.light.use_custom_distance*", "render/eevee/lighting.html#bpy-types-light-use-custom-distance"),
("bpy.types.materialgpencilstyle.flip*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-flip"),
("bpy.types.materialgpencilstyle.mode*", "grease_pencil/materials/grease_pencil_shader.html#bpy-types-materialgpencilstyle-mode"),
("bpy.types.materialgpencilstyle.flip*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-flip"),
("bpy.types.materialgpencilstyle.mode*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mode"),
("bpy.types.object.empty_display_size*", "modeling/empties.html#bpy-types-object-empty-display-size"),
("bpy.types.object.empty_display_type*", "modeling/empties.html#bpy-types-object-empty-display-type"),
("bpy.types.regionview3d.use_box_clip*", "editors/3dview/navigate/views.html#bpy-types-regionview3d-use-box-clip"),
@@ -684,7 +708,7 @@ url_manual_mapping = (
("bpy.ops.mesh.select_similar_region*", "modeling/meshes/selecting/similar.html#bpy-ops-mesh-select-similar-region"),
("bpy.ops.mesh.tris_convert_to_quads*", "modeling/meshes/editing/face/triangles_quads.html#bpy-ops-mesh-tris-convert-to-quads"),
("bpy.ops.node.read_fullsamplelayers*", "interface/controls/nodes/editing.html#bpy-ops-node-read-fullsamplelayers"),
("bpy.ops.object.datalayout_transfer*", "scene_layout/object/editing/relations/transfer_mesh_data_layout.html#bpy-ops-object-datalayout-transfer"),
("bpy.ops.object.datalayout_transfer*", "scene_layout/object/editing/link_transfer/transfer_mesh_data_layout.html#bpy-ops-object-datalayout-transfer"),
("bpy.ops.object.multires_base_apply*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-base-apply"),
("bpy.ops.object.randomize_transform*", "scene_layout/object/editing/transform/randomize.html#bpy-ops-object-randomize-transform"),
("bpy.ops.object.vertex_group_invert*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-invert"),
@@ -721,6 +745,7 @@ url_manual_mapping = (
("bpy.types.functionnodefloatcompare*", "modeling/geometry_nodes/utilities/float_compare.html#bpy-types-functionnodefloatcompare"),
("bpy.types.geometrynodeattributemix*", "modeling/geometry_nodes/attribute/attribute_mix.html#bpy-types-geometrynodeattributemix"),
("bpy.types.geometrynodejoingeometry*", "modeling/geometry_nodes/geometry/join_geometry.html#bpy-types-geometrynodejoingeometry"),
("bpy.types.geometrynodevolumetomesh*", "modeling/geometry_nodes/volume/volume_to_mesh.html#bpy-types-geometrynodevolumetomesh"),
("bpy.types.image.use_half_precision*", "editors/image/image_settings.html#bpy-types-image-use-half-precision"),
("bpy.types.imagepaint.interpolation*", "sculpt_paint/texture_paint/tool_settings/texture_slots.html#bpy-types-imagepaint-interpolation"),
("bpy.types.linestyle*modifier_noise*", "render/freestyle/parameter_editor/line_style/modifiers/color/noise.html#bpy-types-linestyle-modifier-noise"),
@@ -763,6 +788,7 @@ url_manual_mapping = (
("bpy.ops.sequencer.movie_strip_add*", "video_editing/sequencer/strips/movie_image.html#bpy-ops-sequencer-movie-strip-add"),
("bpy.ops.sequencer.reassign_inputs*", "video_editing/sequencer/editing.html#bpy-ops-sequencer-reassign-inputs"),
("bpy.ops.sequencer.sound_strip_add*", "video_editing/sequencer/strips/sound.html#bpy-ops-sequencer-sound-strip-add"),
("bpy.ops.ui.remove_override_button*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-remove-override-button"),
("bpy.ops.view3d.view_center_camera*", "editors/3dview/navigate/camera_view.html#bpy-ops-view3d-view-center-camera"),
("bpy.types.armaturegpencilmodifier*", "grease_pencil/modifiers/deform/armature.html#bpy-types-armaturegpencilmodifier"),
("bpy.types.brush.cloth_deform_type*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-deform-type"),
@@ -785,12 +811,13 @@ url_manual_mapping = (
("bpy.types.curve.use_deform_bounds*", "modeling/curves/properties/shape.html#bpy-types-curve-use-deform-bounds"),
("bpy.types.freestylemodulesettings*", "render/freestyle/python.html#bpy-types-freestylemodulesettings"),
("bpy.types.functionnodebooleanmath*", "modeling/geometry_nodes/utilities/boolean_math.html#bpy-types-functionnodebooleanmath"),
("bpy.types.functionnodeinputstring*", "modeling/geometry_nodes/input/string.html#bpy-types-functionnodeinputstring"),
("bpy.types.functionnodeinputvector*", "modeling/geometry_nodes/input/vector.html#bpy-types-functionnodeinputvector"),
("bpy.types.functionnoderandomfloat*", "modeling/geometry_nodes/input/random_float.html#bpy-types-functionnoderandomfloat"),
("bpy.types.geometrynodepointrotate*", "modeling/geometry_nodes/point/point_rotate.html#bpy-types-geometrynodepointrotate"),
("bpy.types.geometrynodetriangulate*", "modeling/geometry_nodes/mesh/triangulate.html#bpy-types-geometrynodetriangulate"),
("bpy.types.gpencillayer.blend_mode*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-blend-mode"),
("bpy.types.gpencillayer.mask_layer*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-mask-layer"),
("bpy.types.gpencillayer.use_lights*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-use-lights"),
("bpy.types.gpencilsculptguide.type*", "grease_pencil/modes/draw/guides.html#bpy-types-gpencilsculptguide-type"),
("bpy.types.laplaciandeformmodifier*", "modeling/modifiers/deform/laplacian_deform.html#bpy-types-laplaciandeformmodifier"),
("bpy.types.laplaciansmoothmodifier*", "modeling/modifiers/deform/laplacian_smooth.html#bpy-types-laplaciansmoothmodifier"),
@@ -873,6 +900,7 @@ url_manual_mapping = (
("bpy.types.curve.bevel_resolution*", "modeling/curves/properties/geometry.html#bpy-types-curve-bevel-resolution"),
("bpy.types.cyclesmaterialsettings*", "render/cycles/material_settings.html#bpy-types-cyclesmaterialsettings"),
("bpy.types.dopesheet.show_summary*", "editors/dope_sheet/introduction.html#bpy-types-dopesheet-show-summary"),
("bpy.types.geometrynodeisviewport*", "modeling/geometry_nodes/input/is_viewport.html#bpy-types-geometrynodeisviewport"),
("bpy.types.geometrynodeobjectinfo*", "modeling/geometry_nodes/input/object_info.html#bpy-types-geometrynodeobjectinfo"),
("bpy.types.geometrynodepointscale*", "modeling/geometry_nodes/point/point_scale.html#bpy-types-geometrynodepointscale"),
("bpy.types.imagepaint.use_occlude*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-use-occlude"),
@@ -902,6 +930,7 @@ url_manual_mapping = (
("bpy.ops.curve.spline_weight_set*", "modeling/curves/editing/other.html#bpy-ops-curve-spline-weight-set"),
("bpy.ops.gpencil.blank_frame_add*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-blank-frame-add"),
("bpy.ops.gpencil.frame_duplicate*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-frame-duplicate"),
("bpy.ops.gpencil.layer_duplicate*", "grease_pencil/properties/layers.html#bpy-ops-gpencil-layer-duplicate"),
("bpy.ops.gpencil.recalc_geometry*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-recalc-geometry"),
("bpy.ops.gpencil.stroke_caps_set*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-caps-set"),
("bpy.ops.gpencil.stroke_separate*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-stroke-separate"),
@@ -918,6 +947,7 @@ url_manual_mapping = (
("bpy.ops.node.tree_socket_remove*", "interface/controls/nodes/groups.html#bpy-ops-node-tree-socket-remove"),
("bpy.ops.object.constraints_copy*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-constraints-copy"),
("bpy.ops.object.gpencil_modifier*", "grease_pencil/modifiers/index.html#bpy-ops-object-gpencil-modifier"),
("bpy.ops.object.make_links_scene*", "scene_layout/object/editing/link_transfer/link_scene.html#bpy-ops-object-make-links-scene"),
("bpy.ops.object.make_single_user*", "scene_layout/object/editing/relations/make_single_user.html#bpy-ops-object-make-single-user"),
("bpy.ops.object.multires_reshape*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-reshape"),
("bpy.ops.object.select_hierarchy*", "scene_layout/object/selecting.html#bpy-ops-object-select-hierarchy"),
@@ -965,6 +995,7 @@ url_manual_mapping = (
("bpy.types.fluideffectorsettings*", "physics/fluid/type/effector.html#bpy-types-fluideffectorsettings"),
("bpy.types.followtrackconstraint*", "animation/constraints/motion_tracking/follow_track.html#bpy-types-followtrackconstraint"),
("bpy.types.geometrynodeedgesplit*", "modeling/geometry_nodes/mesh/edge_split.html#bpy-types-geometrynodeedgesplit"),
("bpy.types.geometrynodesubdivide*", "modeling/geometry_nodes/mesh/subdivide.html#bpy-types-geometrynodesubdivide"),
("bpy.types.geometrynodetransform*", "modeling/geometry_nodes/geometry/transform.html#bpy-types-geometrynodetransform"),
("bpy.types.gpencilsculptsettings*", "grease_pencil/properties/index.html#bpy-types-gpencilsculptsettings"),
("bpy.types.light.cutoff_distance*", "render/eevee/lighting.html#bpy-types-light-cutoff-distance"),
@@ -996,6 +1027,7 @@ url_manual_mapping = (
("bpy.types.volume.frame_duration*", "modeling/volumes/properties.html#bpy-types-volume-frame-duration"),
("bpy.types.volumedisplay.density*", "modeling/volumes/properties.html#bpy-types-volumedisplay-density"),
("bpy.types.volumerender.clipping*", "modeling/volumes/properties.html#bpy-types-volumerender-clipping"),
("bpy.types.workspace.object_mode*", "interface/window_system/workspaces.html#bpy-types-workspace-object-mode"),
("bpy.ops.curve.switch_direction*", "modeling/curves/editing/segments.html#bpy-ops-curve-switch-direction"),
("bpy.ops.gpencil.duplicate_move*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-duplicate-move"),
("bpy.ops.gpencil.stroke_arrange*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-arrange"),
@@ -1004,6 +1036,7 @@ url_manual_mapping = (
("bpy.ops.mesh.loop_multi_select*", "modeling/meshes/selecting/loops.html#bpy-ops-mesh-loop-multi-select"),
("bpy.ops.mesh.vert_connect_path*", "modeling/meshes/editing/vertex/connect_vertex_path.html#bpy-ops-mesh-vert-connect-path"),
("bpy.ops.nla.action_sync_length*", "editors/nla/editing.html#bpy-ops-nla-action-sync-length"),
("bpy.ops.object.make_links_data*", "scene_layout/object/editing/link_transfer/link_data.html#bpy-ops-object-make-links-data"),
("bpy.ops.object.paths_calculate*", "animation/motion_paths.html#bpy-ops-object-paths-calculate"),
("bpy.ops.object.transform_apply*", "scene_layout/object/editing/apply.html#bpy-ops-object-transform-apply"),
("bpy.ops.outliner.lib_operation*", "files/linked_libraries/link_append.html#bpy-ops-outliner-lib-operation"),
@@ -1183,7 +1216,7 @@ url_manual_mapping = (
("bpy.ops.nla.make_single_user*", "editors/nla/editing.html#bpy-ops-nla-make-single-user"),
("bpy.ops.node.read_viewlayers*", "interface/controls/nodes/editing.html#bpy-ops-node-read-viewlayers"),
("bpy.ops.node.tree_socket_add*", "interface/controls/nodes/groups.html#bpy-ops-node-tree-socket-add"),
("bpy.ops.object.data_transfer*", "scene_layout/object/editing/relations/transfer_mesh_data.html#bpy-ops-object-data-transfer"),
("bpy.ops.object.data_transfer*", "scene_layout/object/editing/link_transfer/transfer_mesh_data.html#bpy-ops-object-data-transfer"),
("bpy.ops.object.select_camera*", "scene_layout/object/selecting.html#bpy-ops-object-select-camera"),
("bpy.ops.object.select_linked*", "scene_layout/object/selecting.html#bpy-ops-object-select-linked"),
("bpy.ops.object.select_mirror*", "scene_layout/object/selecting.html#bpy-ops-object-select-mirror"),
@@ -1206,6 +1239,7 @@ url_manual_mapping = (
("bpy.ops.wm.memory_statistics*", "advanced/operators.html#bpy-ops-wm-memory-statistics"),
("bpy.types.adjustmentsequence*", "video_editing/sequencer/strips/adjustment.html#bpy-types-adjustmentsequence"),
("bpy.types.alphaundersequence*", "video_editing/sequencer/strips/effects/alpha_over_under_overdrop.html#bpy-types-alphaundersequence"),
("bpy.types.armature.show_axes*", "animation/armatures/properties/display.html#bpy-types-armature-show-axes"),
("bpy.types.armatureconstraint*", "animation/constraints/relationship/armature.html#bpy-types-armatureconstraint"),
("bpy.types.compositornodeblur*", "compositing/types/filter/blur_node.html#bpy-types-compositornodeblur"),
("bpy.types.compositornodecomb*", "editors/texture_node/types/color/combine_separate.html#bpy-types-compositornodecomb"),
@@ -1268,7 +1302,6 @@ url_manual_mapping = (
("bpy.ops.curve.smooth_radius*", "modeling/curves/editing/control_points.html#bpy-ops-curve-smooth-radius"),
("bpy.ops.curve.smooth_weight*", "modeling/curves/editing/control_points.html#bpy-ops-curve-smooth-weight"),
("bpy.ops.font.change_spacing*", "modeling/texts/editing.html#bpy-ops-font-change-spacing"),
("bpy.ops.gpencil.interpolate*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-interpolate"),
("bpy.ops.gpencil.stroke_flip*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-flip"),
("bpy.ops.gpencil.stroke_join*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-join"),
("bpy.ops.gpencil.stroke_trim*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-trim"),
@@ -1468,7 +1501,6 @@ url_manual_mapping = (
("bpy.ops.nla.tracks_delete*", "editors/nla/editing.html#bpy-ops-nla-tracks-delete"),
("bpy.ops.node.group_insert*", "interface/controls/nodes/groups.html#bpy-ops-node-group-insert"),
("bpy.ops.object.lightprobe*", "render/eevee/light_probes/index.html#bpy-ops-object-lightprobe"),
("bpy.ops.object.make_links*", "scene_layout/object/editing/make_links.html#bpy-ops-object-make-links"),
("bpy.ops.object.make_local*", "files/linked_libraries/link_append.html#bpy-ops-object-make-local"),
("bpy.ops.object.origin_set*", "scene_layout/object/origin.html#bpy-ops-object-origin-set"),
("bpy.ops.object.parent_set*", "scene_layout/object/editing/parent.html#bpy-ops-object-parent-set"),
@@ -1553,6 +1585,7 @@ url_manual_mapping = (
("bpy.ops.uv.snap_selected*", "modeling/meshes/uv/editing.html#bpy-ops-uv-snap-selected"),
("bpy.ops.view3d.localview*", "editors/3dview/navigate/local_view.html#bpy-ops-view3d-localview"),
("bpy.ops.view3d.view_axis*", "editors/3dview/navigate/viewpoint.html#bpy-ops-view3d-view-axis"),
("bpy.ops.wm.owner_disable*", "interface/window_system/workspaces.html#bpy-ops-wm-owner-disable"),
("bpy.types.bone.show_wire*", "animation/armatures/bones/properties/display.html#bpy-types-bone-show-wire"),
("bpy.types.brush.hardness*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-hardness"),
("bpy.types.curvesmodifier*", "video_editing/sequencer/sidebar/modifiers.html#bpy-types-curvesmodifier"),
@@ -1609,6 +1642,7 @@ url_manual_mapping = (
("bpy.ops.node.group_make*", "interface/controls/nodes/groups.html#bpy-ops-node-group-make"),
("bpy.ops.object.armature*", "animation/armatures/index.html#bpy-ops-object-armature"),
("bpy.ops.object.face_map*", "modeling/meshes/properties/object_data.html#bpy-ops-object-face-map"),
("bpy.ops.object.join_uvs*", "scene_layout/object/editing/link_transfer/copy_uvmaps.html#bpy-ops-object-join-uvs"),
("bpy.ops.outliner.delete*", "editors/outliner/editing.html#bpy-ops-outliner-delete"),
("bpy.ops.pose.relax_rest*", "animation/armatures/posing/editing/in_betweens.html#bpy-ops-pose-relax-rest"),
("bpy.ops.rigidbody.world*", "physics/rigid_body/world.html#bpy-ops-rigidbody-world"),
@@ -1621,6 +1655,7 @@ url_manual_mapping = (
("bpy.ops.view3d.view_pan*", "editors/3dview/navigate/navigation.html#bpy-ops-view3d-view-pan"),
("bpy.ops.wm.app_template*", "advanced/app_templates.html#bpy-ops-wm-app-template"),
("bpy.ops.wm.batch_rename*", "files/blend/rename.html#bpy-ops-wm-batch-rename"),
("bpy.ops.wm.owner_enable*", "interface/window_system/workspaces.html#bpy-ops-wm-owner-enable"),
("bpy.ops.wm.redraw_timer*", "advanced/operators.html#bpy-ops-wm-redraw-timer"),
("bpy.types.*light.shadow*", "render/eevee/lighting.html#bpy-types-light-shadow"),
("bpy.types.armaturebones*", "animation/armatures/bones/index.html#bpy-types-armaturebones"),
@@ -1651,6 +1686,7 @@ url_manual_mapping = (
("bpy.types.sceneeevee.gi*", "render/eevee/render_settings/indirect_lighting.html#bpy-types-sceneeevee-gi"),
("bpy.types.scenesequence*", "video_editing/sequencer/strips/scene.html#bpy-types-scenesequence"),
("bpy.types.screwmodifier*", "modeling/modifiers/generate/screw.html#bpy-types-screwmodifier"),
("bpy.types.sequence.name*", "video_editing/sequencer/sidebar/strip.html#bpy-types-sequence-name"),
("bpy.types.sequenceproxy*", "video_editing/sequencer/sidebar/proxy.html#bpy-types-sequenceproxy"),
("bpy.types.shaderfxswirl*", "grease_pencil/visual_effects/swirl.html#bpy-types-shaderfxswirl"),
("bpy.types.shadernodergb*", "render/shader_nodes/input/rgb.html#bpy-types-shadernodergb"),
@@ -1671,6 +1707,7 @@ url_manual_mapping = (
("bpy.ops.fluid.bake_all*", "physics/fluid/type/domain/cache.html#bpy-ops-fluid-bake-all"),
("bpy.ops.fluid.free_all*", "physics/fluid/type/domain/cache.html#bpy-ops-fluid-free-all"),
("bpy.ops.gpencil.delete*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-delete"),
("bpy.ops.gpencil.reveal*", "grease_pencil/properties/layers.html#bpy-ops-gpencil-reveal"),
("bpy.ops.gpencil.select*", "grease_pencil/selecting.html#bpy-ops-gpencil-select"),
("bpy.ops.graph.decimate*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-decimate"),
("bpy.ops.mesh.fill_grid*", "modeling/meshes/editing/face/grid_fill.html#bpy-ops-mesh-fill-grid"),
@@ -1774,6 +1811,7 @@ url_manual_mapping = (
("bpy.types.vertexpaint*", "sculpt_paint/vertex_paint/index.html#bpy-types-vertexpaint"),
("bpy.types.volumegrids*", "modeling/volumes/properties.html#bpy-types-volumegrids"),
("bpy.types.woodtexture*", "render/materials/legacy_textures/types/wood.html#bpy-types-woodtexture"),
("bpy.types.world.color*", "render/lights/world.html#bpy-types-world-color"),
("bpy.ops.*.select_box*", "interface/selecting.html#bpy-ops-select-box"),
("bpy.ops.curve.delete*", "modeling/curves/editing/curve.html#bpy-ops-curve-delete"),
("bpy.ops.curve.reveal*", "modeling/curves/editing/curve.html#bpy-ops-curve-reveal"),
@@ -1946,6 +1984,7 @@ url_manual_mapping = (
("bpy.types.sound*", "render/output/audio/index.html#bpy-types-sound"),
("bpy.types.space*", "editors/index.html#bpy-types-space"),
("bpy.types.theme*", "editors/preferences/themes.html#bpy-types-theme"),
("bpy.types.world*", "render/lights/world.html#bpy-types-world"),
("bpy.ops.action*", "animation/actions.html#bpy-ops-action"),
("bpy.ops.camera*", "render/cameras.html#bpy-ops-camera"),
("bpy.ops.cycles*", "render/cycles/index.html#bpy-ops-cycles"),

View File

@@ -953,7 +953,7 @@
frame_node="#9b9b9ba0"
matte_node="#977474"
distor_node="#749797"
noodle_curving="0"
noodle_curving="4"
grid_levels="2"
input_node="#cb3d4a"
output_node="#cb3d4a"

Some files were not shown because too many files have changed in this diff Show More