Open Search
    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)
    {
    ...
    {
    DescriptionCheckDragAndDrop *dcu = static_cast<DescriptionCheckDragAndDrop*>(data);
    switch (dcu->id[0].id)
    {
    dcu->result = dcu->element->GetInfo() & OBJECT_SPLINE;
    return true;
    }
    }
    }
    #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:428
    maxon::Int32 Int32
    Definition: ge_sys_math.h:51
    @ 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

    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:1090
    #define Osky
    Sky.
    Definition: ge_prepass.h:1049
    #define Oforeground
    Foreground.
    Definition: ge_prepass.h:1065
    LINK
    Url is a link.
    Definition: ioenums.h:4

    Further Reading