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:
authorTon Roosendaal <ton@blender.org>2010-01-27 18:08:30 +0300
committerTon Roosendaal <ton@blender.org>2010-01-27 18:08:30 +0300
commitf0ec3cb4b10d5423cd28dd5cf177e056aa5df490 (patch)
tree906e94b018a6d26edddcd88c127ce2291450ba6e /source/blender/editors/space_view3d
parentaefdec6ae20ac1010417c34d36fe02015653d44b (diff)
Two small dragdrop fixes:
- drop material didn't send correct notifiers to refresh view - drop material gave error print
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 999673f2ce4..b4c81ecf3e1 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -425,7 +425,7 @@ static int view3d_ima_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
return 0;
}
-static void view3d_id_drop_copy(wmDrag *drag, wmDropBox *drop)
+static void view3d_ob_drop_copy(wmDrag *drag, wmDropBox *drop)
{
ID *id= (ID *)drag->poin;
PointerRNA ptr;
@@ -438,12 +438,20 @@ static void view3d_id_drop_copy(wmDrag *drag, wmDropBox *drop)
RNA_string_set(drop->ptr, "name", id->name+2);
}
+static void view3d_id_drop_copy(wmDrag *drag, wmDropBox *drop)
+{
+ ID *id= (ID *)drag->poin;
+
+ RNA_string_set(drop->ptr, "name", id->name+2);
+}
+
+
/* region dropbox definition */
static void view3d_dropboxes(void)
{
ListBase *lb= WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW);
- WM_dropbox_add(lb, "OBJECT_OT_add_named_cursor", view3d_ob_drop_poll, view3d_id_drop_copy);
+ WM_dropbox_add(lb, "OBJECT_OT_add_named_cursor", view3d_ob_drop_poll, view3d_ob_drop_copy);
WM_dropbox_add(lb, "OBJECT_OT_drop_named_material", view3d_mat_drop_poll, view3d_id_drop_copy);
WM_dropbox_add(lb, "MESH_OT_drop_named_image", view3d_ima_drop_poll, view3d_id_drop_copy);
}