Blender Git Commits

Blender Git "asset-browser-snap-dragging" branch commits.

June 13, 2021, 21:48 (GMT)
Adjustments to drag info drawing

* Change the "Add Named Object" drag into string to "Add Object". The "Named"
part is kinda useless info and relates to an implementation detail.
* Draw drag info closer to the cursor. Looked quite off before.
June 13, 2021, 20:06 (GMT)
Merge branch 'master' into asset-browser-snap-dragging
June 13, 2021, 20:03 (GMT)
Fix merge error after last merge
June 5, 2021, 16:01 (GMT)
Merge branch 'master' into asset-browser-snap-dragging
May 21, 2021, 00:52 (GMT)
Merge branch 'master' into asset-browser-snap-dragging
May 11, 2021, 11:16 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
May 6, 2021, 19:45 (GMT)
Snap based on the bounding box when dropping, not origin

This makes the dropping use the object's bounding box for snapping, so
that it matches the bounding box we draw while dragging.

Not that this may have to be optional in future, there may be valid
cases to use the origin instead of the bounding box for snapping.
May 6, 2021, 12:34 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
May 4, 2021, 15:33 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
May 4, 2021, 14:56 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
April 30, 2021, 18:35 (GMT)
Fix crash when dragging emtpy into the 3D View
April 30, 2021, 10:43 (GMT)
Merge branch 'master' into asset-browser-snap-dragging
April 30, 2021, 00:25 (GMT)
Show a bounding box for object assets while dragging

Note: Object assets have to be saved with this commit or later for the bounding
box to appear.

Basic idea is:
* Store the bounding box (and related info) in the asset metadata.
* The bounding box has to be updated and written to custom properties of the
asset metadata.
* There's a new `AssetTypeInfo` struct, to set asset type dependent callbacks
or data (in future). ID types can conveniently define asset-type info as part
of their `IDTypeInfo` definition.
* The asset-type info can contain a custom callback to be executed before the
asset is saved. This is how the object can write its custom asset metadata.
* The dropbox can also register a callback to set properties for its
gizmo-group now. Used to copy
* The "placement plane" gizmo is scaled to the bounding box size too.
* For local ID assets, the data should be accessed directly, so the file
doesn't have to be saved to get the bounding box updated.

Also:
* Added proper gizmo group custom property support to C (was already supported
in Python, or in C with some hacking).
* Store the basis matrix (world matrix without parent or constraint transforms)
in the custom asset metadata. Used by the placement gizmo to scale the
bounding box to match the result visually when dropping.
* The preview image is disabled while dragging objects over the 3D view.
* The bounding box always snaps with its lower edge (Z axis) to the surface.
Snapping with other axes can be added still.
* However, actually dropping the object still uses the origin, so the drop
position may not match what the bounding box indicated. This could be changed
to also use the bounding box instead. Or the drawn bounding box should be
translated to respect the origin position.
April 29, 2021, 16:50 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
April 28, 2021, 20:48 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
April 26, 2021, 19:02 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
April 26, 2021, 12:38 (GMT)
Merge remote-tracking branch 'origin/master' into asset-browser-snap-dragging
April 22, 2021, 10:03 (GMT)
Basic snapping support for dropping objects

Uses the same snapping logic as the placement plane from the Add Object
tool, which means it matches the plane that we already draw as a
preview.

This is quite primitive at this point - you can't change options for the
snapping like the up-axis or the snapping target - but it already feels
quite great.
Another limitation is that it uses the origin of the dropped object to
place it, the bounding box should give better results in practice. This
is something we can add.
April 22, 2021, 08:15 (GMT)
Merge branch 'master' into asset-browser-snap-dragging
April 21, 2021, 17:20 (GMT)
Initial prototype for snapping plane feedback while dragging assets

Shows the same grid overlay as the Add Object tool when dragging an
asset into a 3D view. Uses the gizmo-system for that.
How visibility of gizmo-groups is managed is rather tricky, for now I
hacked things a bit to work. I have ideas to make this nicer.

Besides that, this is generally a design that I think can work in
master: Just like tools, drop-boxes can set a gizmo-group to use while
they are active. If the gizmo-group supports usage while dragging, it is
drawn.
By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021