3ds Max C++ API Reference
Loading...
Searching...
No Matches
ParamDef Struct Reference

#include <iparamb2.h>

+ Inheritance diagram for ParamDef:

Public Member Functions

PB2Export void DeleteThis ()
 
 ParamDef ()
 
PB2Export bool IsAsset () const
 Returns true if the parameter is defined as an asset.
 

Public Attributes

DWORD size
 
ParamID ID
 This is the permanent, position independent ID of the parameter.
 
const MCHARint_name
 This is a fixed internal name of the parameter.
 
const MCHARnonLocalized_name
 This is the fixed non-localized (English) name of the parameter.
 
ParamType2 type
 This is the type of the parameter.
 
ULONGLONG flags
 They are the per-parameter constructor flags (P_ANIMATABLE, P_TRANSIENT, etc.) Normally, the flags are set up as a result of things you specify in the ParamBlockDesc2 constructor and should generally be read-only at runtime.
 
StringResID local_name
 This is the string table resource ID for the localized (sub-anim) name.
 
ParamDimensiondim
 This is the parameter dimension.
 
PB2Value def
 The default value for the parameter.
 
PB2Value ms_def
 This is the default value for MAXScript and the MacroRecorder.
 
PB2Value cur_def
 This is the current 'sticky' default value, used to maintain creation defaults within a session.
 
int description
 This is a one sentence description.
 
PB2Value range_low
 This indicates the low allowable range used in MAXScript validation and spinner setup.
 
PB2Value range_high
 This indicates the high allowable range used in MAXScript validation and spinner setup.
 
PBValidatorvalidator
 Points to an instance of the validator object.
 
PBAccessoraccessor
 Points to an instance of an accessor object.
 
short tab_size
 If the parameter is a table (Tab<>) this is the initial table size.
 
short ref_no
 This is a block-owner's reference number for non-hosted ReferenceTargets parameters.
 
short subobj_no
 This is a block-owner's SubTex index for Texmap parameters in Mtl owners.
 
Class_ID class_ID
 This is the Class_ID validator for reference targets.
 
SClass_ID sclass_ID
 This is the SClass_ID validator for reference targets (similar to above).
 
ControlType2 ctrl_type
 This is the type of user interface control.
 
EditSpinnerType spin_type
 This is the spinner type if the associated UI control is a spinner.
 
intctrl_IDs
 This is the array of control IDs for this parameter.
 
short ctrl_count
 This is the number of controls in the ctrl_IDs array above.
 
union {
   int *   val_bits
 
   float *   val_bits_float
 
}; 
 These are radio button vals or bit numbers for int bits controlled by multiple checkboxes.
 
float scale
 This is the scale given to the ISpinnerControl, as is used in SetupFloatSpinner(), for example.
 
int numSegs
 This is the slider segments count.
 
ParamIDenable_ctrls
 The array of which other parameters have their UI controls automatically enabled by this parameter.
 
short enable_count
 This is the number of parameter IDs in the enable_ctrls array above.
 
int prompt
 The status line prompt string resource ID for various picker buttons.
 
int caption
 The caption string resource ID for open/save file dialogs.
 
int toolTip
 The ToolTip string res ID.
 
const MCHARinit_file
 The initial filename for open/save file dialogs.
 
int file_types
 The file types string resource ID for open/save file dialogs (in MAXScript type: form)

 
Tab< MapIDmaps
 Maps IDs if in a multi-map block (block flag P_MULTIMAP)

 
const MCHARdyn_file_types
 A list of file types to be used for Open/Save dialogs.
 
MaxSDK::AssetManagement::AssetType asset_type_id
 parameter type (only for TYPE_FILENAME and TYPE_FILENAME_TAB)
 
ColorContext colorContext = ColorContext::COLOR_SPACE_CONTEXT_NONE
 color context (only for TYPE_RGBA, TYPE_FRGBA, TYPE_RGBA_TAB and TYPE_FRGBA_TAB)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class ParamBlockDesc2, Structure PB2Value, Class PBValidator, Class PBBitmap, ParamType, ParamType2, Class ParamDimension, Template Class Tab.
Remarks
The data members of this class provide a definition of a parameter. An array of these parameter definitions is a data member of class ParamBlockDesc2.

Constructor & Destructor Documentation

◆ ParamDef()

ParamDef ( )
inline
2506{ size = sizeof(ParamDef);}
ParamDef()
Definition: iparamb2.h:2506
DWORD size
Definition: iparamb2.h:2377

Member Function Documentation

◆ DeleteThis()

PB2Export void DeleteThis ( )
Remarks
This function deletes this instance of the structure.

◆ IsAsset()

PB2Export bool IsAsset ( ) const

Returns true if the parameter is defined as an asset.

A parameter is considered an asset if it's type if TYPE_FILENAME or TYPE_FILENAME_TAB and is flagged with P_HAS_ASSETTYPE or P_HAS_ASSETTYPENAME.

Member Data Documentation

◆ size

DWORD size

◆ ID

ParamID ID

This is the permanent, position independent ID of the parameter.


◆ int_name

const MCHAR* int_name

This is a fixed internal name of the parameter.

This name is not localized. Internal names are meant to be parsable as identifiers. As such they should begin with an alpha character, have only alphanumerics, and have no spaces, punctuations, etc. The convention for multi-word names is to use studly-caps, eg, paintRadius.

◆ nonLocalized_name

const MCHAR* nonLocalized_name

This is the fixed non-localized (English) name of the parameter.

This name is used by script engines for SubAnim name resolution for when the script specifies the SubAnim name in English but 3ds Max is running with a non-English language pack. By default, this contains the same pointer as specified by int_name. If the specified internal name is not the same as the English name, the non-localized name should be specified using the p_nonLocalizedName paramtag.

◆ type

ParamType2 type

This is the type of the parameter.

See ParamType2.

◆ flags

ULONGLONG flags

They are the per-parameter constructor flags (P_ANIMATABLE, P_TRANSIENT, etc.) Normally, the flags are set up as a result of things you specify in the ParamBlockDesc2 constructor and should generally be read-only at runtime.


◆ local_name

StringResID local_name

This is the string table resource ID for the localized (sub-anim) name.


◆ dim

This is the parameter dimension.

See Class ParamDimension.

◆ def

PB2Value def

The default value for the parameter.


◆ ms_def

PB2Value ms_def

This is the default value for MAXScript and the MacroRecorder.


◆ cur_def

PB2Value cur_def

This is the current 'sticky' default value, used to maintain creation defaults within a session.


◆ description

int description

This is a one sentence description.

Use a string resource ID.

◆ range_low

PB2Value range_low

This indicates the low allowable range used in MAXScript validation and spinner setup.


◆ range_high

PB2Value range_high

This indicates the high allowable range used in MAXScript validation and spinner setup.


◆ validator

PBValidator* validator

Points to an instance of the validator object.

This object has a Validate() method used to check if the parameter is valid.

◆ accessor

PBAccessor* accessor

Points to an instance of an accessor object.

Any parameter in a block can have an accessor callback object that has its Get() or Set() method called whenever the parameter is accessed. This may be used to provide access to dynamically-computed virtual parameters and sometimes to allow parameter-specific processing by the class as the parameter in the block is modified.

◆ tab_size

short tab_size

If the parameter is a table (Tab<>) this is the initial table size.


◆ ref_no

short ref_no

This is a block-owner's reference number for non-hosted ReferenceTargets parameters.


◆ subobj_no

short subobj_no

This is a block-owner's SubTex index for Texmap parameters in Mtl owners.


◆ class_ID

Class_ID class_ID

This is the Class_ID validator for reference targets.


◆ sclass_ID

SClass_ID sclass_ID

This is the SClass_ID validator for reference targets (similar to above).


◆ ctrl_type

ControlType2 ctrl_type

This is the type of user interface control.


◆ spin_type

EditSpinnerType spin_type

This is the spinner type if the associated UI control is a spinner.

One of the following values may be used:

  • EDITTYPE_INT
    Any integer value.
  • EDITTYPE_FLOAT
    Any floating point value.
  • EDITTYPE_UNIVERSE
    This is a value in world space units.
    It respects the system's unit settings (for example feet and inches).
  • EDITTYPE_POS_INT
    Any integer >= 0
  • EDITTYPE_POS_FLOAT
    Any floating point value >= 0.0
  • EDITTYPE_POS_UNIVERSE
    This is a positive value in world space units.
    It respects the system's unit settings (for example feet and inches).
  • EDITTYPE_TIME
    This is a time value. It respects the system time settings (SMPTE for example).

◆ ctrl_IDs

int* ctrl_IDs

This is the array of control IDs for this parameter.


◆ ctrl_count

short ctrl_count

This is the number of controls in the ctrl_IDs array above.


◆ val_bits

int* val_bits

◆ val_bits_float

float* val_bits_float

◆ 

union { ... } @90

These are radio button vals or bit numbers for int bits controlled by multiple checkboxes.

The numbers in the int array are used to indicate which bit to flip in the TYPE_INT parameter depending on the state of the associated (by order) checkbox. This is not yet implemented.

◆ scale

float scale

This is the scale given to the ISpinnerControl, as is used in SetupFloatSpinner(), for example.


◆ numSegs

int numSegs

This is the slider segments count.


◆ enable_ctrls

ParamID* enable_ctrls

The array of which other parameters have their UI controls automatically enabled by this parameter.


◆ enable_count

short enable_count

This is the number of parameter IDs in the enable_ctrls array above.


◆ prompt

int prompt

The status line prompt string resource ID for various picker buttons.


◆ caption

int caption

The caption string resource ID for open/save file dialogs.


◆ toolTip

int toolTip

The ToolTip string res ID.


◆ init_file

const MCHAR* init_file

The initial filename for open/save file dialogs.


◆ file_types

int file_types

The file types string resource ID for open/save file dialogs (in MAXScript type: form)

◆ maps

Tab<MapID> maps

Maps IDs if in a multi-map block (block flag P_MULTIMAP)

◆ dyn_file_types

const MCHAR* dyn_file_types

A list of file types to be used for Open/Save dialogs.

◆ asset_type_id

parameter type (only for TYPE_FILENAME and TYPE_FILENAME_TAB)

◆ colorContext

ColorContext colorContext = ColorContext::COLOR_SPACE_CONTEXT_NONE

color context (only for TYPE_RGBA, TYPE_FRGBA, TYPE_RGBA_TAB and TYPE_FRGBA_TAB)