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
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.
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
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
They are now always shown in the top-level of the Outliner context menu.
Having them in the ID Data submenu was just a hassle to work with, and
often confusing to users - even if technically correct (the asset status
is part of the ID data).
Part of T82680.
The operator was register as a "file" operator, which are by convention
used for File Browser operators only. Move it to the "preferences"
operators, where it's displayed in the UI too.
Add overlay option to disable grid drawing.
Reuse drawing code from other editors (timeline editor)
Add argument `display_minor_lines` to function
`UI_view2d_draw_lines_x__discrete_frames_or_seconds`
This way minor line drawing can be disabled and so it doesn't cause
too much visual noise. Also spacing seems to be too fine, so VSE uses 3x
what is defined in preferences.
Reviewed By: fsiddi, Severin
Differential Revision: https://developer.blender.org/D11790
Previously, this option was not exposed in the UI, only for the clip editor.
There were also multiple rna properties that did the same thing for each of the 2D editors.
There was also an issue where the property enum items were the same as the 3d view which didnt make much sense.
Reviewed By: antoniov
Differential Revision: https://developer.blender.org/D12027
When using a pose slider it is possible to hide bones with the 'H' key.
Before this patch the screen didn't update, so you had to move the mouse 1 pixel to update.
This patch makes it so it updates right away
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D12024
Ref: D12024
Mantflow only supports wavelet noise, thus the parameter with only one option is no longer useful.
Differential Revision: https://developer.blender.org/D6770
Label for snapping current frame to strips was cut off and not very readable.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D11951
**Changes:**
- New enums correspond to 4 modes: `Stretch`, `Multiply`, `Frame Number` and `Length`.
- "`Multiply Factor`" has been removed;
- Value corresponding to "`use as speed`" enabled is now the value appended to the `Multiply` enum;
- Value corresponding to "`use as speed`" disabled is now the value appended to the `Frame Number` enum;
- Value corresponding to "`Scale to Length`" enabled is now the value appended to the `Length` enum;
- Except `Stretch` each mode has now its respective control values.
Differential Revision: https://developer.blender.org/D11856
This node takes a curve and a point selection and allows you to set the
specified (or all) points left/right or both handles to a given type.
Differential Revision: https://developer.blender.org/D11992
If there were lots of selected objects without an existing rigid body,
we would add rigid bodies to them one by one.
This would be slow in python, now we instead do this as a batch
operation in C.
On my (Intel) MacBook it used to take 60 seconds and with this change it
takes about 0.3 seconds.
Reviewed By: Sebastian Parborg
Differential Revision: http://developer.blender.org/D11957
When done from the Properties Editor, the context's modifier should be
used (this is where the button is located), when done from elsewhere,
the active modifier is still the way to go (since the context modifier is
not available then)
Maniphest Tasks: T89982
Differential Revision: https://developer.blender.org/D11972
Wording on the UI, slider consistency and material mask switches layout.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: http://developer.blender.org/D11839
This node implements shortening each spline in the curve based on
either a length from the start of each spline, or a factor of the
total length of each spline, similar to the "Start & End Mapping"
panel of curve properties.
For Bezier curves, the first and last control points are adjusted
to maintain the shape of the curve, but NURB splines are currently
implicitly converted to poly splines.
The node is implemented to avoid copying where possible, so it outputs
a changed version of the input curve rather than a new one.
Differential Revision: https://developer.blender.org/D11901
`split_multicam` used split operator, where if more strips than
multicam were selected, all would be split, which is undesirable.
Add `Sequence.split()` RNA API function. to split individual strips.
Function accepts `frame` and `split_method arguments`. Returns right
strip after splitting.
In case when strip being split have effects, these will be split too, so
no invalid state should be created.
Selection is not handled, this is by design up to user.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11926
Adds an operator invoked by default with Ctrl+F that while hovering a UI
list, opens the search field of the list and enables text input for it.
With this commit the search button may actually be out of view after
Ctrl+F still. The following commit adds auto-scroll to solve that.
A downside is that in the Properties, there also is Ctrl+F to start
the editor-wide search. That's not unusual in Blender though (e.g.
scolling with the mouse over a UI list also scrolls the list, not the
region).
Makes it possible to create tooltips for UI list rows, which can be
filled in .py scripts, similar to how they can extend other menus. This
is used by the (to be committed) Pose Library add-on to display pose
operations (selecting bones of a pose, blending a pose, etc).
It's important that the Python scripts check if the UI list is the
correct one by checking the list ID.
For this to work, a new `bpy.context.ui_list` can be checked. For
example, the Pose Library add-on does the following check:
```
def is_pose_asset_view() -> bool:
# Important: Must check context first, or the menu is added for every kind of list.
list = getattr(context, "ui_list", None)
if not list or list.bl_idname != "UI_UL_asset_view" or list.list_id != "pose_assets":
return False
if not context.asset_handle:
return False
return True
```
Add operator 'Open Blend File' to the Asset Browser. This operator:
- starts a new Blender process,
- opens the blend file containing the asset,
- monitors the new Blender process, and when it stops,
- reloads the assets to show any changes made.
It's useful to know where an asset is stored in, before this there was no way
to tell this. This could probably be displayed nicer in the UI but we're
currently unsure how. But at least the information is there now.
This commit moves the storage of `bDeformGroup` and the active index
to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility
functions are added to allow easy access to the vertex groups given
an object or an ID.
As explained in T88951, the list of vertex group names is currently
stored separately per object, even though vertex group data is stored
on the geometry. This tends to complicate code and cause bugs,
especially as geometry is created procedurally and tied less closely
to an object.
The "Copy Vertex Groups to Linked" operator is removed, since they
are stored on the geometry anyway.
This patch leaves the object-level python API for vertex groups in
place. Creating a geometry-level RNA API can be a separate step;
the changes in this commit are invasive enough as it is.
Note that opening a file saved in 3.0 in an earlier version means
the vertex groups will not be available.
Differential Revision: https://developer.blender.org/D11689
This might be an artistic choice, but round end caps are supposed to be
a "half circle centered at the end point of the line" as documented
here: https://docs.blender.org/manual/en/dev/render/freestyle/
parameter_editor/line_style/strokes.html#caps
They are a shashed half circle instead.
This patch makes this pure half circles [and also fixes the case where
thickness of beginning was used for both beginning and end of the
stroke]
Maniphest Tasks: T88015
Differential Revision: https://developer.blender.org/D11340
This commit adds a curve primitive node for creating squares,
rectangles, trapezoids, kites, and parallelograms. It also includes
a mode where the four points are just vector inputs.
Differential Revision: https://developer.blender.org/D11665
The Pattern and Search display options in the Clip Editor display settings
are independent and should not be grayed out since those options
remain relevant even with path display turned off.
Alternative solution were propoesed in D11630 and D11715
but each of those patches had downsides.
This solution is the simplest and does not break muscle memory.
Fly navigation has always had this option. They is particularly useful
when users use "Trackball" as their orbit method.
For walk navigation this works as a one off option. Not as a toggle like
for fly navigation.
Differential Revision: https://developer.blender.org/D11863
This change makes the behavior consistent between shortcut and
option from space clip's header.
The only caveat is that the "Lock to Selection" is removed from the
Display popover. This is because it is rather hard to make operator
to render same as regular checkbox. However, shouldn't be a problem
because the setting in popover was redundant.
Differential Revision: https://developer.blender.org/D10423
The node group interface panels were still implemented in C.
Now they ported over to python for easier maintenance.
Differential Revision: https://developer.blender.org/D11834
In addition to _object_ animation, now _object data_ (mesh, curve, ...)
animation can now be made single user as well.
This came up in T89369 and while it is possible to do this via the
Outliner [where all actions have to be selected individually], this
seems to be more convenient to be done from the 3DView.
note: usercount of the action is checked now, if it single-user already,
no copy takes place (same thing could/should be done for
single_object_action_users as well).
note2: obdata is made single user as well (otherwise duplicated actions
will be assigned to the same shared obdata - which does not result in
unique animadata which is what we are after here)
ref. T89369
Maniphest Tasks: T89369
Differential Revision: https://developer.blender.org/D11683