Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Properties | List of all members
PartMaterialInfo Class Reference

A class that holds information on how a material of a part its supposed to look. It holds the name of the material to target, the shader that its supposed to have, and a list of commands that have to be executed in the material. This commands usually change the texture, color or values of a material. If the name is ommited, the changes will be applied to all materials. More...

Inheritance diagram for PartMaterialInfo:
IConfigNode

Public Member Functions

void ApplyCommands (Material targetMaterial)
 Applies the custom shader commands to a material. If a command is invalid it will just fail and move on. More...
 
void Load (ConfigNode node)
 The name of the target material. More...
 
void Save (ConfigNode node)
 No need to save, this material info wont be stored. More...
 

Properties

Shader CustomShader [get]
 The custom shader the material should have, if its null it will be ommited. More...
 
string MaterialName [get]
 The name of the material this info is targeted to, if its ommited it will be applied to all materials. More...
 

Detailed Description

A class that holds information on how a material of a part its supposed to look. It holds the name of the material to target, the shader that its supposed to have, and a list of commands that have to be executed in the material. This commands usually change the texture, color or values of a material. If the name is ommited, the changes will be applied to all materials.

Member Function Documentation

void PartMaterialInfo.ApplyCommands ( Material  targetMaterial)
inline

Applies the custom shader commands to a material. If a command is invalid it will just fail and move on.

Parameters
targetMaterialThe material that will be used to apply the commands
void PartMaterialInfo.Load ( ConfigNode  node)
inline

The name of the target material.

Loads a TEXTURE node from a part variant There are some key values for the shader, main texture and main color, all the others will be added as custom commands.

Implements IConfigNode.

void PartMaterialInfo.Save ( ConfigNode  node)
inline

No need to save, this material info wont be stored.

Implements IConfigNode.

Property Documentation

Shader PartMaterialInfo.CustomShader
get

The custom shader the material should have, if its null it will be ommited.

string PartMaterialInfo.MaterialName
get

The name of the material this info is targeted to, if its ommited it will be applied to all materials.


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