DIFF

class PPEClassBaseSource

Created once, on manager init. Script-side representation of C++ material class, separate handling.

Constructors 1

void PPEClassBase(string mat_path_override = "")

Members 7

protected PPEManager m_Manager
Referenced by Init(), and OnUpdate()
protected string m_MaterialPath = ""
protected Material m_Material
protected ref map<int, ref array<int>> m_ParameterUpdateQueueMap
protected ref array<int> m_ParameterRemovalQueue

Methods 29

protected void Init(string mat_path_override = "")
Referenced by PPEClassBase()
protected void CreateMaterial()
Material GetMaterial()
References m_Material
protected void CreateDataStructure()
Referenced by PPEClassBase()
protected void RegisterMaterialParameters()

inserted into associative array by parameter int value, parameter registration order does not matter (still ordered, though)

Referenced by PPEClassBase()
protected void RegisterParameterScalarFloatEx(int idx, string parameter_name, float default_value, float min, float max, typename type)

WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...

protected void RegisterParameterColor(int idx, string parameter_name, float r, float g, float b, float a)

WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...

protected void RegisterParameterColorEx(int idx, string parameter_name, float r, float g, float b, float a, typename type)

WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...

protected void RegisterParameterTexture(int idx, string parameter_name, string default_path)
protected void RegisterParameterResource(int idx, string parameter_name, string default_path)
void RemoveRequest(int req_idx)

unused, see 'RemoveActiveRequestFromMaterials' for more info

void OnUpdate(float timeslice, int order)

generic update method, take care when overriding!

void SetFinalParameterValue(int parameter_idx)

Clamps the values being set to defaults, if there is no request setting non-zero values on the parameter

Referenced by ApplyValueChanges()
void ApplyValueChanges()
protected void InsertUpdatedParameter(int mat_id)
Referenced by OnUpdate()
void ParamUpdateRemove(int parameter_idx)

Queue selected parameter for removal from the update queue

void SetParameterUpdating(int order, int parameter_id)

Queue specific parameter of this material to update

References map.Contains(), Find(), map.Get()
Show 3 more, Insert(), map.Set(), and m_ParameterUpdateQueueMap
protected void ParamUpdateQueueCleanup(int order)
References Clear(), Count(), array.Find()
Show 4 more, map.Get(), Get(), m_ParameterRemovalQueue, and m_ParameterUpdateQueueMap
Referenced by OnUpdate()
string GetDefaultMaterialPath()

override this if you want to use different path by default; '.emat' is appended automatically

Referenced by Init()
void ChangeMaterialPathUsed(string path)
string GetCurrentMaterialPath()
References m_MaterialPath
void DbgPrnt(string text)