LINK

Definition

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

描述

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) { ... if (type== MSG_DESCRIPTION_CHECKDRAGANDDROP ) { DescriptionCheckDragAndDrop *dcu = static_cast< DescriptionCheckDragAndDrop * > (data); switch (dcu->id[0].id) { case SPLINERAILOBJECT_SPLINE1 : case SPLINERAILOBJECT_SPLINE2 : case SPLINERAILOBJECT_SPLINE3 : case SPLINERAILOBJECT_SPLINE4 : 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 ID 类型 描述
LINKBOX_ACCEPT_MESSAGE_TYPE Int32 The type of the item dragged in the link box.
LINKBOX_ACCEPT_MESSAGE_ELEMENT void* A pointer ( BaseList2D* ) to the dragged object.
LINKBOX_ACCEPT_MESSAGE_ACCEPT void* A pointer to a boolean value. Set this value to true to accept the object.
LINKBOX_ACCEPT_MESSAGE_CONTROL_ID Int32 The 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.

范例

LINK NO_SKY_OR_FOREGROUND_LINK { ACCEPT { Obase ; } REFUSE { Osky ; Oforeground ; } }

延伸阅读

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

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1