![]() |
PipelineChanger 1.0.0
by Black Rose Projects
|
Base class of converters
Inherit from CustomConverter instead of this if you need to create your own converter.
Public Types | |
enum | UpgradeFlags { None = 0 , CleanupNonUpgradedProperties = 2 } |
Public Member Functions | |
delegate void | MaterialFinalizer (Material mat) |
virtual void | Convert (Material originalMaterial, Material copyMaterial) |
void | RenameShader (Shader oldShader, Shader newShader, MaterialFinalizer finalizer=null) |
void | SetFinalizer (MaterialFinalizer finalizer) |
void | RenameShader (string oldShaderName, string newShaderName, MaterialFinalizer finalizer=null) |
void | RenameTexture (int source, params int[] target) |
void | RenameTexture (string source, string target) |
void | RenameFloat (int source, params int[] target) |
void | RenameFloat (string source, string target) |
void | RenameColor (int source, params int[] target) |
void | RenameColor (string source, string target) |
void | RemoveTexture (int source) |
void | RemoveTexture (string source) |
void | SetFloat (int property, float value) |
void | SetFloat (string property, float value) |
void | SetColor (int property, Color value) |
void | SetColor (string property, Color value) |
void | SetTexture (int property, Texture value) |
void | SetTexture (string property, Texture value) |
void | RenameInt (int source, params int[] target) |
void | RenameInt (string source, int value) |
void | RenameVector (int source, params int[] target) |
void | RenameVector (string source, string target) |
void | RenameRange (int source, params int[] target) |
void | RenameRange (string source, string target) |
void | RenameKeywordToFloat (string oldName, string newName, float setVal, float unsetVal) |
void | EnableKeyworld (string keyworld) |
Static Public Member Functions | |
static void | ProcessConvertion (Material material, MaterialConverter upgrader, UpgradeFlags flags=UpgradeFlags.CleanupNonUpgradedProperties) |
static void | ProcessConvertion (Material material, List< MaterialConverter > upgraders, UpgradeFlags flags) |
static void | ProcessConvertion (Material material, List< CustomConverter > upgraders, UpgradeFlags flags) |
enum UpgradeFlags |
|
virtual |
Convert Material with using temporary material to store value with convertion rules
Used by ProcessMaterial(Material, UpgradeFlags)
originalMaterial | Material currently during conversion process |
copyMaterial | temporary Material to store variables values |
void EnableKeyworld | ( | string | keyworld | ) |
Enable given Keyworld in material.
keyworld | Keyworld to enable |
delegate void MaterialFinalizer | ( | Material | mat | ) |
Material Upgrader finalizer delegate.
mat | Material |
|
static |
Convert material with Converter to other shader, with collection of converters.
Automatic detection which converterr shoud be used from Converter collection.
material | Material that will be converted |
upgraders | Collection of Converters |
flags | Special Upgrading flags |
|
static |
Convert material with Converter to other shader, with collection of converters.
Automatic detection which converterr shoud be used from Converter collection.
material | Material that will be converted |
upgraders | Collection of Converters |
flags | Special Upgrading flags |
|
static |
Convert material with Converter to other shader.
material | Material that will be converted |
upgrader | Upgrader with specific convertion instructions |
flags | Special Upgrading flags |
void RemoveTexture | ( | int | source | ) |
Add Texture to remove from material during conversion
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of targeted Texture property |
void RemoveTexture | ( | string | source | ) |
Better to use non-string version.
Add Texture to remove from material during conversion
source | name of targeted Texture property |
void RenameColor | ( | int | source, |
params int[] | target ) |
Map Color property to other Color property
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of original Color property |
target | Shader.PropertyToID of targeted Color property or array of them |
void RenameColor | ( | string | source, |
string | target ) |
Better to use non-string version.
Map Color property to other Color property.
source | name of Color property to map |
target | name of Color property to transfer |
void RenameFloat | ( | int | source, |
params int[] | target ) |
Map float property to other float property
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of original float property |
target | Shader.PropertyToID of targeted float property or array of them |
void RenameFloat | ( | string | source, |
string | target ) |
Better to use non-string version.
Map float property to other float property.
source | name of float property to map |
target | name of float property to transfer |
void RenameInt | ( | int | source, |
params int[] | target ) |
Map int property to other int property
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of original int property |
target | Shader.PropertyToID of targeted int property or array of them |
void RenameInt | ( | string | source, |
int | value ) |
Better to use non-string version.
Map int property to other int property
source | name of targeted int property |
value | int value of property to set during convertion |
void RenameKeywordToFloat | ( | string | oldName, |
string | newName, | ||
float | setVal, | ||
float | unsetVal ) |
Renaming float-keyworld property.
oldName | |
newName | |
setVal | |
unsetVal |
void RenameRange | ( | int | source, |
params int[] | target ) |
Map Range property to other range property
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of original property |
target | Shader.PropertyToID of targeted property |
void RenameRange | ( | string | source, |
string | target ) |
Better to use non-string version.
Map Range property to other range property
source | name of original property |
target | name of targeted property |
void RenameShader | ( | Shader | oldShader, |
Shader | newShader, | ||
MaterialFinalizer | finalizer = null ) |
Most important method for converter. Map Shader together for convertion.
Suggested to use in constructor.
oldShader | Shader that will be converted |
newShader | Convertion targer |
finalizer | Optional - MaterialFinalizer(Material) delegate for additional stuff to do after mapped variable convertion |
void RenameShader | ( | string | oldShaderName, |
string | newShaderName, | ||
MaterialFinalizer | finalizer = null ) |
Better to use non-string version.
Most important method for converter. Map Shader together for convertion.
Suggested to use in constructor.
oldShaderName | Shader that will be converted |
newShaderName | Convertion targer |
finalizer | Optional - MaterialFinalizer(Material) delegate for additional stuff to do after mapped variable convertion |
void RenameTexture | ( | int | source, |
params int[] | target ) |
Map Texture to other Texture property.
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of original Texture property |
target | Shader.PropertyToID of targeted Texture property or array of them |
void RenameTexture | ( | string | source, |
string | target ) |
Better to use non-string version.
Map Texture property to other Texture property.
source | name of Texture property to map |
target | name of Texture property to transfer |
void RenameVector | ( | int | source, |
params int[] | target ) |
Map Vector4 property to other Vector4 property
Use Shader.PropertyToID to get int ID of property.
source | Shader.PropertyToID of original Vector4 property |
target | Shader.PropertyToID of targeted Vector4 property or array of them |
void RenameVector | ( | string | source, |
string | target ) |
Better to use non-string version.
Map Vector4 property to other Vector4 property
source | name of targeted Vector4 property |
target | Vector4 value of property to set during convertion |
void SetColor | ( | int | property, |
Color | value ) |
Set Color property to specific value
Use Shader.PropertyToID to get int ID of property.
property | Shader.PropertyToID of property |
value | Color value of property to set during convertion |
void SetColor | ( | string | property, |
Color | value ) |
Better to use non-string version.
Set Color property to specific value.
property | name of targeted Color property |
value | Color value of property to set during convertion |
void SetFinalizer | ( | MaterialFinalizer | finalizer | ) |
Set finalizer to given method.
finalizer |
void SetFloat | ( | int | property, |
float | value ) |
Set float property to specific value
Use Shader.PropertyToID to get int ID of property.
property | Shader.PropertyToID of property |
value | float value of property to set during convertion |
void SetFloat | ( | string | property, |
float | value ) |
Better to use non-string version.
Set float property to specific value.
property | name of targeted float property |
value | float value of property to set during convertion |
void SetTexture | ( | int | property, |
Texture | value ) |
Set Texture property to specific value Use Shader.PropertyToID to get int ID of property.
property | Shader.PropertyToID of property |
value | Texture value of property to set during convertion |
void SetTexture | ( | string | property, |
Texture | value ) |
Better to use non-string version.
Set Texture property to specific value.
property | name of targeted Texture property |
value | Texture value of property to set during convertion |