Age | Commit message (Collapse) | Author |
|
This is an initial implementation of a USD importer.
This work is comprised of Tangent Animation's open source USD importer,
combined with features @makowalski had implemented.
The design is very similar to the approach taken in the Alembic
importer. The core functionality resides in a collection of "reader"
classes, each of which is responsible for converting an instance of a
USD prim to the corresponding Blender Object representation.
The flow of control for the conversion can be followed in the
`import_startjob()` and `import_endjob()` functions in `usd_capi.cc`.
The `USDStageReader` class is responsible for traversing the USD stage
and instantiating the appropriate readers.
Reviewed By: sybren, HooglyBoogly
Differential Revision: https://developer.blender.org/D10700
|
|
Was already checking these preconditions in the poll method.
|
|
The file selection parameters (e.g. `context.space_data.params`) are
expected to be unset in certain cases. Reading 2.4 files seems to be one
of them. Hence, code using it should check it's set first. Also added an
assert to a File Browser UI template printing a message when the
parameters are unset, to help debugging the issue.
|
|
|
|
Only the "changed" state from the last edit-object was used,
this meant the operator would not perform the necessary update
with multi-object edit-mode.
Use "changed" & "changed_multi" naming convention.
|
|
|
|
Even though lights were part of `SceneStats`, they were not used when
rBfd10ac9acaa0 was committed.
This patch adds the light count back into the statistics. When a light is
the active object, it will display the total number of lights in the
scene, as well as how many lights are currently selected.
{F10141354}
Reviewed By: #user_interface, Severin, Blendify, harley
Maniphest Tasks: T88512
Differential Revision: https://developer.blender.org/D11387
|
|
This reverts commit 0b903755a9908344e9fcb4a33b4f0340abeb9386.
This caused T86030, left-mouse selection override clicking,
which is used for creating a full revolution.
|
|
For T78995 we want to change the data structure of keylists to
improve performance. (Probably a Vector with bin-search capabilities).
This patch hides the internal structure of the keylists behind `AnimKeylist`
structure. This allows us to change the internals without 'breaking' where it is
being used.
The change adds functions to create, free, find and walk over the
keylist.
Reviewed By: sybren
Maniphest Tasks: T78995
Differential Revision: https://developer.blender.org/D11974
|
|
Currently when dropping an asset the first material slot is always updated.
This patch changes that logic to update the active material slot.
In future the behavior will be updated to use the material slot of the face under the cursor.
That requires better feedback tot he user.
Reviewed By: Severin
Maniphest Tasks: T90372
Differential Revision: https://developer.blender.org/D12056
|
|
Maintain the sign when clamping non zero offset.
Reviewed By: campbellbarton, weasel
Ref D11832
|
|
|
|
Caused by error converting this file to C++
eccdced972f42a451d0c73dfb7ce19a43c120d7f.
|
|
Setting normals from faces wasn't weighting the faces contribution
by the corner angle, giving lop-sided results in some cases.
This removes the epsilon check for CLNORS_VALID_VEC_LEN,
in favor of matching the behavior of vertex normals exactly.
|
|
In rB6ee14c966d05362228511756c4906e043b87e346 the enum items were renamed/removed, this change was not propagated to this setting
|
|
|
|
|
|
It will be useful in the spline type conversion node. Theoretically it
could become protected again if that conversion moves out of a node,
which might be a nice improvement after an initial version.
|
|
Because mesh vertex and face normals are just derived data, they can
be calculated lazily instead of eagerly. Often normal calculation is
a relatively expensive task, and the calculation is often redundant
if the mesh is deformed afterwards anyway.
Instead, normals should be calculated only when they are needed. This
commit moves in that direction by adding a new function to tag a mesh's
normals dirty and replacing normal calculation with it in some places.
Differential Revision: https://developer.blender.org/D12107
|
|
Don't include active strip in this operator.
This was confusing due to name of operator and inconsistent with other
editors.
|
|
This commit uses OpenVDB more directly for the voxel remesher, without
the extra indirection of copying to a Blender API. This makes the code
simpler, shorter, and easier to understand (though I didn't observe any
performance improvement).
This also removes the rest of the unused and undocumented OpenVDB C API,
which was written when Blender's code didn't really use C++, and doesn't
serve a purpose anymore. Those features will be implemented as nodes in
the future anyway (see D12100).
Differential Revision: https://developer.blender.org/D12097
|
|
Caused by rB7fc60bff14a6.
This has actually been reported and closed, but that was clearly a
misunderstanding (above commit changed a checkbox to be an enum, but a
second checkbox was simply removed)
Maniphest Tasks: T78469
Differential Revision: https://developer.blender.org/D12084
|
|
This is causing issues for some users launching Blender, because EGL indirectly
requires GLVND, which is not installed by default on e.g. Ubuntu.
This reverts commit 0b18a618b88b22663e05eca0f4d976875710e7cc.
Fixes T90374
Ref D12034
|
|
Caused by {rBbbb2e0614fc3}
Since above commit only the playhead is updated as an overlay in
animation playback (was moved out of drawing of the main region for
perfomance reasons).
The driver value "debug" visualization is very useful to have during
playback though but was left in main region drawing as part of
`draw_fcurve` (thus does not update in realtime anymore).
Moving `graph_draw_driver_debug` into the overlay is not feasible
because it requires animation filtering which has significant overhead
which needs to be avoided in the overlay which is redrawn on every UI
interaction.
Now tag the whole main region for updates in the Driver Editor during
playback instead (which will make the Drivers Editor as slow during
playback as before rBbbb2e0614fc3 -- but with realtime updates of the
debug visualization).
Maniphest Tasks: T87041
Differential Revision: https://developer.blender.org/D12003
|
|
Add a context menu dedicated to asset operations to the Asset Browser.
There are two separate context menus to keep things separated well and
avoid confusing if-else logic (similar to D12057 & D12059). Their polls
make sure they are displayed for the right contexts only.
Also (to be committed as followup cleanup): Remove now unused special
handling for assets in file delete operator.
Differential Revision: https://developer.blender.org/D12062
|
|
So far the Asset Browser just showed the same popups and settings as the
File Browser. Not all of them made sense for the Asset Browser though.
* Don't show inapplicable recursion toggle.
* Don't show sorting options, which don't work with assets anyway.
* Don't show the Filter popover, there are currently no applicable items
in there.
Just like in D12057, I decided to add separate classes for the Asset
Browser case.
Differential Revision: https://developer.blender.org/D12059
|
|
So far the Asset Browser just showed the same menus as the File Browser.
Not all of their entries made sense for the Asset Browser though. I
decided to just give them entirely different classes to avoid confusing
if-else checks everywhere. I think the code duplication this adds is a
minor issue, it's better to keep things seperated clearly IMO.
* View menu: Add "Asset Details" toggle for the sidebar region.
* View menu: Remove recursion sub-menu
* View menu: Remove "File Path" region toggle, which doesn't apply for
the Asset Browser.
Differential Revision: https://developer.blender.org/D12057
|
|
Update README.md.
|
|
Regression in 39b2a7bb7e815e051348bf5c5ec777d091324164
that meant non-manifold edges were not being tagged
when they should have been.
|
|
Originally the operator name was drawn next to the dragging content.
After that there was an option to add custom, static text with the
dragging content. This patch allows dynamic text to be drawn.
The custom text was implemented as out parameter of the poll function
what made the code unclear. This patch introduces a tooltip function
that separates tooltip generation from the poll function.
NOTE: the text should always be returned in its own memory block. This
block will be freed after it is copied in the drag struct.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12104
|
|
`CPPType` can wrap any C++ type so that code can work
with the wrapped type in a generic way. The goal of subclassing
`CPPType` is to provide additional methods for some types.
For example, the `CPPType` for `Array<int>` could have a `.element_type()`
method that returns the `CPPType` for `int`.
|
|
This reverts commit 1f0d6f763573b22772dcdb61320a12e1c11949e0 and the
cleanup 06cb48e1b284e6438ce14f1ea543143fcc74ca59. Committed too early on
Monday morning, still has issues that should be resolved first.
|
|
No functional changes.
|
|
Initial, limited implementation of loading a single asset catalog
definition file. These files are structured as follows:
CATALOG_ID virtual/path/of/catalog
SUBCATALOG_ID virtual/path/of/catalog/child
SOMETHING_ELSE some/unrelated/hierarchy
These virtual paths will be used to show the catalog in a tree
structure; the tree structure itself is not part of this commit. Each
asset will have one catalog ID that determines where in that tree the
asset shows up.
Currently only a single catalog definition file can be read; merging
data from multiple such files, and writing them out again after changes
are made, is for future commits.
This commit only contains the code to load a single file, and unittests
to check that this actually works. No UI, no user-facing functionality
yet.
|
|
The real fix here is to use some kind of relative error in `customdata_compare`
instead of the absolute error used now. If vertex coordinates get larger in magnitude,
the allowed error should increase as well.
|
|
This simplifies changing how geometry nodes handles different socket types
without affecting other systems.
|
|
|
|
|
|
When entering characters using IME on Windows, Japanese and Chinese
will both usually result in the first keystroke being duplicated. The
problem is that we are informed too late, after the first key is
pressed, that we are IME composing. This patch ensures we are entering
non-English characters using ImmGetConversionStatus() and then deals
with editing keys (like arrows and backspace) on a per-language basis.
see D11929 for more details.
Differential Revision: https://developer.blender.org/D11929
Reviewed by Brecht Van Lommel
|
|
|
|
Retrieving a mesh's looptris now take's a const mesh after
rB5f8969bb4b4, which removes the need for this function.
Since it's only two lines, avoiding the use of a separate function
in this case is simpler.
|
|
These functions do not change their source or input mesh, so it can
be passed with const, which means in one case that a function doesn't
have to be responsible for freeing its argument mesh, which is a clearly
better separation of concerns.
|
|
|
|
- Remove BKE prefix for static functions
- Make specific intermediate functions static
- Avoid unecessary "_to_mesh_nomain" suffix
|
|
|
|
The Quadriflow remeshing was in the middle of the voxel remesh code.
|
|
By the patch made it in master the version value already advanced (see https://developer.blender.org/D11839), so this versioning code needs to be moved down to that point.
|
|
So far the only way to know if they were saved properly was
to check the terminal.
Also notify when preferences fail to save.
|
|
- Use `int` instead of `unsigned int` for mesh indices
- Use C++ types (Array, float3, IndexRange)
- Use range based for loops
|
|
This BMesh iterator hadn't been used in C++ code yet, and needed
a macro for a proper cast. The parameter structs need to be initialized
when declared without designated initializers.
|