VRay SDK for C++
Loading...
Searching...
No Matches
VRay::UIGuides Class Reference
Inheritance diagram for VRay::UIGuides:
VRay::RuntimeUIGuides

Classes

struct  EnumItem
 Structure representing an enumerated item with a value and a name. More...
 

Public Types

enum  AttributesType {
  None = 0 , ObjectSet = 1 , TextureSlot = 2 , LightSet = 4 ,
  PartOf3dsMaxTriple = 8 , BitSet = 16 , Boolean = 32
}
 Used to specify some additional attributes for the parameter. More...
 
enum  FileAssetOpType { Load , Save , LoadAndSave }
 
enum  GuideType {
  Enum , Enable , DisplayName , MinValue ,
  MaxValue , SpinStep , Units , FileAsset ,
  Attributes , StringEnum , FileAssetNames , FileAssetOp ,
  StartRollout , StartTab , SoftMinValue , SoftMaxValue ,
  QuantityType , OverridenBy , Overrides , GPUSupport ,
  Tier , Hide , DefaultValue , MaxGuides
}
 UIGuides supported property types. More...
 
enum  QuantityTypeEnum { Unknown , Distance , Angle , LocalSubdivs }
 Defines the quantity type that the parameter represents. More...
 
enum  TierType { Basic = 0 , DefaultTier = 1 , Advanced = 2 }
 
enum  UnitsType {
  DefaultUnits , Radians , Degrees , Millimeters ,
  Centimeters , Meters
}
 

Public Member Functions

 UIGuides (const UIGuides &uiGuides)
 
int getCountOfOverrides () const
 
std::string getDisplayName () const
 
std::vector< std::string > getEnableDepends () const
 
std::vector< EnumItemgetEnumStrings () const
 
std::vector< std::string > getFileAssetExts () const
 
std::vector< std::string > getFileAssetNames () const
 
FileAssetOpType getFileAssetOp () const
 
float getFloat (const GuideType type) const
 
std::vector< float > getFloats (const GuideType type) const
 
GPUParamSupport getGPUSupportStatus () const
 
std::vector< std::string > getHideDepends () const
 
QuantityTypeEnum getQuantityType () const
 
std::string getRolloutName () const
 
std::vector< std::string > getStringEnumStrings () const
 
std::string getTabName () const
 
TierType getTier () const
 
UnitsType getUnits () const
 
std::string getValueOfOverriddenBy () const
 
std::string getValueOfOverride (const int index) const
 
bool hasAttribute (const AttributesType attributeType) const
 
bool hasEnabledCondition () const
 
bool hasHiddenCondition () const
 
bool hasOverriddenBy () const
 
bool hasOverride () const
 
bool hasType (const GuideType type) const
 
bool isEnum () const
 
bool isStringEnum () const
 
UIGuidesoperator= (const UIGuides &uiGuides)
 

Protected Member Functions

 UIGuides (const void *pParamDef)
 
const void * getParamDef () const
 

Friends

class PropertyMeta
 

Member Enumeration Documentation

◆ AttributesType

Used to specify some additional attributes for the parameter.

Enumerator
ObjectSet 

Mark plugin list parameters as taking geometry objects for the values.

TextureSlot 

Mark a texture parameter as accepting only texture maps, no constant float/color/etc.. values. The UI for such a parameter shouldn't include a slider or color picker, but just a slot for connecting textures. If no texture is connected, such parameters shouldn't be set at all, for performance reasons.

LightSet 

Mark plugin list parameters as containing light plugins.

PartOf3dsMaxTriple 

Mark color/color_tex/color_tex_mult parameter with this attribute.

BitSet 

Mark the parameter as having multiple bitwise OR'ed values. The single bit values may be described by enum=(..) property.

Boolean 

Mark the parameter as having only two acceptable values (0/1). Used for parameters that are represented by 'int' type to allow easy future extensions, while still allowing generated UI to use check-boxes for representing the parameter.

◆ FileAssetOpType

It is used to specify whether the file asset is going to be loaded or saved by V-Ray. Can be fileAssetOp=(load), fileAssetOp=(save) or fileAssetOp=(bothLoadAndSave). If 'bothLoadAndSave' is specified, the asset is loaded or saved based on another parameter. For example, the VRayStereoscopicSettings::shademap_file is loaded or saved based on sm_mode. If this is not specified, it defaults to 'load'

◆ GuideType

UIGuides supported property types.

Enumerator
Enum 

A list of enumerated strings used as combo-box items. For example, "enum=(-1:a;0:b;1:c;2:d)" means the combo-box will have 4 strings: a,b,c,d and the integers are the corresponding values.

Enable 

Indicates when the control should be active (not grayed out), depending on other plugin parameter values.

DisplayName 

Specifies a user-friendly display name to be used instead of the parameter name. For example, "displayName=(Refraction Glossiness)".

MinValue 

Limits the min value of the control.

MaxValue 

Limits the max value of the control.

SpinStep 

Add a step hint to a slider.

Units 

Gives information about the units of the parameter. This guide lets the UI to present the parameter in a more appropriate form to the user (e.g., converting radians to degrees).

FileAsset 

Used to mark filename parameters. The format is fileAsset=(ext0;ext1;ext2), where ext0,ext1,ext2 are the supported extensions (* for all extensions).

Attributes 

Used to specify some additional attributes for the parameter. The format is "attributes=(attr0;attr1;attr2)".

StringEnum 

A list of enumerated string used as combo-box items For example, "string_enum=(value1;value2;value3)" means the combo-box will have 3 strings: value1,value2,value3.

FileAssetNames 

Used to give longer names to the file extensions. The format is fileAssetNames=(ext0_LongName;ext1_LongName;ext2_LongName). For example, "Portable Network Graphics" for a "png" extension in 'fileAsset'.

FileAssetOp 

It is used to specify whether the file asset is going to be loaded or saved (or both) by V-Ray.

StartRollout 

If this is present a roll-out should be added starting with this parameter. The roll-out name is specified like this "startRollout=(rollout_name)". If 'rollout_name' is an empty string, a simple divider of some kind should be added before the parameter. For example, "startRollout=(Reflection layer)". If 'rollout_name' is equal to the special string '<EndRollout>' this means that this parameter is the last that should be part of the roll-out.

StartTab 

If this is present a tab should be added starting with this parameter. The name of the tab is specified like this "startTab=(tab_name)". For example, "startTab=(V-Ray Material)".

SoftMinValue 

Limits the max value of the control initially (the user can override it).

SoftMaxValue 

Limits the min value of the control initially (the user can override it).

QuantityType 

Defines the quantity type that the parameter represents. For example, "quantityType=(distance)".

OverridenBy 

OverridenBy and Overrides are used to mark a pair of parameters such that one of them is a simple color/float and the other one is a texture/float texture that overrides it if it is set. The information can be used to properly handle their UI creation and export. The overrides ui guide allows marking multiple parameters. The feature for multiple overridden parameters is useful for marking color/color_tex/color_tex_mult triples which are common in 3dsMax. The formats of these guides are "overridenBy=(overridingParamName)" and "overrides=(overridenParamName)".

Overrides 

OverridenBy and Overrides are used to mark a pair of parameters such that one of them is a simple color/float and the other one is a texture/float texture that overrides it if it is set. The information can be used to properly handle their UI creation and export. The overrides ui guide allows marking multiple parameters. The feature for multiple overridden parameters is useful for marking color/color_tex/color_tex_mult triples which are common in 3dsMax. The formats of these guides are "overridenBy=(overridingParamName)" and "overrides=(overridenParamName)".

GPUSupport 

To what extent the property is supported by V-Ray GPU.

Tier 

The UI tier where the parameter should be shown. By default the UI should show the "default" tier.

Hide 

Indicates when the control should be hidden (not shown at all), depending on other plugin parameter values.

DefaultValue 

Specifies the default value which should be used when generating UI for this parameter. Changing parameter values is almost never done, because it breaks old scenes, so this is a method which makes it possible to change the parameter defaults. The format is defaultValue=(number0,number1, number2, ..., numberN). It is possible to specify maximum 16 values. The number is in float format (1.0 or 1e6) and for parameters which don't use float storage (int, bool) the parameter is converted using C/C++ conversion rules.

MaxGuides 

Used to count the number of values in the enum.

◆ QuantityTypeEnum

Defines the quantity type that the parameter represents.

Enumerator
Distance 

If no units are set then the distance is in 'scene units', and conversion to meters is defined by the value of SettingsUnitsInfo::meters_scale. If the units set are 'millimeters', 'centimeters' or 'meters', the "distance" quantity type is implied, so you can omit it in the uiGuides string. This type is valid only for "float", "double" and "vector" parameters.

Angle 

If the unit type is radians or degrees, this is implied, so you can omit it in the uiGuides string. If no unit type is specified, then the UI code should assume that the angle is in 'degrees'. This type is valid only for "float", "double" and "vector" parameters.

LocalSubdivs 

This should be specified on parameters which are affected by the "Use Local Subdivs" option of the DMC Sampler (SettingsDMCSampler::use_local_subdivs).

◆ TierType

The UI tier where the parameter should be shown. If this guide is not specified for a parameter, it is assumed to be in the "default" tier. By default the UI should show the "default" tier. Higher tiers (basic < default < advanced) should show all parameters from lower tiers.

◆ UnitsType

Gives information about the units of the parameter. This guide lets the UI to present the parameter in a more appropriate form to the user (e.g., converting radians to degrees).

Member Function Documentation

◆ getCountOfOverrides()

int VRay::UIGuides::getCountOfOverrides ( ) const

Gets the count of parameters overridden by this parameter.

Returns
The count of overridden parameters.

◆ getDisplayName()

std::string VRay::UIGuides::getDisplayName ( ) const

Gets the display name of the parameter.

Returns
The display name of the parameter.

◆ getEnableDepends()

std::vector< std::string > VRay::UIGuides::getEnableDepends ( ) const

Retrieves the list of dependencies for the enabled condition of the parameter.

Returns
A vector of strings representing the dependencies for the enabled condition.

◆ getEnumStrings()

std::vector< EnumItem > VRay::UIGuides::getEnumStrings ( ) const

Retrieves the list of enumerated strings associated with the parameter.

Returns
A vector of EnumItem structures representing the enumerated strings.

◆ getFileAssetExts()

std::vector< std::string > VRay::UIGuides::getFileAssetExts ( ) const

Retrieves the list of file asset extensions supported by the parameter.

Returns
A vector of strings representing the supported file asset extensions.

◆ getFileAssetNames()

std::vector< std::string > VRay::UIGuides::getFileAssetNames ( ) const

Retrieves the list of long names for the file asset extensions supported by the parameter.

Returns
A vector of strings representing the long names of the supported file asset extensions.

◆ getFileAssetOp()

FileAssetOpType VRay::UIGuides::getFileAssetOp ( ) const

Gets the file asset operation type associated with the parameter.

Returns
The file asset operation type.

◆ getFloat()

float VRay::UIGuides::getFloat ( const GuideType  type) const

Retrieves the float value associated with a specific guide type.

Parameters
typeThe guide type for which to retrieve the float value.
Returns
The float value associated with the specified guide type.

◆ getFloats()

std::vector< float > VRay::UIGuides::getFloats ( const GuideType  type) const

Retrieves a list of float values associated with a specific guide type.

Parameters
typeThe guide type for which to retrieve the list of float values.
Returns
A vector of float values associated with the specified guide type.

◆ getGPUSupportStatus()

GPUParamSupport VRay::UIGuides::getGPUSupportStatus ( ) const

Gets the GPU support status for the parameter.

Returns
The GPU support status.

◆ getHideDepends()

std::vector< std::string > VRay::UIGuides::getHideDepends ( ) const

Retrieves the list of dependencies for the hidden condition of the parameter.

Returns
A vector of strings representing the dependencies for the hidden condition.

◆ getQuantityType()

QuantityTypeEnum VRay::UIGuides::getQuantityType ( ) const

Gets the quantity type of the parameter.

Returns
The quantity type of the parameter.

◆ getRolloutName()

std::string VRay::UIGuides::getRolloutName ( ) const

Gets the rollout name for the parameter.

Returns
The rollout name of the parameter.

◆ getStringEnumStrings()

std::vector< std::string > VRay::UIGuides::getStringEnumStrings ( ) const

Retrieves the list of enumerated strings for string enum type parameters.

Returns
A vector of strings representing the enumerated strings.

◆ getTabName()

std::string VRay::UIGuides::getTabName ( ) const

Gets the tab name for the parameter.

Returns
The tab name of the parameter.

◆ getTier()

TierType VRay::UIGuides::getTier ( ) const

Gets the UI tier type for the parameter.

Returns
The UI tier type of the parameter.

◆ getUnits()

UnitsType VRay::UIGuides::getUnits ( ) const

Gets the unit type of the parameter.

Returns
The unit type of the parameter.

◆ getValueOfOverriddenBy()

std::string VRay::UIGuides::getValueOfOverriddenBy ( ) const

Retrieves the name of the parameter that overrides this parameter.

Returns
The name of the overriding parameter.

◆ getValueOfOverride()

std::string VRay::UIGuides::getValueOfOverride ( const int  index) const

Retrieves the name of an overridden parameter at a specific index.

Parameters
indexThe index of the overridden parameter to retrieve.
Returns
The name of the overridden parameter at the specified index.

◆ hasAttribute()

bool VRay::UIGuides::hasAttribute ( const AttributesType  attributeType) const

Determines if the parameter has a specific attribute type.

Parameters
attributeTypeThe attribute type to check for.
Returns
true if the parameter has the specified attribute type, false otherwise.

◆ hasEnabledCondition()

bool VRay::UIGuides::hasEnabledCondition ( ) const

Checks if the parameter has an enabled condition.

Returns
true if the parameter has an enabled condition, false otherwise.

◆ hasHiddenCondition()

bool VRay::UIGuides::hasHiddenCondition ( ) const

Checks if the parameter has a hidden condition.

Returns
true if the parameter has a hidden condition, false otherwise.

◆ hasOverriddenBy()

bool VRay::UIGuides::hasOverriddenBy ( ) const

Checks if the parameter is overridden by another parameter.

Returns
true if the parameter is overridden by another parameter, false otherwise.

◆ hasOverride()

bool VRay::UIGuides::hasOverride ( ) const

Checks if the parameter overrides another parameter.

Returns
true if the parameter overrides another parameter, false otherwise.

◆ hasType()

bool VRay::UIGuides::hasType ( const GuideType  type) const

Determines if the parameter has a specific guide type.

Parameters
typeThe guide type to check for.
Returns
true if the parameter has the specified guide type, false otherwise.

◆ isEnum()

bool VRay::UIGuides::isEnum ( ) const

Checks if the parameter is of enumerated type.

Returns
true if the parameter is an enum, false otherwise.

◆ isStringEnum()

bool VRay::UIGuides::isStringEnum ( ) const

Checks if the parameter is a string enum.

Returns
true if the parameter is a string enum, false otherwise.

The documentation for this class was generated from the following file: