Age | Commit message (Collapse) | Author |
|
This saves memory and evaluation time for simple static meshes with e.g. a
subdivision surface modifier. If no CD_ORCO layer exists then we assume the
actual vertex coordinates are equal to the original undeformed coordinates.
|
|
While user should never do that, it appears many end up using a 'view
layer' instancing collection as RBW collection, and even worse, have
objects in that unique collection.
Therefore, when removing RB simulation from an object, which among other
things has to remove it from the RBW collection, it would fully delete
the object from the blend file.
This fix merely checks the usercount of RB-removed object, and if it is
at 1 (which means object was in a single collection), it adds it to the
scene's master collection first.
|
|
Allows it to be preserved during copy-on-write update when on-geometry
related update is needed.
This is a required part for T63537, where we need to preserve the entire
evaluation data when object is tagged for only RECALC_COPY_ON_WRITE.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5023
|
|
Revert part of d56c0a0a6affcdfd7335c
|
|
assigned to it
This was a design decision, but now we have decided to change it using the active material for the strokes using deleted material.
If the material slot is empty a new material is created to keep the strokes visible.
|
|
Now when using imperial dimensions,
using 'm' suffix is treated as meters instead of miles
(use 'mi' or 'mile' instead).
Resolves T65731
|
|
|
|
|
|
Cheap tip: anything that is not "Camel Case" and/or that is more than
a few words long should use `TIP_` translation, not `IFACE_` one.
Also added several missing strings (including the one reported in D5056
by Jean First (@robbott), thanks).
|
|
parent collection.
Collections are a tad annoying with all their caching of objects... When
we modify content of a children collection, we need to tag DeG for CoW
update of all of the ancestors.
For now keeping that recursive tagging helper private, but would not be
surprised if we found more similar cases and needed to expose it to more
code...
|
|
FFmpeg uses a fraction of integers to indicate the frame rate, whereas
Blender uses `int / float`. When a custom frame rate is used with
non-integer base, the FPS and Base settings were multiplied with 100000
before passing to FFmpeg as `int`. This could overflow when a high
enough FPS setting was used, which is the case when importing a video of
almost-but-not-quite-integer frame rate into the VSE. The overflow
caused FFmpeg to return an error "The encoder timebase is not set",
which is rather cryptic for users.
The new solution is to take the max int and divide that by the frame
rate, and use that ratio to pass to FFmpeg. This won't overflow, and
thus allows exporting arbitrary frame rates.
|
|
A lot of areas were querying sound information directly using audio handle
which does not exist on an original sound IDs.
This change basically makes it so it's possible to query information about
given sound ID, without worrying about whether it's loaded or not: if it is
needed to load it first it happens automatically (no automatically-opened
handles are left behind though).
While this seems a bit extreme to open files on such queries it is still
better than the old situation when all sound handles were opened on file
load, no matter if it's needed or not. Besides, none of the changed code
paths are performance critical, just handful of tools.
Fixes T65696: Sequencer fails to create a new sound sequence strip via Python
Fixes T65656: Audio strip - SHIFT K crashes Blender
Reviewers: brecht
Reviewed By: brecht
Subscribers: ISS
Maniphest Tasks: T65696, T65656
Differential Revision: https://developer.blender.org/D5061
|
|
We need to tag the `mesh_eval` of curve as owned, when we generate one,
otherwise freeing code would not free it.
|
|
How to reproduce: use 1-10 to change the visible collection. If the
collection was globally invisible, it would be set to globally visible.
This was a left over from the previous collection visibility design.
Now that we have a more clear separation between temporary visibility
(i.e., layer collection visibiilty) and a global visibility setting
(i.e., collection visibility) we should keep them separated.
|
|
|
|
|
|
Need to pull in speakers from scene strips and make sure they
are properly updated.
|
|
|
|
Allows to move scene sound update to dependency graph evaluation.
|
|
Ensures that evaluated mesh shares the same settings as its owner when
updates related on animation system happens.
|
|
Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.
The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.
|
|
Author: Olly Funkster, Richard Antalík
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2504
|
|
Add invalidation to strip add functions
Add invalidation for scene and movieclip strips
Skip invalidation for sound strips
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4989
|
|
3D engine settings were used to select image scaling method.
Use higher quality scaling only for rendering.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4995
|
|
We need to find a better solution for mixing normal refreshes in some corner
cases. We actually had similar issues in 2.79 anyway, not crashing is more
important.
|
|
There is no obvious threading-unsafe code in the localization.
The main source of issues were the new_node/new_socket pointers
which are no longer used during node tree duplication.
|
|
|
|
|
|
|
|
This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.
For the viewport playback sound uses regular dependency graph.
For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.
All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.
|
|
|
|
2.7x with hierarchy duplication set to "group".
Regression introduced by rB7fe3d1e7d718 (fixing T57934).
This effectively reverts rBrB7fe3d1e7d718, since changing the type of an
object is a very bad idea in general, and would need a careful and
complex check of all of its usages (many object usages assume a specific
type of object...).
Instead, we simply remove duplicollection on those objects, and give a
warning in case dupligroup was effectively used (in many reported cases,
dupligroup was a 'mistake setting', without actually instancing
aniything).
Note that the otehr idea to fix that versioning issue (to create a new
empty object for the instancing) is much less easy than it might look
(one would need to take into account potential animations, relations
between objects, etc.). Doable probably, but way overkill for a
corner-case 'bad' usage of the feature in the first place.
|
|
Now, the file does not have to be reloaded in all cases.
Instead, just scripts are enabled and all depsgraphs freed.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5000
|
|
The root of the problem goes to the fact that node tree copying
uses source tree and nodes for a temporary storage.
This makes it so multiple dependency graphs can not be reliably
evaluated from different threads if they are using same original
node tree.
Solved by doing the following:
- Commonly used tree copying function (which is used by library
manager) keeps source tree, nodes and sockets untouched.
- All the related areas (like node tree's callback) now have
const qualifier on the input.
- Areas which needs to have those temporary pointers assigned are
now using explicit function.
Would be really cool to get rid of those temporary pointers
completely, but this is a bit tricky due to hairy nature of the
code. Can happen any time now though: is easy enough to generalize
the new pointers mapping.
Note that this change is only intended to solve the crash.
The fact that icons shouldn't be updated on playback will be fixed
as a separate change.
Reviewers: brecht, fclem
Reviewed By: brecht, fclem
Subscribers: brecht, fclem
Differential Revision: https://developer.blender.org/D5002
|
|
for materials referenced by the mesh.
We cannot do refcount operations in a non-Main ID, this is forbidden.
While that whole func could probably use some love and refactor, for now
sticking to minimal changes and just moving refcounting op after mesh
has been transferred to Main database.
|
|
|
|
This caused the file browser to open in c:\windows with the fonts
folder selected instead of opening c:\windows\fonts\ and listing
the fonts.
Reported on chat by @blendify
|
|
It may be good to move the normals update out of the drawing code. But it was
already there for the non-multires sculpt cases, and does not have an obvious
place since we bypass the depsgraph and want to avoid the cost of updating the
normals multiple times when multiple events are handled before a redraw.
|
|
This restores the code that updates the sculpt session and PBVH from dependency
graph evaluation.
|
|
Centralize logic for when to use the PBVH for drawing, fix missing tests in
mask drawing, fix missing tests for multiple windows, only do more expensive
update for all viewports at end of the stroke.
|
|
Was missing re-set evaluated mesh to NULL.
Fix T65302: Crash after selecting one of multiple materials
Fix T65346: Blender crashes when selecting material in editing mode and LookDev view
Fix T65344: Blender crashes in edit mode when changing object
|
|
|
|
Automated using clang-tidy.
|
|
Was happening when modifier stack detected that mesh is not deformed
and is not modified and attempted to share result across multiple
objects.
This was introduced in 2f77119.
Now functions which are supposed to return mesh owned by caller will
do so again. Shouldn't be a huge impact on memory print since the
data layers are referenced.
|
|
This also fixes commit rB1fd7b380f4cf8a0489b405de2819f228a4da5ea2 which
didn't do allocation for effect strips properly.
Reviewed By: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D4970
|
|
|
|
|
|
The idea is to share a mesh data-block as a result across all objects
which are sharing same original mesh and have no effective modifiers.
This mesh is owned by an original copy-on-written version of object data.
Tricky part is to make sure it is only initialized once, and currently a
silly mutex lock is used. In practice it only locks if the mesh is not
already there.
As an extra bonus, even viewport memory is also lower after this change.
Reviewers: brecht, mont29
Reviewed By: brecht, mont29
Differential Revision: https://developer.blender.org/D4954
|
|
I'm not very fond of adding new types of bvhtrees.
But this is probably the most efficient solution.
|
|
Reviewers: mont29, brecht
Maniphest Tasks: T65175
Differential Revision: https://developer.blender.org/D4956
|