![]() |
PipelineChanger 1.0.0
by Black Rose Projects
|
Use it as public API for advanced material converting.
Public Member Functions | |
void | RegisterConverter () |
void | RegisterShaderPair (Shader sourceShader, Shader targetShader) |
CustomConverter () | |
CustomConverter (Shader sourceShader, Shader targetShader, MaterialFinalizer finalizer=null) | |
CustomConverter (string sourceShader, string targetShader, MaterialFinalizer finalizer=null) | |
void | RegisterData (ConversionData data) |
void | RegisterData (Shader sourceShader, Shader targetShader) |
void | RegisterData (string sourceShader, string targetShader) |
![]() | |
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 ConversionData | GetMappedData (Shader sourceShader, Shader targetShader) |
static ConversionData | GetMappedData (string sourceShader, string targetShader) |
static void | ProcessCustomConverions (List< Material > Mats, List< CustomConverter > converters, UpgradeFlags flags=UpgradeFlags.CleanupNonUpgradedProperties) |
static void | ProcessCustomConverions (Material[] Mats, List< CustomConverter > converters, UpgradeFlags flags=UpgradeFlags.CleanupNonUpgradedProperties) |
![]() | |
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) |
Additional Inherited Members | |
![]() | |
enum | UpgradeFlags { None = 0 , CleanupNonUpgradedProperties = 2 } |
CustomConverter | ( | ) |
Used in automation process, user dont need to call it or inherit from it.
CustomConverter | ( | Shader | sourceShader, |
Shader | targetShader, | ||
MaterialFinalizer | finalizer = null ) |
Use this constructor if you need to create basic shader conversion 1:1 via code only.
sourceShader | Shader on material that will be converted to other. Use Shader.Find(string) or pass cashed Shader |
targetShader | Shaderthat should be on material after convertion Use Shader.Find(string) or pass cashed Shader |
finalizer | Optional - MaterialFinalizer(Material) delegate for additional stuff to do after mapped variable convertion |
CustomConverter | ( | string | sourceShader, |
string | targetShader, | ||
MaterialFinalizer | finalizer = null ) |
Use this constructor if you need to create basic shader conversion 1:1 via code only.
sourceShader | Name of Shader on material that will be converted to other. Require full shader name |
targetShader | Name of Shader that should be on material after convertion Require full shader name |
finalizer | Optional - MaterialFinalizer(Material) delegate for additional stuff to do after mapped variable convertion |
|
static |
Get Custom shader converting data from ShaderPairingTool database if was prepared before.
sourceShader | Source Shader that was used in ShaderPairingTool |
targetShader | Targeted Shader that was used in ShaderPairingTool |
|
static |
Get Custom shader converting data from ShaderPairingTool database if was prepared before.
sourceShader | Full name of source Shader that was used in ShaderPairingTool |
targetShader | Full name of targeted Shader that was used in ShaderPairingTool |
|
static |
Process a custom conversion on materials with given converters.
Mats | List of Material that will be converted |
converters | List of converters to use in that convertion. Create your own list of custom converters |
flags | Flags for convertons. |
|
static |
Process a custom conversion on materials with given converters.
Mats | Array of Material that will be converted |
converters | List of converters to use in that convertion |
flags | Flags for convertons |
|
abstract |
Call RegisterShaderPair(Shader, Shader) here if you need to convert shader mapped data from ShaderPairingTool between two shaders.
Leave empty if you dont need to use ShaderPairingTool.
void RegisterData | ( | ConversionData | data | ) |
Register paired data from ShaderParingTool in this converter.
Call it if you need to get data from ShaderParingTool and do conversion via own code.
data | Data returned by GetMappedData(Shader, Shader) |
void RegisterData | ( | Shader | sourceShader, |
Shader | targetShader ) |
Register paired data from ShaderParingTool in this converter.
Call it if you need to get data from ShaderParingTool and do conversion via own code.
sourceShader | Source Shader that was used in ShaderPairingTool |
targetShader | Targeted Shader that was used in ShaderPairingTool |
void RegisterData | ( | string | sourceShader, |
string | targetShader ) |
Register paired data from ShaderParingTool in this converter.
Call it if you need to get data from ShaderParingTool and do conversion via own code.
sourceShader | Full name of source Shader that was used in ShaderPairingTool |
targetShader | Full name of targeted Shader that was used in ShaderPairingTool |
void RegisterShaderPair | ( | Shader | sourceShader, |
Shader | targetShader ) |
Call this in RegisterConverter method. This will enable autoregister function for convertions system.
ShaderPairingTool conversion data will be automaticly used after calling custom conversion from tools Menu.
sourceShader | Shader on material that will be converted to other. Use Shader.Find(string) or pass cashed Shader |
targetShader | Shader that should be on material after convertion Use Shader.Find(string) or pass cashed Shader |