About
The RangeData stores data on ranges and on the current value within these ranges. It is typically used with the LodObject. The RangeData class is defined in the customgui_range.h
header file. The ID is CUSTOMDATATYPE_RANGE.
Access
RangeData data is typically accessed from a LodObject. See LodObject Manual.
if (rangeCustomData == nullptr)
Definition: c4d_gedata.h:83
CustomDataType * GetCustomDataType(Int32 datatype) const
Definition: c4d_gedata.h:507
Definition: customgui_range.h:146
Float GetCurrentValue() const
static String FloatToString(Float32 v, Int32 vvk=-1, Int32 nnk=-3)
Definition: c4d_string.h:529
static const Int32 CUSTOMDATATYPE_RANGE
RangeData ID.
Definition: customgui_range.h:23
maxon::Float Float
Definition: ge_sys_math.h:66
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
@ LOD_BAR
Definition: olod.h:8
Base class for custom data types.
Definition: c4d_customdatatype.h:51
Allocation/Deallocation
RangeData objects are created with the usual tools, see Entity Creation and Destruction Manual (Classic).
A RangeData object must be initialized:
if (rangeCustomData == nullptr)
if (!rangeCustomData->Init(10))
Definition: ge_autoptr.h:37
void SetCustomDataType(Int32 datatype, const CustomDataType &v)
Definition: c4d_gedata.h:664
@ LOD_MODE
Definition: olod.h:6
@ LOD_CRITERIA
Definition: olod.h:7
@ LOD_CRITERIA_SCREEN_H
Definition: olod.h:30
@ LOD_MODE_MANUAL_GROUPS
Definition: olod.h:25
Value
A RangeData stores a value between 0.0 and 1.0:
if (rangeCustomData == nullptr)
void SetCurrentValue(Float value)
@ LOD_CRITERIA_MANUAL_SLIDER
Definition: olod.h:29
Knots
Multiple knots can be added to a RangeData object. These knots define the borders of the ranges.
rangeCustomData->
Reset();
void SetSelectedKnot(Int knotIndex)
void Reset(Bool invalidateObject=false)
Bool AddValue(Float value)
A single knot can be selected:
Int GetSelectedKnot() const
void DeleteKnot(Int knotIndex)
maxon::Int Int
Definition: ge_sys_math.h:64
Ranges
Value ranges are defined as the space confined by knots:
const Vector color { 1.0, 0.0, 0.0 };
void SetRangeColor(Int index, const Vector &color)
Int GetRangeIndex(Float value) const
Color Modes
The ranges between knots can be colored in different ways:
for (
Int i = 0;
i < rangeCount; ++
i)
{
}
Py_ssize_t i
Definition: abstract.h:645
void SetRandomColorMode(Bool random)
Int GetRangesCount() const
void SetColorMode(Bool perRange)
RangePair
The dimensions of a range are stored with a RangePair object:
The RangePair class includes:
RangePair GetRange(Int index) const
Definition: customgui_range.h:85
Float GetCenter() const
Definition: customgui_range.h:131
Further Reading