Age | Commit message (Collapse) | Author |
|
For the Asset Browser, it needs to be possible to drag assets into various
editors, which may not come from the current .blend file. In other words, the
dragging needs to work with just the asset metadata, without direct access to
the data-block itself.
Idea is simple: When dragging an asset, store the source file-path and
data-block name and when dropping, append the data-block. It uses existing drop
operators, but the function to get the dropped data-block is replaced with one
that returns the local data-block, or, in case of an external asset, appends
the data-block first.
The drop operators need to be adjusted to use this new function that respects
assets. With this patch it only works for dragging assets into the 3D view.
Note that I expect this to be a short-lived change. A refactor like D4071 is
needed to make the drag & drop system more future proof for assets and other
use cases.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9721
Reviewed by: Bastien Montagne, Brecht Van Lommel
|
|
Object previews are really helpful for visual data-block selection, like asset
browsing. Having them be generative should also be quite handy and should work
well enough in many, if not most cases.
What this does is simple:
* Place the object (actually a deep copy of it, for thread safety) in a virtual
.blend into an empty scene/view-layer.
* Add a camera, point it towards the front of the object, assuming that means
pointing towards its +Y axis.
* Use "Camera Fit Frame to Selected" logic to put the object into frame.
* Create a threaded off-screen render.
Of course, such an automatic preview will not work in all situations. E.g. it
currently does a bad job capturing a single plane. We could add options for
more advanced automatic previews, but probably custom previews is more
important, which I committed already (812ea9184221).
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Reviewed as part of https://developer.blender.org/D9719.
Reviewed by: Bastien Montagne, Brecht Van Lommel
|
|
Was failing for weightpaint and vertexpaint.
Selection flags were actually changed, but the update in the viewport
wasnt immediate, leading to confusion when the update happened later
(e.g. when using the weight gradient tool as done in the report).
We need to tag ID_RECALC_SELECT and send ND_SELECT notifier here. This
could be done explicitly, but there is also existing functionality
available that does this.
Note: the way updates happen for paintfaces vs. paintverts looks a bit
inconsistent (so this could be part of a later cleanup commit)
Maniphest Tasks: T82881
Differential Revision: https://developer.blender.org/D9631
|
|
|
|
Now the gizmo is drawn only when the eventstate located in
`wm->winactive->eventstate` has not changed.
So it doesn't matter if it's "selected" or not.
This commit also removes the use of the private header "wm.h"
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9539
|
|
|
|
|
|
As proposed in T74432 and already implemented in several commits,
"region" is the preferred name for `ARegion` variables, rather than
any variant of "ar". This commit changes a few "ar" variables that have
popped up over time and also adjusted names of variants like "arnew".
|
|
Zoom with an orthographic view wasn't refreshing the preview plane.
|
|
When an projecting onto a plane that is orthogonal to the views Z axis,
project onto a view aligned axis then map it back to the original plane.
see: ED_view3d_win_to_3d_on_plane_with_fallback
Since the depth can't be properly visualized in 3D, display a 2D so
it's possible to to tell the depth from the cursor motion.
|
|
When using surface orientation and nothing is under the mouse-cursor,
pick the axis that's closest to the view's Z axis.
Now by default default, drawing into empty spaces wont use a plane
orthogonal to the view.
|
|
Generating the thumbnail left the view matrices set to values
that couldn't be used for cursor drawing.
Backup/restore the matrices for off-screen drawing.
|
|
Variables to temporarily override values was scattered,
making it harder to follow.
|
|
This was leftover from Blender internal, follow the naming
already used by the draw manager.
|
|
Some callers were passing in dummy values, this can be accessed from
`RegionView3D.is_persp` can be used to check this.
|
|
|
|
|
|
|
|
The orientation & depth settings are used to show the preview plane
that is used when adding the object.
|
|
Add a NULL check for the View3D's camera, because these
modes can be entered even without an active camera.
|
|
Split out functionality needed for preview plane drawing.
|
|
For the `plane_depth` of type `PLACE_DEPTH_SURFACE` to take effect, a `snap_context` is needed.
But, even if a temporary `snap_context` was created for `plane_orient == PLACE_ORIENT_SURFACE`,
this context was not used for `plane_depth`.
So, use a temporary `snap_context` for `PLACE_DEPTH_SURFACE` (as it is done for `PLACE_ORIENT_SURFACE`).
Differential Revision: https://developer.blender.org/D9345
Differential Revision: https://developer.blender.org/D9435
|
|
And remove Blender preference, which was expected to be set to match the system
preference for correct behavior. Instead just handle this automatically.
Differential Revision: https://developer.blender.org/D9402
|
|
Clamp the min/max used for Frame All/Selected
by the clipping region if it's set.
Resolve T81050
|
|
Move headers files from `render/extern/` to `render/`
Part of T73586
|
|
|
|
|
|
"Camera Parent Lock" can be useful when rigging cameras, but it is not
intuitive, and has also generated a lot of confusion (bug reports).
This is because it breaks the fundamental parent <-> child relationship
conventions in Blender, and there is no indication that it's intended
without diving into the preferences.
This commit moves the setting to the object level, and exposes it in
the relations panel in the property editor. It is exposed for every
object type because any object type can be "View Locked" in the 3D view.
The property description is also updated to reflect this change and be
more specific without getting too long.
In the future this could become a more general feature of the transform
system, but for now it is limited to "Lock Camera to View".
Differential Revision: https://developer.blender.org/D9239
|
|
Fixes 18 misspellings of 'predefined', 'Look Up', 'Lookup', and 'No One'.
Differential Revision: https://developer.blender.org/D9466
Reviewed by Hans Goudey
|
|
`WM_operator_properties_filesel()` allows C operators to set a display or sort
type for the File Browser to use. But the File Browser would always override
that because of an invalid `_is_set()` check. (The operators don't actually set
the value, they only set the property's default value.)
The only operator affected by this is "Recover Auto Save". It is supposed to
show a vertical list ordered chronologically. It used settings from the
previous File Browser usage before this patch.
Operators using the File Browser should generally use
`FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not
to. See comments at their definition.
----
This makes it so operators that set a different display or sort type
don't change the sort or display type for the next File Browser operation.
So using "Recover Auto Save" entirely isolates display and sort type from other
operations.
Differential Revision: https://developer.blender.org/D8598
Reviewed by: Bastien Montagne
|
|
The behavior of the incremental snap did not take into account the
relative dimensions of the window, which resulted in a different behavior
if the area height was greater than the width.
|
|
|
|
Add NULL checks for `sview->ofs`, while it's currently never NULL
when a camera is set. The API allows for each member
to be set independently.
|
|
|
|
Improved user experience by using viewport focal length
to calculate the new camera distance.
Also resizing the border to the same aspect ratio as
the window will help not zooming in more than expected.
Ref D9341
|
|
This is a followup to rBa308607a533, using the macro in a few places
that were missed.
|
|
This was reintroduced by the wide line emulation workaround.
|
|
Fixes error in determining 3DView Overlay Line Height. Do not base on current default font height.
Differential Revision: https://developer.blender.org/D9288
Reviewed by Campbell Barton
|
|
No functional change.
|
|
Corrects incorrect usages of the word 'loose' when 'lose' was required.
Differential Revision: https://developer.blender.org/D9243
Reviewed by Campbell Barton
|
|
Corrects 34 miscellaneous misspelled words.
Differential Revision: https://developer.blender.org/D9248
Reviewed by Campbell Barton
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
|
|
With constructive + deform modifiers, loop-cut visualization
wasn't following the displayed mesh.
This now gets the coordinates from the cage when available.
|
|
Default text output routines (which do not specify a size) will now use Text Style point size.
Differential Revision: https://developer.blender.org/D9107
Reviewed by Brecht Van Lommel
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Follow the MLA style, agreed upon in T79589. This means "from" within UI
labels should be lowercase.
Differential Revision: https://developer.blender.org/D8345
|
|
We have our own assert implementation, `BLI_assert()` that is prefered over the
C standard library one. Its output is more consistent across compilers and
makes termination on assert failure optional (through `WITH_ASSERT_ABORT`).
In many places we'd include the C library header without ever accessing it.
|
|
Access to this structure will be needed in BKE's armature code.
|