This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.PropertyParameter Class

This class is used to represent a property parameter.

PropertyParameter Class

Properties

string StructName#

The name of the structure, that defines the type of the struct parameter.

int ArrayDim#

The dimension of the array parameter.
Notice
Multi-dimensional arrays are represented as arrays of arrays, thus, the return value of this method will decrease with each level down the hierarchy.

string ArrayTypeName#

The type name of elements of the array parameter.

int ArrayType#

The type of elements of the array parameter.

int ArraySize#

The current size of the array parameter.
set
Sets a new size of the array parameter.
set value - New array size to be set (number of elements).

string ValueFile#

Returns the current value of the file parameter.
set

Sets the value of the file parameter. If the property is not editable, the value won't be updated.

The value stored in the file parameter (this value will be returned by the getValueFile() method) depends on the flags set for the parameter:

Source code (C++)
// flags = "asset"
setValueFile("guid://asset_guid"); 		// getValueFile() -> asset_path
setValueFile("guid://runtime_guid");	// getValueFile() -> asset_path
setValueFile("asset_path");				// getValueFile() -> asset_path
setValueFile("runtime_path");			// getValueFile() -> asset_path

// flags = "runtime" - default
setValueFile("guid://asset_guid"); 		// getValueFile() -> runtime_path
setValueFile("guid://runtime_guid");	// getValueFile() -> runtime_path
setValueFile("asset_path");				// getValueFile() -> runtime_path
setValueFile("runtime_path");			// getValueFile() -> runtime_path

// flags = "abspath"
setValueFile(file_path);				// getValueFile() -> file_path
set value - Value for the file parameter to be set.

int MaskType#

The type of elements of the mask parameter.

int SwitchNumItems#

int SliderMaxExpand#

A value indicating if the maximum value of the slider parameter can be decreased. Slider parameter is a parameter of one of the following types: PARAMETER_INT, PARAMETER_FLOAT, PARAMETER_DOUBLE.

int SliderMinExpand#

A value indicating if the minimum value of the slider parameter can be decreased. Slider parameter is a parameter of one of the following types: PARAMETER_INT, PARAMETER_FLOAT, PARAMETER_DOUBLE.

int SliderLog10#

A value indicating if the slider parameter uses a logarithmic scale (with the base ten). The slider parameter is a parameter of one of the following types: PARAMETER_INT, PARAMETER_FLOAT, PARAMETER_DOUBLE.

double DoubleMaxValue#

The maximum double value of the property parameter.

double DoubleMinValue#

The minimum double value of the property parameter.

float FloatMaxValue#

The maximum float value of the property parameter.

float FloatMinValue#

The minimum float value of the property parameter.

int IntMaxValue#

The maximum integer value of the property parameter.

int IntMinValue#

The minimum integer value of the property parameter.

UGUID ValueGUID#

The current value of the property parameter as a UGUID.
set
Sets the UGUID variable as a property parameter value.
set value - UGUID type value

int ValueMask#

The current value of the property parameter as an integer mask.
set
Sets the value of the mask parameter. If the PARAMETER_MASK variable isn't set for the parameter, or the property is not editable, the value won't be updated.
set value - Mask to be set as the value of the property parameter.

int ValueSwitch#

The current value of the switch parameter. If the PARAMETER_SWITCH variable isn't set for the parameter, the function will return 0.
set
Sets the value of the switch parameter. If the PARAMETER_SWITCH variable isn't set for the parameter, or the property is not editable, the value won't be updated.
set value - New value of the switch parameter.

bool ValueToggle#

The current value of the toggle parameter. If the PARAMETER_TOGGLE variable isn't set for the parameter, the function will return 0.
set
Sets the value of the toggle parameter. If the PARAMETER_TOGGLE variable isn't set for the parameter, or the property is not editable, the value won't be updated.
set value - New value of the toggle parameter.

int ValueNodeID#

The current value of the property parameter as a node id.
set
Sets the value of the property parameter using the Node ID specified.
set value - Value of the property parameter.

Node ValueNode#

The current value of the property parameter as a Node.
set
Sets the value of the property parameter using the Node specified.
set value - Value of the property parameter.

Material ValueMaterial#

The current value of the property parameter as a Material.
set
Sets the value of the property parameter using the Material specified.
set value - Value of the property parameter.

Property ValueProperty#

The current value of the property parameter as a Property.
set
Sets the value of the property parameter using the Property specified.
set value - Value of the property parameter.

vec4 ValueVec4#

The current value of the property parameter as a four-component vec4 vector.
set
Sets the value of the property parameter using the four-component vec4 vector specified.
set value - Four-component float vector to be set as the value of the property parameter.

vec3 ValueVec3#

The current value of the property parameter as a three-component vec3 vector.
set
Sets the value of the property parameter using the three-component vec3 vector specified.
set value - Three-component float vector to be set as the value of the property parameter.

string ValueString#

The current value of the property parameter as a string.
set
Sets the value of the property parameter using the string specified.
set value - String to be set as the value of the property parameter.

vec4 ValueColor#

The current value of the property parameter as a four-component vec4 color vector (R, G, B, A).
set
Sets the value of the property parameter using the four-component vec4 color vector (R, G, B, A) specified.
set value - Four-component color vector (R, G, B, A) to be set as the value of the property parameter.

double ValueDouble#

The current value of the property parameter as a double.
set
Sets the value of the property parameter using the double value specified.
set value - Double value to be set as the value of the property parameter.

float ValueFloat#

The current value of the property parameter as a float.
set
Sets the value of the property parameter using the float value specified.
set value - Float value to be set as the value of the property parameter.

int ValueInt#

The current value of the property parameter as an integer.
set
Sets the value of the property parameter using the integer value specified.
set value - Integer value to be set as the value of the property parameter.

bool IsStruct#

Returns a value indicating if the current property parameter is a structure.

bool IsArray#

Returns a value indicating if the current property parameter is an array.

bool IsNode#

Returns a value indicating if the current property parameter is a node.

bool IsMaterial#

Returns a value indicating if the current property parameter is a material.

bool IsProperty#

Returns a value indicating if the current property parameter is a property.

bool IsFile#

Returns a value indicating if the current property parameter is a file.

bool IsMask#

Returns a value indicating if the current property parameter is a mask.

bool IsVec4#

Returns a value indicating if the current property parameter is a vector of 4 float components.

bool IsVec3#

Returns a value indicating if the current property parameter is a vector of 3 float components.

bool IsColor#

Returns a value indicating if the current property parameter is a color.

bool IsString#

Returns a value indicating if the current property parameter is a string.

bool IsSwitch#

Returns a value indicating if the current property parameter is a switch.

bool IsToggle#

Returns a value indicating if the current property parameter is a toggle.

bool IsDouble#

Returns a value indicating if the current property parameter is a double.

bool IsFloat#

Returns a value indicating if the current property parameter is a float.

bool IsInt#

Returns a value indicating if the current property parameter is an integer.

string Filter#

The filter string associated with the property parameter. this string specifies a filter for file, material or property parameter values thet will be used in the unigineeditor. for example, you can specify ".xml|.node|.txt" to filter certain types of assets, or specify a base material to filter out materials, that cannot be used in a particular case (e.g. to avoid an attempt of assigning a post material to a mesh).
Notice
This attribute is available only for file, material and property parameter types.

string Group#

The name of the group to which the property parameter belongs.

string Tooltip#

The tooltip for the property parameter. this title is displayed in the unigineeditor's ui.

string Title#

The title of the property parameter. this title is displayed in the unigineeditor's ui.

string Name#

The name of the property parameter.

int Type#

The type of the property parameter.

bool IsOverridden#

A value indicating if the property parameter is overridden.

bool IsInherited#

A value indicating if the property parameter is inherited from a parent.

bool IsHidden#

A value indicating if the property parameter is hidden.

bool IsExist#

A value indicating if the property parameter is an existing one.

int NumChildren#

The total number of children of the property parameter.

PropertyParameter Parent#

The parent property parameter, if it exists.

UGUID PropertyGUID#

The GUID of the property that owns the parameter.

Property Property#

The property, that owns the parameter.

int ID#

The id of the property parameter.

Members


bool IsChild ( PropertyParameter parameter ) #

Returns a value indicating if the specified property parameter is a child of this property parameter.

Arguments

  • PropertyParameter parameter - Property parameter to be checked.

Return value

1 if the specified property parameter is a child of this property parameter; otherwise, 0.

int FindChild ( string name ) #

Returns the number of the child property parameter with the specified name.

Arguments

  • string name - Name of the child property parameter to be found.

Return value

Number of the child property parameter with the specified name, if it exists; otherwise, -1.

PropertyParameter GetChild ( int num ) #

Returns a child property parameter by its number.

Arguments

  • int num - Number of the child property parameter in the range from 0 to the total number of children of this property parameter.

Return value

Child property parameter instance, if it exists; otherwise, nullptr.

PropertyParameter GetChild ( string name ) #

Returns a child property parameter by its name.

Arguments

  • string name - Child property parameter name.

Return value

Child property parameter instance, if it exists; otherwise, nullptr.

int GetChildIndex ( PropertyParameter parameter ) #

Returns the index of the specified child property parameter.

Arguments

  • PropertyParameter parameter - Child property parameter for which an index is to be found.

Return value

Index of the child property parameter in the range from 0 to the total number of children of this property parameter, if such a child exists; otherwise, -1.

void SetValue ( int value ) #

Sets the value of the property parameter using the integer value specified.

Arguments

  • int value - Integer value to be set as the value of the property parameter.

void SetValue ( float value ) #

Sets the value of the property parameter using the float value specified.

Arguments

  • float value - Float value to be set as the value of the property parameter.

void SetValue ( double value ) #

Sets the value of the property parameter using the double value specified.

Arguments

  • double value - Double value to be set as the value of the property parameter.

void SetValue ( string value ) #

Sets the value of the property parameter using the string specified.

Arguments

  • string value - String to be set as the value of the property parameter.

void SetValue ( vec2 value ) #

Sets the value of the property parameter using the two-component vec2 vector specified.

Arguments

  • vec2 value - Two-component float vector to be set as the value of the property parameter.

void SetValue ( vec3 value ) #

Sets the value of the property parameter using the three-component vec3 vector specified.

Arguments

  • vec3 value - Three-component float vector to be set as the value of the property parameter.

void SetValue ( vec4 value ) #

Sets the value of the property parameter using the four-component vec4 vector specified.

Arguments

  • vec4 value - Four-component float vector to be set as the value of the property parameter.

void SetValue ( dvec2 value ) #

Sets the value of the property parameter using the two-component dvec2 vector specified.

Arguments

  • dvec2 value - Two-component double vector to be set as the value of the property parameter.

void SetValue ( dvec3 value ) #

Sets the value of the property parameter using the three-component dvec3 vector specified.

Arguments

  • dvec3 value - Three-component double vector to be set as the value of the property parameter.

void SetValue ( dvec4 value ) #

Sets the value of the property parameter using the four-component dvec4 vector specified.

Arguments

  • dvec4 value - Four-component double vector to be set as the value of the property parameter.

void SetValue ( ivec2 value ) #

Sets the value of the property parameter using the two-component ivec2 vector specified.

Arguments

  • ivec2 value - Two-component integer vector to be set as the value of the property parameter.

void SetValue ( ivec3 value ) #

Sets the value of the property parameter using the three-component ivec3 vector specified.

Arguments

  • ivec3 value - Three-component integer vector to be set as the value of the property parameter.

void SetValue ( ivec4 value ) #

Sets the value of the property parameter using the four-component ivec4 vector specified.

Arguments

  • ivec4 value - Four-component integer vector to be set as the value of the property parameter.

void SetValue ( UGUID value ) #

Sets the value of the property parameter using the UGUID value specified.

Arguments

  • UGUID value - UGUID value to be set as the value of the property parameter.

void SetValue ( Node value ) #

Sets the value of the property parameter using the Node specified.

Arguments

  • Node value - Node to be set as the value of the property parameter.

void SetValue ( Material value ) #

Sets the value of the property parameter using the Material specified.

Arguments

  • Material value - Material to be set as the value of the property parameter.

void SetValue ( Property value ) #

Sets the value of the property parameter using the Property specified.

Arguments

  • Property value - Property to be set as the value of the property parameter.

void ResetValue ( ) #

Resets an overridden value of the property parameter.
Notice
Resetting a value of the property parameter affects all its children.

bool SetValue ( Variable value ) #

Sets the value of the property parameter using the Variable specified.

Arguments

  • Variable value - Variable to be set as the value of the property parameter.

Return value

true if the property value is set successfully; otherwise, false.

Variable GetValue ( ) #

Returns the current value of the property parameter as a Variable.

Return value

Value of the property parameter.

bool HasSliderMinValue ( ) #

Returns a value indicating if the slider parameter has the minimum value specified. The slider parameter is a parameter of one of the following types: PARAMETER_INT, PARAMETER_FLOAT, PARAMETER_DOUBLE.

Return value

1 if the slider parameter has the minimum value specified; otherwise, 0.

bool HasSliderMaxValue ( ) #

Returns a value indicating if the slider parameter has the maximum value specified. The slider parameter is a parameter of one of the following types: PARAMETER_INT, PARAMETER_FLOAT, PARAMETER_DOUBLE.

Return value

1 if the slider parameter has the maximum value specified; otherwise, 0.

void SetSwitchItem ( int item ) #

Sets the item with the specified number as a value of the switch parameter.

Suppose we have a property switch parameter declared as follows:

Source code (XML)
<parameter items="red=-1,green,blue=5,yellow"/>
Notice
Spaces in the items attribute declaration are taken into account. Thus, items="red=-1, green" shall produce 2 items: "red" and " green".

After loading we'll have switch items with the following values: red = -1, green = 0, blue = 5, yellow = 6.

Source code (C#)
PropertyParameter.SetValue(5); // "blue" shall be selected in the corresponding combobox in the UnigineEditor
PropertyParameter.SetSwitchItem(3); // "yellow" shall be selected in the corresponding combobox in the UnigineEditor (as it is the 3-rd item, starting from 0).

// If "green" item is selected in the UnigineEditor:
PropertyParameter.GetValueInt(); // returns 0, as "green" corresponds to the value of 0.
PropertyParameter.GetSwitchItem() // returns 1, as "green" is the 1-st element in the combobox (starting from 0).

Arguments

  • int item - Number of the item of the switch parameter.

int GetSwitchItem ( ) #

Returns the number of the currently selected item of the switch parameter.

Suppose we have a property switch parameter declared as follows:

Source code (XML)
<parameter items="red=-1,green,blue=5,yellow"/>
Notice
Spaces in the items attribute declaration are taken into account. Thus, items="red=-1, green" shall produce 2 items: "red" and " green"

After loading we'll have switch items with the following values: red = -1, green = 0, blue = 5, yellow = 6.

Source code (C#)
PropertyParameter.SetValue(5); // "blue" shall be selected in the corresponding combobox in the UnigineEditor
PropertyParameter.SetSwitchItem(3); // "yellow" shall be selected in the corresponding combobox in the UnigineEditor (as it is the 3-rd item, starting from 0).

// If "green" item is selected in the UnigineEditor:
PropertyParameter.GetValueInt(); // returns 0, as "green" corresponds to the value of 0.
PropertyParameter.GetSwitchItem() // returns 1, as "green" is the 1-st element in the combobox (starting from 0).

Return value

Number of the currently selected item of the switch parameter.

string GetSwitchItemName ( int item ) #

Returns the name of the item of the switch parameter.

Arguments

  • int item - Number of the item of the switch parameter.

Return value

Name of the item of the switch parameter with the specified number.

int GetSwitchItemValue ( int item ) #

Returns the value of the item of the switch parameter with the specified number.

Arguments

  • int item - Number of the item of the switch parameter.

Return value

Value of the item of the switch parameter with the specified number.

void setValueString ( string value ) #

Sets the value of the property parameter using the string specified.

Arguments

  • string value - String to be set as the value of the property parameter.

string GetValueFile ( bool fast = 0 ) #

Returns the current value of the file parameter.

Arguments

  • bool fast - 1 to use the specified number as an index in users auxiliary parameters cache; otherwise, 0.

Return value

Current file parameter value depending on the flags set for the parameter:
Source code (C++)
// flags = "asset"
setValueFile("guid://asset_guid"); 		// getValueFile() -> asset_path
setValueFile("guid://runtime_guid");	// getValueFile() -> asset_path
setValueFile("asset_path");				// getValueFile() -> asset_path
setValueFile("runtime_path");			// getValueFile() -> asset_path

// flags = "runtime" - default
setValueFile("guid://asset_guid"); 		// getValueFile() -> runtime_path
setValueFile("guid://runtime_guid");	// getValueFile() -> runtime_path
setValueFile("asset_path");				// getValueFile() -> runtime_path
setValueFile("runtime_path");			// getValueFile() -> runtime_path

// flags = "abspath"
setValueFile(file_path);				// getValueFile() -> file_path
Notice
To get a GUID of the file, use the getValueGUID() method.

string GetValueFile ( ) #

Returns the current value of the file parameter.

Return value

Current file parameter value

bool GetFileIsAsset ( ) #

Returns a value indicating if the file parameter stores a reference to an asset file.

Return value

1 if the file parameter stores a reference to an asset file; otherwise, 0.

bool GetFileIsRuntime ( ) #

Returns a value indicating if the file parameter stores a reference to a runtime file.

Return value

1 if the file parameter stores a reference to a runtime file; otherwise, 0.

bool GetFileIsAbsPath ( ) #

Returns a value indicating if the file parameter stores an absolute file path.

Return value

1 if the file parameter stores an absolute file path; otherwise, 0.

bool IsFileExist ( ) #

Returns a value indicating if a file corresponding to the property parameter exists.

Return value

1 if a file corresponding to the property parameter exists; otherwise, 0.

bool SaveState ( Stream stream ) #

Saves data of the property parameter into a binary stream.

Arguments

  • Stream stream - Stream into which the property parameter data will be saved.

Return value

1 if the property parameter data is saved successfully; otherwise, 0.

bool RestoreState ( Stream stream, int restore_mode = 0 ) #

Restores the data of the property parameter from a binary stream in the specified mode.

Arguments

Return value

1 if the property parameter data is restored successfully; otherwise, 0.

bool IsInt ( ) #

Returns a value indicating if the current property parameter is an integer.

Return value

1 if the property parameter is an integer; otherwise, 0

bool IsFloat ( ) #

Returns a value indicating if the current property parameter is a float.

Return value

1 if the property parameter is a float; otherwise, 0

bool IsDouble ( ) #

Returns a value indicating if the current property parameter is a double.

Return value

1 if the property parameter is a double; otherwise, 0

bool IsToggle ( ) #

Returns a value indicating if the current property parameter is a toggle.

Return value

1 if the property parameter is a toggle; otherwise, 0

bool IsSwitch ( ) #

Returns a value indicating if the current property parameter is a switch.

Return value

1 if the property parameter is a switch; otherwise, 0

bool IsString ( ) #

Returns a value indicating if the current property parameter is a string.

Return value

1 if the property parameter is a string; otherwise, 0

bool IsColor ( ) #

Returns a value indicating if the current property parameter is a color.

Return value

1 if the property parameter is a color; otherwise, 0

bool IsVec2 ( ) #

Returns a value indicating if the current property parameter is a vector of 2 float components.

Return value

1 if the property parameter is a vector of 2 float components; otherwise, 0

bool IsVec3 ( ) #

Returns a value indicating if the current property parameter is a vector of 3 float components.

Return value

1 if the property parameter is a vector of 3 float components; otherwise, 0

bool IsVec4 ( ) #

Returns a value indicating if the current property parameter is a vector of 4 float components.

Return value

1 if the property parameter is a vector of 4 float components; otherwise, 0

bool IsDVec2 ( ) #

Returns a value indicating if the current property parameter is a vector of 2 double components.

Return value

1 if the property parameter is a vector of 2 double components; otherwise, 0

bool IsDVec3 ( ) #

Returns a value indicating if the current property parameter is a vector of 3 double components.

Return value

1 if the property parameter is a vector of 3 double components; otherwise, 0

bool IsDVec4 ( ) #

Returns a value indicating if the current property parameter is a vector of 4 double components.

Return value

1 if the property parameter is a vector of 4 double components; otherwise, 0

bool IsIVec2 ( ) #

Returns a value indicating if the current property parameter is a vector of 2 integer components.

Return value

1 if the property parameter is a vector of 2 integer components; otherwise, 0

bool IsIVec3 ( ) #

Returns a value indicating if the current property parameter is a vector of 3 integer components.

Return value

1 if the property parameter is a vector of 3 integer components; otherwise, 0

bool IsIVec4 ( ) #

Returns a value indicating if the current property parameter is a vector of 4 integer components.

Return value

1 if the property parameter is a vector of 4 integer components; otherwise, 0

bool IsMask ( ) #

Returns a value indicating if the current property parameter is a mask.

Return value

1 if the property parameter is a mask; otherwise, 0

bool IsFile ( ) #

Returns a value indicating if the current property parameter is a file.

Return value

1 if the property parameter is a file; otherwise, 0

bool IsProperty ( ) #

Returns a value indicating if the current property parameter is a property.

Return value

1 if the property parameter is a property; otherwise, 0

bool IsMaterial ( ) #

Returns a value indicating if the current property parameter is a material.

Return value

1 if the property parameter is a material; otherwise, 0

bool IsNode ( ) #

Returns a value indicating if the current property parameter is a node.

Return value

1 if the property parameter is a node; otherwise, 0

bool IsArray ( ) #

Returns a value indicating if the current property parameter is an array.

Return value

1 if the property parameter is an array; otherwise, 0

bool IsStruct ( ) #

Returns a value indicating if the current property parameter is a structure.

Return value

1 if the property parameter is a structure; otherwise, 0

void SetValueGUID ( UGUID valueguid ) #

Sets the UGUID variable as a property parameter value.

Arguments

  • UGUID valueguid - UGUID type value

bool IsValuePropertyInternal ( ) #

Checks if the property parameter flag is set to internal (flags="internal"). If it is internal, only a property assigned to some node can be assigned to it. If the property parameter is not internal, a property from the Asset Browser can be assigned to it.

Return value

1 if a property parameter's flag is set to "Internal"; otherwise, 0.

bool IsValueFitFilter ( Node value ) #

Checks if the type of the indicated node fits the current property parameter filter.

Arguments

  • Node value

Return value

1, if the node fits the filter; otherwise, 0.

bool IsValueFitFilter ( Property value ) #

Checks if the indicated property fits the current property parameter filter.

Arguments

  • Property value

Return value

1, if the property fits the filter; otherwise, 0.

bool IsValueFitFilter ( Material value ) #

Checks if the indicated material fits the current property parameter filter.

Arguments

  • Material value

Return value

1, if the material fits the filter; otherwise, 0.

bool IsValueFitFilter ( UGUID value ) #

Checks if the indicated GUID fits the current property parameter filter.

Arguments

  • UGUID value

Return value

1, if the GUID fits the filter; otherwise, 0.
Last update: 2020-04-10
Build: ()