Age | Commit message (Collapse) | Author |
|
This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.
Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.
Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.
In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.
One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Subscribers: dfelinto
Differential Revision: https://developer.blender.org/D3124
|
|
|
|
Was testing with small number of items, so this went unnoticed.
|
|
|
|
|
|
Add versions of add/lookup that check the previous item.
|
|
|
|
Differential Revision: https://developer.blender.org/D3109
|
|
|
|
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
undo data is restored.
- Some undo types accumulate changes (image & text editing)
others store the state multiple times (with de-duplication).
This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
manage restoring correct ID's.
Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
Previously this wasn't done, making history fail in some cases.
This can be optimized to skip some combinations of undo steps.
grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.
See D3113
|
|
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.
See D3120 for details.
|
|
- Get memory usage from MemFile instead of MEM API
avoids possible invalid when threads alloc memory.
- Use size_t instead of uint and uintptr_t to store size.
- Rename UndoElem.str -> filename
- Rename MemFileChunk.ident -> is_identical
|
|
Undo sometimes reserved too much space in the buffer,
now assert when this happens and allocate the exact size needed.
Note prepares for moving text editor undo out of the text block (D3113)
which will split the undo buffer into a list of undo steps.
|
|
|
|
|
|
Tabs in middle of code (mostly for no reason / by accident).
|
|
|
|
Also make it to return truth when everything is good and
false otherwise.
|
|
|
|
|
|
Texture paint slots were copied as a pointer, causing double-free.
|
|
Was mixed with object functionality.
|
|
Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to
a vast amount of bad things.
|
|
We had a mix of two issues here actually:
* First, Brush are currently using their own sauce for custom previews,
this is not great, but moving them to use common ImagePreview system of
IDs is a low-priority TODO. For now, they should totally ignore their
own ImagePreview.
* Second, BKE_icon_changed() would systematically create a PreviewImage
for ID types supporting it, which does not really makes sense, this
function is merely here to 'tag' previews as outdated. Actual creation
of previews is deferred to later, when we actually need them.
|
|
|
|
Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.
Thanks Bastien for review!
|
|
This way we can easily control format and keep it consistent.
And also possibly do other trickery, like coloring addresses!
|
|
|
|
For IDProps IDarray, IDP_EqualsProperties was called for each item,
instead of IDP_EqualsProperties_ex, discarding value of `is_strict`
option.
Probably not an issue with current code, though.
|
|
|
|
|
|
|
|
This way we can add even more statistics, even one which will be print
to the console.
Would be nice if we also have verbosity level control.
|
|
This was already done for the Principled BSDF to be compatible with typical
baked roughness maps in PBR workflows.
|
|
|
|
Each AnimData block has a set of Blend/Extrapolation/Influence settings
that can be used to control how the active action is blended with the
NLA stack. However, these settings were not getting copied over to the
newly created strips (as the push-down code existed long before these
settings were added).
This commit solves this in several ways:
* Active Action Blend/Extrapolation/Influence settings now get copied
to the new strips when adding them to the NLA stack via Push Down.
Note: This doesn't happen when there are no existing NLA tracks,
as these settings don't get used in that case.
* Strip Influence will be copied across when inf < 1.0 (i.e. when a
non-default value is used), to maintain the effect. To make this work,
the influence value will get added as a keyframe to the strip's
"Influence" Control FCurve.
- See code comments for an alternative approach and why that was not chosen
- Strip Time still doesn't get keyframes added automatically yet.
* To ensure the "extrapolation mode" settings don't get always overwritten,
I've put in place a compromise: the extrapolation will only get changed
if the chosen setting will cause problmes (i.e. hold forward & back -> hold forward
if there are other tracks before it already).
Not safe for backporting to 2.79[x] stable releases.
|
|
Vertex group remapping utility function,
now shared between object join and array modifier cap-ends.
Weights which don't exist are removed.
D3092 by @Foaly
|
|
Main purpose is to make it possible to cover FPS detection with regression test.
But it might also be handy for some other scripters.
Thanks Campbell for review!
|
|
Quite harmless and won't be a problem in 2.8.
|
|
This is probably a better way to handle it: instead of totally
discarding scaling of non-free axes, keep the ratio between them.
Basically the logic of the constraint is now that it rescales the
object uniformly in the non-free axis plane in order to force the
total volume change to the desired value.
|
|
Was calculating all 3
|
|
Also minor cleanup.
|
|
It seems the reason the old version of the constraint overcompensates
as reported in T48079 is to allow the constraint to work with uniform
scaling on all axes. However the way it did that actually _requires_
uniform scaling for the constraint to work correctly, and breaks if
only the free scaling axis is used to avoid redundant channels.
This version attempts to allow both by discarding scaling in the non-
free directions instead of applying the correction on top of it.
|
|
This merges changes in internals, runtime-only of existing custom
normals code, which make sense as of themselves, and will make diff of
soc branch easier/lighter to review.
In the details, it mostly changes two things:
* Now, smooth fans (aka MLoopNorSpaceArray) can store either loop
indices, or pointers to BMLoop themselves. This makes sense since in
BMesh, it's relatively easy to get index from a BMElement, but nearly
impracticable to go the other way around.
* First change enforces another, now we cannot rely anymore on `loops`
being NULL in MLoopNorSpace to detect single-loop fans, so we instead
store that info in a new flag.
Again, these are expected to be totally non-functional changes.
|
|
|
|
D3081 by @rjg, with others.
|
|
This is used to determine which voxels are to be considered empty space.
Previously it was hardcoded for converting dense grids to OpenVDB grids
to reduce disk space usage.
This value is also useful for rendering engines to know, i.e. to
optimize ray marching.
|
|
Some other software cannot handle grid names with spaces in them. We still check for names with spaces so as to not break old
files.
This fixes T53802.
|
|
Similar to the Principled BSDF, this should make it easier to set up volume
materials. Smoke and fire can be rendererd with just a single principled
volume node, the appropriate attributes will be used when available. The node
also works for simpler homogeneous volumes like water or mist.
Differential Revision: https://developer.blender.org/D3033
|
|
|