Age | Commit message (Collapse) | Author |
|
The general idea of this change is to have a runtime data pointer
in the ModifierData, so it can be preserved through copy-on-write
updates by the dependency graph.
This is where subdivision surface modifier can store its topology
cache, so it is not getting trashed on every copy-on-write which
is happening when moving a vertex.
Similar mechanism should be used by multiresolution, dynamic paint
and some other modifiers which cache evaluated data.
This fixes T61746.
Thing to keep in mind, that there are more reports about slow
subdivision surface in the tracker, but that boils down to the
fact that those have a lot of extraordinary vertices, and hence
a lot slower to evaluated topology.
Other thing is, this speeds up oeprations which doesn't change
topology (i.e. moving vertices).
Reviewers: brecht
Reviewed By: brecht
Maniphest Tasks: T61746
Differential Revision: https://developer.blender.org/D4541
|
|
only then I can purge previous deleted meshes.
libquery code has some specific handling for IDs tagged as 'no_main',
among which to never consider them as refcounted/refcounting other IDs.
This is fine, but it also means we have to be careful when moving an ID
from main to out-of-main status, to do all id remapping we need
//before// we tag it as no_main.
That was a bit tedious to track down, we'll have to be careful that all
the corner cases we have to take care of, do not end up in a giant soup
of expections to exceptions, where nobody can find its way anymore...
|
|
|
|
Currently not needed that much, but will ease some further
development which is related on preserving runtime modifier
data.
|
|
|
|
modifier.
A deform-only modifier that needs access to normals need a copy of
evaluated mesh with those normals updated, when it is not the first one
in the stack.
That issue had been partially fixed in Object mode a long time ago
(see T23673), but it was still broken for deform-only stacks cases.
And it was also completely missing from the Edit mode code
(`editbmesh_calc_modifiers()` function).
|
|
|
|
|
|
There isn't any advantage to this over comparing the squared length.
|
|
PointerProperty.
We are in a totally out-of-main context here, so no refcounting of any ID...
Note that this whole 'render preview' area could use some refactor with
modern ID management API, but that would go way beyond a mere bugfix,
and it is not the time to do such things.
|
|
This replaces the global `PEData->dist` with a thread local variable
that is passed into the callback functions separately.
There are two new function types which have `Hit` in the name.
Those take the distance to the mouse as an additional parameter.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4538
|
|
|
|
|
|
|
|
So no need to have custom verbose own detection cases for those guys...
|
|
|
|
Allow Python to override this method.
Differential Revision: https://developer.blender.org/D4537
|
|
We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.
When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.
Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).
|
|
Silences warning when running with --debug. If/when this add-on is ported,
users that need it can enable it again.
|
|
|
|
* Make those single-line warning, there is really no reason to raise
exception (i.e. error) for that.
* Only show them when `--debug` option is set.
|
|
|
|
|
|
|
|
This couldn't be accessed because the poll function was checking the
active button.
Add a "color_ramp" context pointer which is set by the menu.
Alternative fix to D3984
|
|
|
|
|
|
Resolves T62612
|
|
|
|
The RNA name didn't match the name used in the UI,
making the quick favourites menu show this as 'Align'.
|
|
|
|
Logic to for boids to avoid head-on collisions was in BLI_kdtree.
Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.
|
|
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
|
|
|
|
This commit groups several options that were tested in grease pencil branch:
- Changes to fill algorithms and improves, specially in small areas and stroke corners.
New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.
Kudos to @charlie for coding this fill improvements.
- New 3D cursor view plane option.
Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.
- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.
Changes reviewed by @pepeland and @mendio
|
|
T62570 and T61796 show that we need two slightly different behaviors in
post-linking collection process:
* For linking, we never want to instantiate indirectly-linked
collections or objects.
* For appending however, since all collections and objects will become
local and hence need instantiation, we want to 'link to scene' all
collections first, better than instantiating the objects in the master
collection opf current scene.
|
|
for a linked collection.
Forgot to tag properly RNA property in rB439437fa3a44.
|
|
This makes degenerate triangles be ignored, as they cause artifacts and
don't contribute to the result anyway. There is an extra cost for
all triangles, to check if they are degenerate. Though not ideal, this
seems to be the safest solution at the moment (see code comments).
This commit also changes the clamp value for the bleed len_fact from 5
to 10, to give good corner results with some sharper angles, considering
they will be rounded later.
A lot of the texture paint initialization code could be optimized
by caching the results throughout the session, instead of rerunning it
for each stroke. Stroke initialization is way too expensive at the
moment, and does many redundant computations.
|
|
There are two issues at play here.
First, BLF_width computed a width that was not wide
enough to actually hold the text.
Second, blf_glyph_calc_rect_test computed an incorrect
rect->xmax when the glyph was moved to the left a bit.
We ignore the overlap on the left, but the right side
should still be adjusted accordingly.
|
|
The cause of this issue goes deeper inside of the custom nature of
the event loop. In short, when not using [NSApp run] closing "About"
window does not make previous key window a key again.
The solution is quite similar to other projects, but we only force
key window from handler when closing one appears to be "About" window.
In all other cases we leave it up to Blender's window manager to make
decision and do not interfere with it.
Test plan:
- Open Blender application
- Go to Blender -> About Blender menu item
- Close About window
- Note that Blender's window does not become active again.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4534
|
|
|
|
Scenes can now have a 'cycles' key when starting, so account for that.
|
|
Actually, when you press G/R/S in Draw mode, the transformations can be done, but this is annoying in draw mode and must be captured an cancel.
This patch capture the transformation and cancel it.
Reviewed by @brecht
|
|
|
|
|
|
Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.
|
|
Makes preview kernel appear quicker when background color is fixed.
|
|
No functional changes, logic here got too complex after many changes over
the years.
|
|
|
|
|