LINK

Definition

LINK [id]
{
  [Common flags]
  [ACCEPT idlist;]
  [REFUSE idlist;]
}

Description

Represents BaseLink objects in a container. Rendered as a link box (LinkBoxGui) to which the user can drag objects.
Provides a smart link to node objects. Specify what kinds of nodes are accepted and/or refused for this field with ACCEPT and/or REFUSE.

Further specify what objects are accepted by listening for MSG_DESCRIPTION_CHECKDRAGANDDROP in NodeData::Message() and returning true of false depending on the DescriptionCheckDragAndDrop data:

SplineRailObject::Message(GeListNode *node, Int32 type, void *data)
{
...
{
switch (dcu->id[0].id)
{
dcu->result = dcu->element->GetInfo() & OBJECT_SPLINE;
return true;
}
}
}
Represents a C4DAtom that resides in a 4D list.
Definition: c4d_baselist.h:1844
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define MSG_DESCRIPTION_CHECKDRAGANDDROP
Asks the atom if a drag and drop onto for example a LINK description element or IN_EXCLUDE descriptio...
Definition: c4d_baselist.h:415
@ SPLINERAILOBJECT_SPLINE2
Definition: osplinerail.h:7
@ SPLINERAILOBJECT_SPLINE4
Definition: osplinerail.h:9
@ SPLINERAILOBJECT_SPLINE3
Definition: osplinerail.h:8
@ SPLINERAILOBJECT_SPLINE1
Definition: osplinerail.h:6
PyObject ** type
Definition: pycore_pyerrors.h:34
Definition: node.h:10
Message struct for MSG_DESCRIPTION_CHECKDRAGANDDROP.
Definition: lib_description.h:967

In a dialog listen for MSG_DESCRIPTION_CHECKDRAGANDDROP instead in GeDialog::Message() with the following message container IDs:

Container IDTypeDescription
LINKBOX_ACCEPT_MESSAGE_TYPEInt32The type of the item dragged in the link box.
LINKBOX_ACCEPT_MESSAGE_ELEMENTvoid*A pointer (BaseList2D*) to the dragged object.
LINKBOX_ACCEPT_MESSAGE_ACCEPTvoid*A pointer to a boolean value. Set this value to true to accept the object.
LINKBOX_ACCEPT_MESSAGE_CONTROL_IDInt32The ID of the control that sent the message.

Flags

ACCEPT idlist;The node types to accept, separated with semi-colons.
REFUSE idlist;The node types to refuse, separated with semi-colons.

Example

LINK NO_SKY_OR_FOREGROUND_LINK
{
ACCEPT { Obase; }
REFUSE { Osky; Oforeground; }
}
#define Obase
Base object - BaseObject.
Definition: ge_prepass.h:1086
#define Osky
Sky.
Definition: ge_prepass.h:1045
#define Oforeground
Foreground.
Definition: ge_prepass.h:1061
LINK
Url is a link.
Definition: ioenums.h:4

Further Reading