Logo
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
Yukar.Common.Resource.Material Class Reference

A class that manages material settings for material resources More...

Inheritance diagram for Yukar.Common.Resource.Material:
Yukar.Common.Resource.ResourceItem Yukar.Common.Rom.RomItem Yukar.Common.Rom.IChunk

Public Member Functions

 Material ()
 
 Material (SharpKmyGfx.Material material)
 
override void onCatalogCleanup ()
 
void updateText ()
 
void setText (string txt)
 
SharpKmyGfx.Material getMaterial ()
 
override void load (System.IO.BinaryReader reader)
 
void invalidateReferencingModelThumbnail ()
 
void postLoad ()
 
override void initializeKmyGfx ()
 
override void save (System.IO.BinaryWriter writer)
 
override void saveUsedGUID (BinaryWriter writer, bool inIncludeChildUseRomGUID)
 Export the GUID you are using (for tools) More...
 
List< Guid > getTextureIds (bool inIsRaw=false, bool inRemoveEmpty=true)
 Get the Id of the texture you are using More...
 
override bool initializingAfterLoading ()
 
override void ChangeId (Dictionary< Guid, Rom.RomItem > inChangeIdDic)
 
override List< Guid > GetUsedResourceIdList ()
 
override void onNameChanged ()
 
void NormalizeTexture ()
 Remove non-existing textures More...
 
string getShaderDescription ()
 
bool getSlotName (int index, ref SharpKmyGfx.UNIFORMPARAMTYPE ptype, ref bool hideInEdtior, out string name, out string localName)
 
string getDescription (string name)
 
- Public Member Functions inherited from Yukar.Common.Resource.ResourceItem
override bool initializingAfterLoading ()
 
virtual void initializeKmyGfx ()
 
override void save (System.IO.BinaryWriter writer)
 
override void load (System.IO.BinaryReader reader)
 
virtual void setPath (string path)
 
virtual void CopySourceResourceFile (string inSrcPath, string inDstPath=null, bool inIsOverwrite=false, bool inIsExistFileRename=false)
 
void CopyOutsideResourceFile (bool inIsOverwrite=false, bool inIsExistFileRename=false)
 
bool deleteResourceFile (Dictionary< string, int > inUsedFilePathCountDic, bool inIsAutoDeleteFile)
 
virtual List< string > getRelatedFiles ()
 
virtual List< string > getInternalFormatFilePath ()
 
virtual ErrorType verify ()
 
bool IsError (bool inCheckDispOnly=true)
 
bool isSystemResource ()
 
bool isDLCResource ()
 
void setToModified ()
 
virtual string[] getPathList ()
 
string getExtension ()
 
virtual void ChangeReImportPath ()
 
virtual List< Guid > GetUsedResourceIdList ()
 
override void ChangeId (Dictionary< Guid, Rom.RomItem > inChangeIdDic)
 
void ClearResourceHolderCache ()
 
virtual void reload ()
 
bool isExistNewerTimeStamp ()
 
virtual void renamePath (string inNewPath)
 
virtual void setNativeResourcePath (string inFolderPath)
 set full path of native resource for system project y More...
 
- Public Member Functions inherited from Yukar.Common.Rom.RomItem
string getCategory (string locale=null)
 
 RomItem ()
 
System.Drawing.Bitmap getThumbnail (THUMBNAILMAKERNOTIFY notify, out bool setNotify)
 
System.Drawing.Bitmap getThumbnail (THUMBNAILMAKERNOTIFY notify)
 
System.Drawing.Bitmap getThumbnail ()
 
void invalidateThumbnail ()
 
void invalidateThumbnail (THUMBNAILMAKERNOTIFY notify)
 
void forceInvalidateThumbnail (THUMBNAILMAKERNOTIFY notify)
 
virtual void save (BinaryWriter writer)
 
virtual void load (BinaryReader reader)
 
virtual void saveUsedGUID (BinaryWriter writer, bool inIncludeChildUseRomGUID)
 Export the GUID you are using (for tools) More...
 
void saveUsedGUID (BinaryWriter writer)
 Export the GUID you are using (for tools) More...
 
virtual bool initializingAfterLoading ()
 
virtual void reImport ()
 
virtual void export (string path)
 
virtual void onCatalogCleanup ()
 
virtual void onNameChanged ()
 
void copyFrom (Common.Rom.RomItem src)
 
virtual void CheckRecourceConsistency (Catalog inCatalog)
 
virtual void ChangeId (Dictionary< Guid, Rom.RomItem > inChangeIdDic)
 Replace the Id you are using with the corresponding Rom Id More...
 
void ClearId (List< Rom.RomItem > inClearRomItemList)
 Removed rom usage in list More...
 
void Dispose ()
 
void AddUpdatecall (int count)
 
void save (BinaryWriter writer)
 
void load (BinaryReader reader)
 

Static Public Member Functions

static List< Guid > getTextureIds (SharpKmyGfx.Material inMaterial, bool inIsRaw=false, bool inRemoveEmpty=true)
 Get the Id of the texture used in the material More...
 
static void saveUsedGUID (BinaryWriter writer, SharpKmyGfx.Material mtl)
 
- Static Public Member Functions inherited from Yukar.Common.Resource.ResourceItem
static string makeCreateFilePath (Type inType, string inSrcPath, bool inIsOverWrite)
 Creating a file path to copy resource files to More...
 
- Static Public Member Functions inherited from Yukar.Common.Rom.RomItem
static void writeChunk (System.IO.BinaryWriter writer, IChunk rom)
 
static void readChunk (System.IO.BinaryReader reader, IChunk rom)
 
static void skipChunk (System.IO.BinaryReader reader)
 
static T Clone< T > (RomItem inSrc)
 
static bool equalChunk (IChunk a, IChunk b)
 
static IChunk duplicate (IChunk rom)
 

Public Attributes

string m_image = ""
 
string m_modelMaterialName = ""
 
int version = nowVersion
 
- Public Attributes inherited from Yukar.Common.Resource.ResourceItem
Guid dlcGuid = Guid.Empty
 
string relatedPath = ""
 
string path = ".\\"
 
Option option = new Option()
 
ResourceSource source = ResourceSource.RES_USER
 
- Public Attributes inherited from Yukar.Common.Rom.RomItem
Guid guId
 
String name
 
string tags = ""
 
string category = ""
 

Static Public Attributes

static Guid CollisionId = new Guid("99276bc3-70b4-4bd9-8327-a70bad256da4")
 
- Static Public Attributes inherited from Yukar.Common.Resource.ResourceItem
static ResourceSource sCurrentSourceMode
 
static bool sReferenceLoad = false
 
static bool sClipboardLoad = false
 
const string TAG_3D = "#3D"
 
const string TAG_2D = "#2D"
 
static Guid sCurrentSourceGuid
 
- Static Public Attributes inherited from Yukar.Common.Rom.RomItem
static int thumbnailWidth = 128
 
static int thumbnailHeight = 128
 
const char CATEGORY_SPLITTER = '\\'
 
static CREATETHUMBNAIL createThumbnailFunction = null
 
const int UnknownRefCount = -2000
 

Protected Member Functions

override bool IsErrorImp (bool inCheckDispOnly)
 
override void Dispose (bool disposing)
 
- Protected Member Functions inherited from Yukar.Common.Resource.ResourceItem
virtual bool IsErrorImp (bool inCheckDispOnly)
 
string checkReImportPath (string importPath, string filter, bool changeReImportPath)
 
virtual List< ResourceHolderGetResourceHolderList ()
 
void updateSetuppedThumbnail ()
 
virtual void afterRenamePath (string inNewPath)
 
virtual void Dispose (bool disposing)
 

Properties

Catalog Catalog [get, set]
 
- Properties inherited from Yukar.Common.Resource.ResourceItem
string SourcePath [get]
 
virtual string ImportPath [get, set]
 
virtual string SourceFileName [get]
 
string SourceFolderName [get]
 
int StampType [get, set]
 
bool ForceExport [get, set]
 
virtual bool ConvertableToInternalFormat [get]
 
string resourcePath [get, set]
 
- Properties inherited from Yukar.Common.Rom.RomItem
System.Drawing.Bitmap Thumbnail [get]
 
ThumbnailStatusType ThumbnailStatus = ThumbnailStatusType.Empty [get, set]
 
string Name [get, set]
 
virtual int RefCount [get]
 
virtual bool UseRefCount [get]
 
Folder Parent [get, set]
 

Additional Inherited Members

- Public Types inherited from Yukar.Common.Rom.RomItem
enum  ThumbnailStatusType { Empty = 0 , Creating , Created , Failed }
 Thumbnail image generation status More...
 

Detailed Description

A class that manages material settings for material resources

Constructor & Destructor Documentation

◆ Material() [1/2]

Yukar.Common.Resource.Material.Material ( )

◆ Material() [2/2]

Yukar.Common.Resource.Material.Material ( SharpKmyGfx.Material  material)

Member Function Documentation

◆ ChangeId()

override void Yukar.Common.Resource.Material.ChangeId ( Dictionary< Guid, Rom.RomItem >  inChangeIdDic)

◆ Dispose()

override void Yukar.Common.Resource.Material.Dispose ( bool  disposing)
protectedvirtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ getDescription()

string Yukar.Common.Resource.Material.getDescription ( string  name)

◆ getMaterial()

SharpKmyGfx.Material Yukar.Common.Resource.Material.getMaterial ( )

◆ getShaderDescription()

string Yukar.Common.Resource.Material.getShaderDescription ( )

◆ getSlotName()

bool Yukar.Common.Resource.Material.getSlotName ( int  index,
ref SharpKmyGfx.UNIFORMPARAMTYPE  ptype,
ref bool  hideInEdtior,
out string  name,
out string  localName 
)

◆ getTextureIds() [1/2]

List< Guid > Yukar.Common.Resource.Material.getTextureIds ( bool  inIsRaw = false,
bool  inRemoveEmpty = true 
)

Get the Id of the texture you are using

Parameters
inIsRawDo not delete even if there is the same Id
inRemoveEmptyremove empty texture
Returns
texture id list

◆ getTextureIds() [2/2]

static List< Guid > Yukar.Common.Resource.Material.getTextureIds ( SharpKmyGfx.Material  inMaterial,
bool  inIsRaw = false,
bool  inRemoveEmpty = true 
)
static

Get the Id of the texture used in the material

Parameters
inMaterialmaterial
inIsRawDo not delete even if there is the same Id
inRemoveEmptyremove empty texture
Returns
texture id list

◆ GetUsedResourceIdList()

override List< Guid > Yukar.Common.Resource.Material.GetUsedResourceIdList ( )
virtual

◆ initializeKmyGfx()

override void Yukar.Common.Resource.Material.initializeKmyGfx ( )
virtual

◆ initializingAfterLoading()

override bool Yukar.Common.Resource.Material.initializingAfterLoading ( )
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ invalidateReferencingModelThumbnail()

void Yukar.Common.Resource.Material.invalidateReferencingModelThumbnail ( )

◆ IsErrorImp()

override bool Yukar.Common.Resource.Material.IsErrorImp ( bool  inCheckDispOnly)
protectedvirtual

◆ load()

override void Yukar.Common.Resource.Material.load ( System.IO.BinaryReader  reader)

◆ NormalizeTexture()

void Yukar.Common.Resource.Material.NormalizeTexture ( )

Remove non-existing textures

◆ onCatalogCleanup()

override void Yukar.Common.Resource.Material.onCatalogCleanup ( )
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ onNameChanged()

override void Yukar.Common.Resource.Material.onNameChanged ( )
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ postLoad()

void Yukar.Common.Resource.Material.postLoad ( )

◆ save()

override void Yukar.Common.Resource.Material.save ( System.IO.BinaryWriter  writer)

◆ saveUsedGUID() [1/2]

override void Yukar.Common.Resource.Material.saveUsedGUID ( BinaryWriter  writer,
bool  inIncludeChildUseRomGUID 
)
virtual

Export the GUID you are using (for tools)

Parameters
writerWriter
inIncludeChildUseRomGUIDDoes it also include the roms used by the roms used?

Reimplemented from Yukar.Common.Rom.RomItem.

◆ saveUsedGUID() [2/2]

static void Yukar.Common.Resource.Material.saveUsedGUID ( BinaryWriter  writer,
SharpKmyGfx.Material  mtl 
)
static

◆ setText()

void Yukar.Common.Resource.Material.setText ( string  txt)

◆ updateText()

void Yukar.Common.Resource.Material.updateText ( )

Member Data Documentation

◆ CollisionId

Guid Yukar.Common.Resource.Material.CollisionId = new Guid("99276bc3-70b4-4bd9-8327-a70bad256da4")
static

◆ m_image

string Yukar.Common.Resource.Material.m_image = ""

◆ m_modelMaterialName

string Yukar.Common.Resource.Material.m_modelMaterialName = ""

◆ version

int Yukar.Common.Resource.Material.version = nowVersion

Property Documentation

◆ Catalog

Catalog Yukar.Common.Resource.Material.Catalog
getset