Editor Tools

Detailed Description

Classes

class  C4DObjectList
 

Macros

#define LIBRARY_OBJECTLIST
 

Functions

Bool SelectionListCreate (BaseDocument *doc, BaseObject *parent, BaseDraw *bd, Float mx, Float my, LassoSelection *ls, C4DObjectList *list, Bool use_selection_filter=true, Bool use_display_filter=true)
 
Bool FilteredSelectionListCreate (BaseDocument *doc, AtomArray *arr, BaseDraw *bd, Float mx, Float my, LassoSelection *ls, C4DObjectList *list, Bool use_selection_filter=true, Bool use_display_filter=true)
 
Int32 SelectionListShowMenu (BaseDocument *doc, Float screenx, Float screeny, C4DObjectList *list)
 

Macro Definition Documentation

◆ LIBRARY_OBJECTLIST

#define LIBRARY_OBJECTLIST

Editor Tools / C4DObjectList library ID.

Function Documentation

◆ SelectionListCreate()

Bool SelectionListCreate ( BaseDocument doc,
BaseObject parent,
BaseDraw bd,
Float  mx,
Float  my,
LassoSelection ls,
C4DObjectList list,
Bool  use_selection_filter = true,
Bool  use_display_filter = true 
)

Creates a valid object list for the given coordinate (mx,my) and specific base draw by adding objects to the provided list.

Parameters
[in]docThe document. The caller owns the pointed document.
[in]parentAn optional parent object or nullptr. The caller owns the pointed object.
When this is provided the search is limited to the parent and its descendants.
[in]bdThe base draw for the search. The caller owns the pointed base draw.
[in]mxThe screen X coordinate.
[in]myThe screen Y coordinate.
[in]lsAn optional initialized lasso selection object or nullptr. The caller owns the pointed object.
When this is provided the search is extended to include all objects that are within the lasso selection.
[in,out]listThe list to fill. The found objects are sorted by Z distance so that the first object is the closest. The caller owns the pointed list.
[in]use_selection_filterUse Cinema 4D's selection filter.
[in]use_display_filterUse Cinema 4D's display filter.
Returns
true if successful, otherwise false.

◆ FilteredSelectionListCreate()

Bool FilteredSelectionListCreate ( BaseDocument doc,
AtomArray arr,
BaseDraw bd,
Float  mx,
Float  my,
LassoSelection ls,
C4DObjectList list,
Bool  use_selection_filter = true,
Bool  use_display_filter = true 
)

Creates a valid object list for a number of objects included in arr for the given coordinate (mx,my) for a specific base draw by adding objects to the provided list.

Parameters
[in]docThe document. The caller owns the pointed document.
[in]arrThe array of objects to limit the search. The caller owns the pointed array.
[in]bdThe base draw for the search. The caller owns the pointed base draw.
[in]mxThe screen X coordinate.
[in]myThe screen Y coordinate.
[in]lsAn optional initialized lasso selection object or nullptr. The caller owns the pointed object.
When this is provided the search is extended to include all objects that are within the lasso selection.
[in,out]listThe list to fill. The found objects are sorted by Z distance so that the first object is the closest. The caller owns the pointed list.
[in]use_selection_filterUse Cinema 4D's selection filter.
[in]use_display_filterUse Cinema 4D's display filter.
Returns
true if successful, otherwise false.

◆ SelectionListShowMenu()

Int32 SelectionListShowMenu ( BaseDocument doc,
Float  screenx,
Float  screeny,
C4DObjectList list 
)

Shows a popup menu with the given object list and lets the user choose an object.

Parameters
[in]docThe document. The caller owns the pointed document.
[in]screenxThe screen X coordinate of the menu or MOUSEPOS for the current mouse coordinates.
[in]screenyThe screen Y coordinate of the menu or MOUSEPOS for the current mouse coordinates.
[in]listThe list to build the menu from. The caller owns the pointed list.
Returns
The user choice or NOTOK if nothing was selected.