diff options
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index b3b1d9123aa..084c98b1292 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -25,6 +25,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/editors/object/object_relations.c + * \ingroup edobj + */ + + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -279,7 +284,7 @@ static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt) uiLayout *layout= uiPupMenuLayout(pup); /* create operator menu item with relevant properties filled in */ - uiItemFullO(layout, op->idname, op->type->name, ICON_NULL, NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS); + uiItemFullO(layout, op->idname, op->type->name, ICON_NONE, NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS); /* present the menu and be done... */ uiPupMenuEnd(C, pup); @@ -686,7 +691,7 @@ static int parent_set_exec(bContext *C, wmOperator *op) static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) { Object *ob= ED_object_active_context(C); - uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", ICON_NULL); + uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", ICON_NONE); uiLayout *layout= uiPupMenuLayout(pup); uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); @@ -1248,7 +1253,7 @@ static int allow_make_links_data(int ev, Object *ob, Object *obt) static int make_links_data_exec(bContext *C, wmOperator *op) { Main *bmain= CTX_data_main(C); - int event = RNA_int_get(op->ptr, "type"); + int event = RNA_enum_get(op->ptr, "type"); Object *ob; ID *id; int a; @@ -1348,7 +1353,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) /* api callbacks */ ot->exec= make_links_data_exec; - ot->poll= ED_operator_objectmode; + ot->poll= ED_operator_object_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1360,11 +1365,6 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) /**************************** Make Single User ********************************/ -static void single_object_users__forwardModifierLinks(void *UNUSED(userData), Object *UNUSED(ob), Object **obpoin) -{ - ID_NEW(*obpoin); -} - static void single_object_users(Scene *scene, View3D *v3d, int flag) { Base *base; @@ -1396,19 +1396,7 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag) /* object pointers */ for(base= FIRSTBASE; base; base= base->next) { - ob= base->object; - if(ob->id.lib==NULL) { - relink_constraints(&base->object->constraints); - if (base->object->pose){ - bPoseChannel *chan; - for (chan = base->object->pose->chanbase.first; chan; chan=chan->next){ - relink_constraints(&chan->constraints); - } - } - modifiers_foreachObjectLink(base->object, single_object_users__forwardModifierLinks, NULL); - - ID_NEW(ob->parent); - } + object_relink(base->object); } set_sca_new_poins(); @@ -1421,7 +1409,7 @@ static void new_id_matar(Material **matar, int totcol) for(a=0; a<totcol; a++) { id= (ID *)matar[a]; - if(id && id->lib==0) { + if(id && id->lib == NULL) { if(id->newid) { matar[a]= (Material *)id->newid; id_us_plus(id->newid); @@ -1575,7 +1563,7 @@ static void do_single_tex_user(Tex **from) Tex *tex, *texn; tex= *from; - if(tex==0) return; + if(tex==NULL) return; if(tex->id.newid) { *from= (Tex *)tex->id.newid; |