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;
}
}
}

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; }
}

Further Reading

LINK
LINK
Url is a link.
Definition: ioenums.h:6
GeListNode
Represents a C4DAtom that resides in a 4D list.
Definition: c4d_baselist.h:1767
DescriptionCheckDragAndDrop
Message struct for MSG_DESCRIPTION_CHECKDRAGANDDROP.
Definition: lib_description.h:869
Oforeground
#define Oforeground
Foreground.
Definition: ge_prepass.h:996
SPLINERAILOBJECT_SPLINE3
@ SPLINERAILOBJECT_SPLINE3
Definition: osplinerail.h:8
SPLINERAILOBJECT_SPLINE1
@ SPLINERAILOBJECT_SPLINE1
Definition: osplinerail.h:6
Obase
#define Obase
Base object - BaseObject.
Definition: ge_prepass.h:1021
Int32
maxon::Int32 Int32
Definition: ge_sys_math.h:58
SPLINERAILOBJECT_SPLINE4
@ SPLINERAILOBJECT_SPLINE4
Definition: osplinerail.h:9
SPLINERAILOBJECT_SPLINE2
@ SPLINERAILOBJECT_SPLINE2
Definition: osplinerail.h:7
MSG_DESCRIPTION_CHECKDRAGANDDROP
#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:395
Osky
#define Osky
Sky.
Definition: ge_prepass.h:980