Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_edit.c
| Show First 20 Lines • Show All 1,537 Lines • ▼ Show 20 Lines | if ((par->type != OB_ARMATURE) && (par->type != OB_CURVE) && (par->type != OB_LATTICE)) { | ||||
| DAG_relations_tag_update(bmain); | DAG_relations_tag_update(bmain); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); | WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); | WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* Menu creation */ | /* Menu creation */ | ||||
| wmOperatorType *ot = WM_operatortype_find("OUTLINER_OT_parent_drop", false); | wmOperatorType *ot = WM_operatortype_find("OUTLINER_OT_parent_drop", false); | ||||
| uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE); | uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Set Parent To"), ICON_NONE); | ||||
| uiLayout *layout = uiPupMenuLayout(pup); | uiLayout *layout = UI_popup_menu_layout(pup); | ||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| WM_operator_properties_create_ptr(&ptr, ot); | WM_operator_properties_create_ptr(&ptr, ot); | ||||
| RNA_string_set(&ptr, "parent", parname); | RNA_string_set(&ptr, "parent", parname); | ||||
| RNA_string_set(&ptr, "child", childname); | RNA_string_set(&ptr, "child", childname); | ||||
| RNA_enum_set(&ptr, "type", PAR_OBJECT); | RNA_enum_set(&ptr, "type", PAR_OBJECT); | ||||
| /* Cannot use uiItemEnumO()... have multiple properties to set. */ | /* Cannot use uiItemEnumO()... have multiple properties to set. */ | ||||
| ▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | else { | ||||
| else if (par->type == OB_LATTICE) { | else if (par->type == OB_LATTICE) { | ||||
| WM_operator_properties_create_ptr(&ptr, ot); | WM_operator_properties_create_ptr(&ptr, ot); | ||||
| RNA_string_set(&ptr, "parent", parname); | RNA_string_set(&ptr, "parent", parname); | ||||
| RNA_string_set(&ptr, "child", childname); | RNA_string_set(&ptr, "child", childname); | ||||
| RNA_enum_set(&ptr, "type", PAR_LATTICE); | RNA_enum_set(&ptr, "type", PAR_LATTICE); | ||||
| uiItemFullO_ptr(layout, ot, IFACE_("Lattice Deform"), 0, ptr.data, WM_OP_EXEC_DEFAULT, 0); | uiItemFullO_ptr(layout, ot, IFACE_("Lattice Deform"), 0, ptr.data, WM_OP_EXEC_DEFAULT, 0); | ||||
| } | } | ||||
| uiPupMenuEnd(C, pup); | UI_popup_menu_end(C, pup); | ||||
| return OPERATOR_INTERFACE; | return OPERATOR_INTERFACE; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines | |||||