Legacy:MaterialFactory: Difference between revisions
From Unreal Wiki, The Unreal Engine Documentation Site
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{classbox| [[Legacy:UT2003|UT2003]] :: [[Legacy:Object|Object]] >> | {{classbox| [[Legacy:UT2003|UT2003]] :: [[Legacy:Object|Object]] >> MaterialFactory (Package: Editor)}} | ||
Abstract base class for material factories. Subclasses of this class are used in UnrealEd 3 to create non-[[Legacy:Texture|Texture]] [[Legacy:Material|Material]]s. Non-abstract subclasses of this class are displayed in the Class drop-down list of UnrealEd's '''New Material''' dialog window ([[Legacy:Texture Browser Menu|Texture Browser Menu]] File -> New...) | |||
==Properties== | ==Properties== | ||
; string Description : | ; string Description : A description of the type of material created by this material factory. This description | ||
== | ==Methods== | ||
; | ; ConsoleCommand(string Cmd) [native] : Similar to the ConsoleCommand() functions in the [[Legacy:Actor|Actor]] and [[Legacy:Interaction|Interaction]] classes, but doesn't return anything. | ||
; [[Legacy:Material|Material]] CreateMaterial([[Legacy:Object|Object]] InOuter, string InPackage, string InGroup, string InName) : Called by the editor engine when the user presses the '''New''' button in the '''New Material''' dialog window. This function should be overridden to somehow create a new [[Legacy:Material|Material]] object in the package ''InPackage'', group ''InGroup'', with the name ''InName'' according to the parameters in the selected subclass. See [[Legacy:RawMaterialFactory|RawMaterialFactory]] and [[Legacy:FractalTextureFactory|FractalTextureFactory]] for two examples, how this may work. ''InOuter'' is a reference to the package or group (actually a package contained in another package) object the new material should be created in. UnrealEd automatically opens the properties window for the material returned by this function. | |||
; Material CreateMaterial(Object InOuter, string InPackage, string InGroup, string InName ): | |||
==Known Subclasses== | |||
* [[Legacy:RawMaterialFactory|RawMaterialFactory]] | |||
* [[Legacy:FractalTextureFactory|FractalTextureFactory]] | |||
[[Category:Legacy Class (UT2003)|{{PAGENAME}}]] | |||
[[Category:Legacy Class (UT2004)|{{PAGENAME}}]] |
Latest revision as of 13:58, 24 June 2006
Abstract base class for material factories. Subclasses of this class are used in UnrealEd 3 to create non-Texture Materials. Non-abstract subclasses of this class are displayed in the Class drop-down list of UnrealEd's New Material dialog window (Texture Browser Menu File -> New...)
Properties
- string Description
- A description of the type of material created by this material factory. This description
Methods
- ConsoleCommand(string Cmd) [native]
- Similar to the ConsoleCommand() functions in the Actor and Interaction classes, but doesn't return anything.
- Material CreateMaterial(Object InOuter, string InPackage, string InGroup, string InName)
- Called by the editor engine when the user presses the New button in the New Material dialog window. This function should be overridden to somehow create a new Material object in the package InPackage, group InGroup, with the name InName according to the parameters in the selected subclass. See RawMaterialFactory and FractalTextureFactory for two examples, how this may work. InOuter is a reference to the package or group (actually a package contained in another package) object the new material should be created in. UnrealEd automatically opens the properties window for the material returned by this function.