NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::Display::IrayPlusMaterialEditorBuilder Class Reference

Represents a NXOpen::Display::IrayPlusMaterialEditorBuilder
This class is restricted to being called from a program running during an Interactive NX session. More...

Inheritance diagram for NXOpen::Display::IrayPlusMaterialEditorBuilder:
NXOpen::Builder NXOpen::TaggedObject NXOpen::GeometricUtilities::IComponentBuilder

Public Types

enum  LayerType {
  LayerTypeCoatings, LayerTypeBase, LayerTypeGeometry, LayerTypeTextureSpace,
  LayerTypeMaxNumber
}
 Layer types used in iray plus material. More...
 

Public Member Functions

NXString AddComponent (const NXString &componentType, int *addedLayerIndex)
 Adds a component to layers for specific layer type. More...
 
NXString AddComponent (const char *componentType, int *addedLayerIndex)
 Adds a component to layers for specific layer type. More...
 
void ExportToXMLFile (const NXString &exportXmlFileName)
 Exports current material of material editor builder into a XML file. More...
 
void ExportToXMLFile (const char *exportXmlFileName)
 Exports current material of material editor builder into a XML file. More...
 
void GetComponentInfo (const NXString &componentName, NXOpen::Display::IrayPlusMaterialAttribute **attribueObject, std::vector< NXString > &attribList)
 Get all the attribute name of a component. More...
 
void GetComponentInfo (const char *componentName, NXOpen::Display::IrayPlusMaterialAttribute **attribueObject, std::vector< NXString > &attribList)
 Get all the attribute name of a component. More...
 
NXOpen::Display::IrayPlusMaterialAttributeGetComponentParameter (const NXString &attribueName)
 Gets single attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
NXOpen::Display::IrayPlusMaterialAttributeGetComponentParameter (const char *attribueName)
 Gets single attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
NXString GetComponentParameterValue (const NXString &attribueName)
 Gets attribute's value as string for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
NXString GetComponentParameterValue (const char *attribueName)
 Gets attribute's value as string for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
NXString GetImageParameterFullPath (const NXString &imageAttribueName)
 To return the absolute path of specific image type parameter. More...
 
NXString GetImageParameterFullPath (const char *imageAttribueName)
 To return the absolute path of specific image type parameter. More...
 
void GetMaterialLayersInfo (std::vector< NXString > &typeList, std::vector< NXString > &uniqueNameList)
 Get all the components unique name and type name of this material. More...
 
NXString MaterialName ()
 Returns the current material name of material editor builder. More...
 
void MoveComponent (int index, const NXString &componentType, bool moveUp)
 Moves a component of layers up and down of layers stack. More...
 
void MoveComponent (int index, const char *componentType, bool moveUp)
 Moves a component of layers up and down of layers stack. More...
 
bool PreviewToggle ()
 Returns a boolean value that indicate whether the preview toggle is ON. More...
 
void RemoveComponent (int index, const NXString &componentType)
 Removes a component to layers for specific layer index. More...
 
void RemoveComponent (int index, const char *componentType)
 Removes a component to layers for specific layer index. More...
 
void SaveToSystemStudioMaterials (const NXString &saveXmlFileName)
 Saves the material to System Studio Materials which is a directory under ugphoto/IrayPlus_ug_canned_mattex. More...
 
void SaveToSystemStudioMaterials (const char *saveXmlFileName)
 Saves the material to System Studio Materials which is a directory under ugphoto/IrayPlus_ug_canned_mattex. More...
 
void SetComponentParameter (const NXString &attribueName, NXOpen::Display::IrayPlusMaterialAttribute *attribueObject, std::vector< NXString > &changedAttrib)
 Sets attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
void SetComponentParameter (const char *attribueName, NXOpen::Display::IrayPlusMaterialAttribute *attribueObject, std::vector< NXString > &changedAttrib)
 Sets attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
void SetComponentParameterValue (const NXString &attribueName, const NXString &attribueValue, std::vector< NXString > &changedAttrib)
 Sets attribute value for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
void SetComponentParameterValue (const char *attribueName, const char *attribueValue, std::vector< NXString > &changedAttrib)
 Sets attribute value for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name". More...
 
void SetMaterialName (const NXString &materialName)
 Sets the current material name of material editor builder. More...
 
void SetMaterialName (const char *materialName)
 Sets the current material name of material editor builder. More...
 
void SetPreviewToggle (bool toggleOn)
 Sets a boolean value that indicate whether the preview toggle is ON. More...
 
- Public Member Functions inherited from NXOpen::Builder
NXOpen::NXObjectCommit ()
 Commits any edits that have been applied to the builder. More...
 
void Destroy ()
 Deletes the builder, and cleans up any objects created by the builder. More...
 
std::vector< NXOpen::NXObject * > GetCommittedObjects ()
 For builders that create more than one object, this method returns the objects that are created by commit. More...
 
NXOpen::NXObjectGetObject ()
 Returns the object currently being edited by this builder. More...
 
void ShowResults ()
 Updates the model to reflect the result of an edit to the model for all builders that support showing results. More...
 
virtual bool Validate ()
 Validate whether the inputs to the component are sufficient for commit to be called. More...
 
- Public Member Functions inherited from NXOpen::TaggedObject
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

Represents a NXOpen::Display::IrayPlusMaterialEditorBuilder
This class is restricted to being called from a program running during an Interactive NX session.

If run from a non-interactive session it will return NULL.

The IrayPlusMaterialEditorBuilder used to manipulate specific material for IrayPlus. It maintained an IrayPlusMatAttribute based hierarchical structure corresponding to the xml structure of IrayPlus material.

The example of the hierarchical structure for material Varnished Cherry is:

Material-Layers -ClearCoat -Attribute1 -Attribute2 -... -Base -Attribute1 -Attribute2 -... -Geometry -Attribute1 -Attribute2 -... -Global Texture Space -Attribute1 -Attribute2 -... Each node in the hierarchy is an IrayPlusMatAttribute object. This structure been created when the IrayPlusMaterialEditorBuilder creating process.

Example for general workflow of set parameter show bellow: (1)Use GetMaterialLayersInfo() to get names and unique names of all the layers and components of the material. For the example Varnished Cherry material. It will return 4 names:[ClearCoat,Base,Geometry,Global Texture Space] and 4 unique names:[ model2_'Varnished Cherry_Layer_198, Matte, BaseGeometry,Box].

(2)Then we can use these name to call GetComponentInfo() to get the parameters of each component: If we use 'Base' as component name. The attribute number will return 18. The attribute list will return array like:[Base-Base Type, Base-Colour-Interface Type,...]

(3)Use GetComponentParameter() to get attribute object of specific attribute name. We can use 'Base-Colour-Interface Type' as parameter to call GetComponentParameter(). It will return the pointer of IrayPlusMatAttribute object of this attribute.User can modify the value of the IrayPlusMatAttribute object.

(4)Use SetComponentParameter() to set the value of attribute. After modify IrayPlusMatAttribute object returned by GetComponentParameter(). We can use 'Base-Colour-Interface Type' and the pointer to IrayPlusMatAttribute object that been modified as parameter to call SetComponentParameter() to set the value into hierarchy.

(5)If you did any change of hierarchy. You need to call builder's commit() function to make hierarchy apply to IrayPlus Rendeing engine to make all your modification have effect.

NOTE: The detail rule of using each function see comments of specific function.




Created in NX11.0.0.

Member Enumeration Documentation

Layer types used in iray plus material.

Enumerator
LayerTypeCoatings 

Coating layers.

LayerTypeBase 

Base layer.

LayerTypeGeometry 

Base Geometry layer.

LayerTypeTextureSpace 

Global texture space layer.

LayerTypeMaxNumber 

max layer type

Member Function Documentation

NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::AddComponent ( const NXString componentType,
int *  addedLayerIndex 
)

Adds a component to layers for specific layer type.

Let material ''Varnished Cherry' for example:

If user wants to add 'Dir1' layer into Layers. They should use 'Dir1' to componentType paramter. Then the added_layer_index output the added layer's new index. It will return 1 for 'Dir1' index .Because the 'ClearCoat' will be index 0.

componentUniqueName parameter will return the unique name of 'Dir1': 'model2_'Varnished Cherry_Layer_262'.

You can also add more than one layers for same type. You can add 'Dir1' into ''Varnished Cherry' again. The added_layer_index would return 2. The componentUniqueName parameter will return the unique name of new added 'Dir2' : 'model2_'Varnished Cherry_Layer_281'

Returns

Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
componentTypecomponenttype
addedLayerIndexadded layer index
NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::AddComponent ( const char *  componentType,
int *  addedLayerIndex 
)

Adds a component to layers for specific layer type.

Let material ''Varnished Cherry' for example:

If user wants to add 'Dir1' layer into Layers. They should use 'Dir1' to componentType paramter. Then the added_layer_index output the added layer's new index. It will return 1 for 'Dir1' index .Because the 'ClearCoat' will be index 0.

componentUniqueName parameter will return the unique name of 'Dir1': 'model2_'Varnished Cherry_Layer_262'.

You can also add more than one layers for same type. You can add 'Dir1' into ''Varnished Cherry' again. The added_layer_index would return 2. The componentUniqueName parameter will return the unique name of new added 'Dir2' : 'model2_'Varnished Cherry_Layer_281'

Returns

Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
componentTypecomponenttype
addedLayerIndexadded layer index
void NXOpen::Display::IrayPlusMaterialEditorBuilder::ExportToXMLFile ( const NXString exportXmlFileName)

Exports current material of material editor builder into a XML file.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
exportXmlFileNameexport xml file name
void NXOpen::Display::IrayPlusMaterialEditorBuilder::ExportToXMLFile ( const char *  exportXmlFileName)

Exports current material of material editor builder into a XML file.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
exportXmlFileNameexport xml file name
void NXOpen::Display::IrayPlusMaterialEditorBuilder::GetComponentInfo ( const NXString componentName,
NXOpen::Display::IrayPlusMaterialAttribute **  attribueObject,
std::vector< NXString > &  attribList 
)

Get all the attribute name of a component.

The string attribute name format should be the component name.

Let material ''Varnished Cherry' for example:

If user wants to get component's sub attribute names of 'Base' component. They should input 'Base' as componentName paramter. Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'Base' component in the hierarchy. The attrib_list will return array of all the attribute name of the 'Base' component like [Base-Base Type, Base-Colour-Interface Type,...]

If user wants to get layer's sub attribute names of 'ClearCoat'. They should use '0' as componentName paramter. Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'ClearCoat' layer in the hierarchy. The attrib_list will return array of all the attribute name of the 'ClearCoat' layer like [model2_'Varnished Cherry_Layer_198-Layer Type, model2_'Varnished Cherry_Layer_198-Colour-Interface Type,...]

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
componentNamecomponentname
attribueObjectattribueobject
attribListattrib list
void NXOpen::Display::IrayPlusMaterialEditorBuilder::GetComponentInfo ( const char *  componentName,
NXOpen::Display::IrayPlusMaterialAttribute **  attribueObject,
std::vector< NXString > &  attribList 
)

Get all the attribute name of a component.

The string attribute name format should be the component name.

Let material ''Varnished Cherry' for example:

If user wants to get component's sub attribute names of 'Base' component. They should input 'Base' as componentName paramter. Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'Base' component in the hierarchy. The attrib_list will return array of all the attribute name of the 'Base' component like [Base-Base Type, Base-Colour-Interface Type,...]

If user wants to get layer's sub attribute names of 'ClearCoat'. They should use '0' as componentName paramter. Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'ClearCoat' layer in the hierarchy. The attrib_list will return array of all the attribute name of the 'ClearCoat' layer like [model2_'Varnished Cherry_Layer_198-Layer Type, model2_'Varnished Cherry_Layer_198-Colour-Interface Type,...]

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
componentNamecomponentname
attribueObjectattribueobject
attribListattrib list
NXOpen::Display::IrayPlusMaterialAttribute* NXOpen::Display::IrayPlusMaterialEditorBuilder::GetComponentParameter ( const NXString attribueName)

Gets single attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to get 'Base' component's attribueObject of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as componentName paramter. Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'Base-Colour-Colour' component in the hierarchy.

If user wants to get layer's sub attribute of 'ClearCoat'. They should use index in componentName paramter: 'Layers-0-ReflectionColour-ColourOffset' Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'ReflectionColour-ColourOffset' attribute of 'ClearCoat' layer in the hierarchy.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

Returns

Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
attribueNameattribuename
NXOpen::Display::IrayPlusMaterialAttribute* NXOpen::Display::IrayPlusMaterialEditorBuilder::GetComponentParameter ( const char *  attribueName)

Gets single attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to get 'Base' component's attribueObject of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as componentName paramter. Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'Base-Colour-Colour' component in the hierarchy.

If user wants to get layer's sub attribute of 'ClearCoat'. They should use index in componentName paramter: 'Layers-0-ReflectionColour-ColourOffset' Then the attribueObject output the pointer to the IrayPlusMatAttribute object of 'ReflectionColour-ColourOffset' attribute of 'ClearCoat' layer in the hierarchy.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

Returns

Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
attribueNameattribuename
NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::GetComponentParameterValue ( const NXString attribueName)

Gets attribute's value as string for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to get 'Base' component's value of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as componentName paramter. attribueValue parameter will return the string for the value of 'Base-Colour-Colour': "0.000000000000000,1.000000000000000,1.000000000000000"

If user wants to get layer's sub attribute of 'ClearCoat'. They should use index in componentName paramter: 'Layers-0-ReflectionColour-ColourOffset'

attribueValue parameter will return the value of 'ClearCoat''s 'ReflectionColour-ColourOffset' as a string : "1.000000000000000,0.000000000000000,0.000000000000000"

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

Returns

Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
attribueNameattribuename
NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::GetComponentParameterValue ( const char *  attribueName)

Gets attribute's value as string for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to get 'Base' component's value of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as componentName paramter. attribueValue parameter will return the string for the value of 'Base-Colour-Colour': "0.000000000000000,1.000000000000000,1.000000000000000"

If user wants to get layer's sub attribute of 'ClearCoat'. They should use index in componentName paramter: 'Layers-0-ReflectionColour-ColourOffset'

attribueValue parameter will return the value of 'ClearCoat''s 'ReflectionColour-ColourOffset' as a string : "1.000000000000000,0.000000000000000,0.000000000000000"

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

Returns

Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
attribueNameattribuename
NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::GetImageParameterFullPath ( const NXString imageAttribueName)

To return the absolute path of specific image type parameter.

The format of imageAttribueName should be : "layer name-interface name-attribute name"

Let material ''Varnished Cherry' for example:

If user wants to get image's full path of 'Base-Colour-TextureSpace-Image'. User should input 'Base-Colour-TextureSpace-Image' as imageAttribueName paramter. imageFullPath parameter will return the string of full path.

If user wants to get layer's sub attribute of 'ClearCoat'. They should use index in imageAttribueName paramter: 'Layers-0-TextureSpace-Image'

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

If the

Returns

Created in NX11.0.2.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
imageAttribueNameimageattribuename
NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::GetImageParameterFullPath ( const char *  imageAttribueName)

To return the absolute path of specific image type parameter.

The format of imageAttribueName should be : "layer name-interface name-attribute name"

Let material ''Varnished Cherry' for example:

If user wants to get image's full path of 'Base-Colour-TextureSpace-Image'. User should input 'Base-Colour-TextureSpace-Image' as imageAttribueName paramter. imageFullPath parameter will return the string of full path.

If user wants to get layer's sub attribute of 'ClearCoat'. They should use index in imageAttribueName paramter: 'Layers-0-TextureSpace-Image'

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

If the

Returns

Created in NX11.0.2.

License requirements : studio_render ("UG STUDIO RENDER")
Parameters
imageAttribueNameimageattribuename
void NXOpen::Display::IrayPlusMaterialEditorBuilder::GetMaterialLayersInfo ( std::vector< NXString > &  typeList,
std::vector< NXString > &  uniqueNameList 
)

Get all the components unique name and type name of this material.

The order in list have meanings. The Layers's components are put into the list first. So the index of component in list are same of index in Layers. Other Base, Global TextureSplace are insert into the list after Layer's components.

Use system material 'Varnished Cherry' as example. Set attribueName paramter to ''Varnished Cherry'. It will return 4 items in type_list:[ClearCoat,Base,Geometry,Global Texture Space] and 4 item in unique_name_list:[model2_'Varnished Cherry_Layer_198, Matte, BaseGeometry,Box].

The type_list output the type for sublayer in Layers and name for Base,Geometry,Global Texture Space. The unique_name_list output the unique name of each layers and types for Base,Geometry,Global Texture Space.

When user use these name to get or set attribute for the specific components. They should use 'Base' 'Geometry' 'Global Texture Space' for fixed components. But for components in Layers.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.

For example if user want to set or get the attribute of ClearCoat of material ''Varnished Cherry'. They should use '0' as the paramter name to call GetComponentParameter or SetComponentParameter.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
typeListtype list
uniqueNameListunique name list
NXString NXOpen::Display::IrayPlusMaterialEditorBuilder::MaterialName ( )

Returns the current material name of material editor builder.

NOTE: the returned materialName should be freed via TEXT_free by caller.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

void NXOpen::Display::IrayPlusMaterialEditorBuilder::MoveComponent ( int  index,
const NXString componentType,
bool  moveUp 
)

Moves a component of layers up and down of layers stack.

Let material ''Varnished Cherry' for example: If use changed the material has two Layers: Dir1 and ClearCoat. Then user wants to move 'Dir1' layer down in Layers. They should use 1 as index paramter.

The parameter componentType should input the layer type of the layer that you want to move. This make the deleting more type safe. User should set 'Dir1' as componentType for this example.

move_up parameter should be 'false' for this example.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
indexindex
componentTypecomponenttype
moveUpmove up
void NXOpen::Display::IrayPlusMaterialEditorBuilder::MoveComponent ( int  index,
const char *  componentType,
bool  moveUp 
)

Moves a component of layers up and down of layers stack.

Let material ''Varnished Cherry' for example: If use changed the material has two Layers: Dir1 and ClearCoat. Then user wants to move 'Dir1' layer down in Layers. They should use 1 as index paramter.

The parameter componentType should input the layer type of the layer that you want to move. This make the deleting more type safe. User should set 'Dir1' as componentType for this example.

move_up parameter should be 'false' for this example.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
indexindex
componentTypecomponenttype
moveUpmove up
bool NXOpen::Display::IrayPlusMaterialEditorBuilder::PreviewToggle ( )

Returns a boolean value that indicate whether the preview toggle is ON.

If preview toggle is true. then the preview image of the material will be generated.
Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

void NXOpen::Display::IrayPlusMaterialEditorBuilder::RemoveComponent ( int  index,
const NXString componentType 
)

Removes a component to layers for specific layer index.

Let material ''Varnished Cherry' for example: If use changed the material has two Layers: Dir1 and ClearCoat. Then user wants to remove 'Dir1' layer from Layers. They should use 1 as index paramter.

The parameter componentType should input the layer type of the layer that you want to remove. This make the deleting more type safe. User should set 'Dir1' as componentType for this example.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
indexindex
componentTypecomponenttype
void NXOpen::Display::IrayPlusMaterialEditorBuilder::RemoveComponent ( int  index,
const char *  componentType 
)

Removes a component to layers for specific layer index.

Let material ''Varnished Cherry' for example: If use changed the material has two Layers: Dir1 and ClearCoat. Then user wants to remove 'Dir1' layer from Layers. They should use 1 as index paramter.

The parameter componentType should input the layer type of the layer that you want to remove. This make the deleting more type safe. User should set 'Dir1' as componentType for this example.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
indexindex
componentTypecomponenttype
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SaveToSystemStudioMaterials ( const NXString saveXmlFileName)

Saves the material to System Studio Materials which is a directory under ugphoto/IrayPlus_ug_canned_mattex.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
saveXmlFileNamesave xml file name
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SaveToSystemStudioMaterials ( const char *  saveXmlFileName)

Saves the material to System Studio Materials which is a directory under ugphoto/IrayPlus_ug_canned_mattex.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
saveXmlFileNamesave xml file name
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetComponentParameter ( const NXString attribueName,
NXOpen::Display::IrayPlusMaterialAttribute attribueObject,
std::vector< NXString > &  changedAttrib 
)

Sets attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to set 'Base' component's attribueObject of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as attribueName paramter. The attribueObject point to the IrayPlusMatAttribute which should have modified value for Colour.

If user wants to set layer's sub attribute of 'ClearCoat'. They should use index in attribueName paramter: 'Layers-0-ReflectionColour-ColourOffset' The attribueObject point to the IrayPlusMatAttribute which should have modified value for ColourOffset.

The changed_attrib parameter will return all the attributs names effected by current modification. then user could use this to figure out what should to requery.

If user use 'Base-Base Type' to change base type to 'Metal'. Then all the attribute name in 'Base' will be listed in changed_attrib. Because the interface type change will cause the sub attributes been changed either.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
attribueNameattribuename
attribueObjectattribueobject
changedAttribchanged attrib
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetComponentParameter ( const char *  attribueName,
NXOpen::Display::IrayPlusMaterialAttribute attribueObject,
std::vector< NXString > &  changedAttrib 
)

Sets attribute object for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to set 'Base' component's attribueObject of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as attribueName paramter. The attribueObject point to the IrayPlusMatAttribute which should have modified value for Colour.

If user wants to set layer's sub attribute of 'ClearCoat'. They should use index in attribueName paramter: 'Layers-0-ReflectionColour-ColourOffset' The attribueObject point to the IrayPlusMatAttribute which should have modified value for ColourOffset.

The changed_attrib parameter will return all the attributs names effected by current modification. then user could use this to figure out what should to requery.

If user use 'Base-Base Type' to change base type to 'Metal'. Then all the attribute name in 'Base' will be listed in changed_attrib. Because the interface type change will cause the sub attributes been changed either.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
attribueNameattribuename
attribueObjectattribueobject
changedAttribchanged attrib
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetComponentParameterValue ( const NXString attribueName,
const NXString attribueValue,
std::vector< NXString > &  changedAttrib 
)

Sets attribute value for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to set 'Base' component's value of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as attribueName paramter. attribueValue parameter will return the string for the value of 'Base-Colour-Colour': "0.000000000000000,1.000000000000000,1.000000000000000"

If user wants to set layer's sub attribute value of 'ClearCoat'. They should use index in attribueName paramter: 'Layers-0-ReflectionColour-ColourOffset' attribueValue parameter will return the string for the value of 'ReflectionColour-ColourOffset' in 'ClearCoat': "1.000000000000000,0.000000000000000,0.000000000000000"

The changed_attrib parameter will return all the attributs names effected by current modification. then user could use this to figure out what should to requery.

If user use 'Base-Base Type' to change base type to 'Metal'. Then all the attribute name in 'Base' will be listed in changed_attrib. Because the interface type change will cause the sub attributes been changed either.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
attribueNameattribuename
attribueValueattribuevalue
changedAttribchanged attrib
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetComponentParameterValue ( const char *  attribueName,
const char *  attribueValue,
std::vector< NXString > &  changedAttrib 
)

Sets attribute value for specific fomatted attribute name The string attribute name format should be : "layer name-interface name-attribute name".

Let material ''Varnished Cherry' for example:

If user wants to set 'Base' component's value of 'Base-Colour-Colour'. They should input 'Base-Colour-Colour' as attribueName paramter. attribueValue parameter will return the string for the value of 'Base-Colour-Colour': "0.000000000000000,1.000000000000000,1.000000000000000"

If user wants to set layer's sub attribute value of 'ClearCoat'. They should use index in attribueName paramter: 'Layers-0-ReflectionColour-ColourOffset' attribueValue parameter will return the string for the value of 'ReflectionColour-ColourOffset' in 'ClearCoat': "1.000000000000000,0.000000000000000,0.000000000000000"

The changed_attrib parameter will return all the attributs names effected by current modification. then user could use this to figure out what should to requery.

If user use 'Base-Base Type' to change base type to 'Metal'. Then all the attribute name in 'Base' will be listed in changed_attrib. Because the interface type change will cause the sub attributes been changed either.

NOTE:User use 'model2_'Varnished Cherry_Layer_198' as paramter name to get and set attribute can ONLY in same session. User should NOT use name like 'ClearCoat' or 'model2_'Varnished Cherry_Layer_198' as name parameter. Instead they should use index as name. The index value of each Layers is same as name position in unique_name_list. This is because the unique name for each layers would change between each session.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
attribueNameattribuename
attribueValueattribuevalue
changedAttribchanged attrib
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetMaterialName ( const NXString materialName)

Sets the current material name of material editor builder.

NOTE: the returned materialName should be freed via TEXT_free by caller.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
materialNamematerialname
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetMaterialName ( const char *  materialName)

Sets the current material name of material editor builder.

NOTE: the returned materialName should be freed via TEXT_free by caller.


Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
materialNamematerialname
void NXOpen::Display::IrayPlusMaterialEditorBuilder::SetPreviewToggle ( bool  toggleOn)

Sets a boolean value that indicate whether the preview toggle is ON.

If preview toggle is true. then the preview image of the material will be generated.
Created in NX11.0.0.

License requirements : studio_render ("UG STUDIO RENDER")

Parameters
toggleOntoggle on

The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.