Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index ddde4f5a9dc..72e379e9b0a 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -6176,10 +6176,12 @@ void UI_but_drag_set_id(uiBut *but, ID *id)
but->dragpoin = (void *)id;
}
+/**
+ * \param asset: May be passed from a temporary variable, drag data only stores a copy of this.
+ */
void UI_but_drag_set_asset(uiBut *but,
- const char *name,
+ const AssetHandle *asset,
const char *path,
- int id_type,
int import_type,
int icon,
struct ImBuf *imb,
@@ -6187,9 +6189,10 @@ void UI_but_drag_set_asset(uiBut *but,
{
wmDragAsset *asset_drag = MEM_mallocN(sizeof(*asset_drag), "wmDragAsset");
- BLI_strncpy(asset_drag->name, name, sizeof(asset_drag->name));
+ asset_drag->asset_handle = MEM_mallocN(sizeof(asset_drag->asset_handle),
+ "wmDragAsset asset handle");
+ *asset_drag->asset_handle = *asset;
asset_drag->path = path;
- asset_drag->id_type = id_type;
asset_drag->import_type = import_type;
but->dragtype = WM_DRAG_ASSET;