16 Init(mat_path_override);
22 protected void Init(
string mat_path_override =
"")
24 if (mat_path_override !=
"")
63 parameter_data.RegisterDefaults(p);
72 parameter_data.RegisterDefaults(p);
82 parameter_data.RegisterDefaults(p);
92 bool boo =
Class.
CastTo(parameter_data,type.Spawn());
94 parameter_data.RegisterDefaults(p);
96 parameter_data.SetParameterIndex(idx);
97 parameter_data.SetParent(
this);
106 parameter_data.RegisterDefaults(p);
115 bool boo =
Class.
CastTo(parameter_data,type.Spawn());
117 parameter_data.RegisterDefaults(p);
119 parameter_data.SetParameterIndex(idx);
120 parameter_data.SetParent(
this);
127 PPEMatClassParameterVector parameter_data =
new PPEMatClassParameterVector(
GetPostProcessEffectID(),idx,
this);
128 parameter_data.RegisterDefaults(p);
136 PPEMatClassParameterTexture parameter_data =
new PPEMatClassParameterTexture(
GetPostProcessEffectID(),idx,
this);
137 parameter_data.RegisterDefaults(p);
144 PPEMatClassParameterResource parameter_data =
new PPEMatClassParameterResource(
GetPostProcessEffectID(),idx,
this);
145 parameter_data.RegisterDefaults(p);
203 int parameter_idx = -1;
213 bool setting_defaults =
false;
235 case PPEConstants.VAR_TYPE_BOOL:
236 bool value_var_bool = Param1<bool>.Cast(values).param1;
238 m_Material.SetParamByIndex(parameter_idx,value_var_bool);
242 case PPEConstants.VAR_TYPE_INT:
243 int value_var_int = Param1<int>.Cast(values).param1;
245 m_Material.SetParamByIndex(parameter_idx,value_var_int);
249 case PPEConstants.VAR_TYPE_FLOAT:
250 float value_var_float = Param1<float>.Cast(values).param1;
252 m_Material.SetParamByIndex(parameter_idx,value_var_float);
256 case PPEConstants.VAR_TYPE_COLOR:
257 float color[4] = {0,0,0,0};
258 color[0] = Param4<float,float,float,float>.Cast(values).param1;
259 color[1] = Param4<float,float,float,float>.Cast(values).param2;
260 color[2] = Param4<float,float,float,float>.Cast(values).param3;
261 color[3] = Param4<float,float,float,float>.Cast(values).param4;
263 m_Material.SetParamByIndex(parameter_idx,color);
Param5< string, float, float, float, float > PPETemplateDefColor
Param4< string, int, int, int > PPETemplateDefInt
Param4< string, float, float, float > PPETemplateDefFloat
Param2 PPETemplateDefBool
Param2< string, string > PPETemplateDefTexture
Param2< string, string > PPETemplateDefResource
Param2< string, ref array< float > > PPETemplateDefVector
void PPEMatClassParameterColor(int mat_idx, int parameter_idx, PPEClassBase parent)
void PPEMatClassParameterFloat(int mat_idx, int parameter_idx, PPEClassBase parent)
proto native World GetWorld()
Super root of all classes in Enforce script.
void ChangeMaterialPathUsed(string path)
ref map< int, ref array< int > > m_ParameterUpdateQueueMap
void InsertParamValueData(PPERequestParamDataBase request_data)
Distributes requester data to the material class structure and links them to appropriate parameter.
void RegisterParameterScalarFloat(int idx, string parameter_name, float default_value, float min, float max)
WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values ...
void RegisterParameterVector(int idx, string parameter_name, array< float > default_values)
void DbgPrnt(string text)
string GetDefaultMaterialPath()
override this if you want to use different path by default; '.emat' is appended automatically
ref map< int, ref PPEMatClassParameterCommandData > m_MaterialParamMapStructure
void Init(string mat_path_override="")
void SetFinalParameterValue(int parameter_idx)
Clamps the values being set to defaults, if there is no request setting non-zero values on the parame...
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 ...
void RegisterParameterScalarInt(int idx, string parameter_name, int default_value, int min, int max)
void RegisterParameterScalarBool(int idx, string parameter_name, bool default_value)
void ParamUpdateQueueCleanup(int order)
void RegisterParameterResource(int idx, string parameter_name, string default_path)
ref array< int > m_ParameterRemovalQueue
void RemoveRequest(int req_idx)
unused, see 'RemoveActiveRequestFromMaterials' for more info
void InsertUpdatedParameter(int mat_id)
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 ...
void RegisterMaterialParameters()
inserted into associative array by parameter int value, parameter registration order does not matter ...
string GetCurrentMaterialPath()
void OnUpdate(float timeslice, int order)
generic update method, take care when overriding!
void SetParameterUpdating(int order, int parameter_id)
Queue specific parameter of this material to update.
void CreateDataStructure()
void RegisterParameterTexture(int idx, string parameter_name, string default_path)
int GetPostProcessEffectID()
Overriden in all material classes!
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 ...
void ParamUpdateRemove(int parameter_idx)
Queue selected parameter for removal from the update queue.
PPEMatClassParameterCommandData GetParameterCommandData(int parameter_idx)
Some PP effects are handled as hard-coded exceptions, outside of material system. Default == PPEExcep...
ref array< int > m_UpdatedParameters
void PPEClassBase(string mat_path_override="")
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Static component of PPE manager, used to hold the instance.
override int GetParameterVarType()
Param GetCurrentValues()
Careful, only actual values, WITHOUT string.
void InsertRequestData(PPERequestParamDataBase request_data)
void SetDataActive(bool state)
void SetUpdatingDataValues(bool state)
Data for one material parameter, requester side.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto native Material GetMaterial(string materialName)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
PostProcessEffectType
Post-process effect type.
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.