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

A class that manages model resources More...

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

Public Member Functions

delegate int ERRCHECKER (string path)
 
delegate bool CONVERTER (ref string path, ref string ext, string tmpPath, float scale)
 
 Model ()
 
override void onCatalogCleanup ()
 
void updateMaterialSet ()
 
override void ChangeReImportPath ()
 
override void reImport ()
 
override void reload ()
 
override void export (string dstpath)
 
override void load (BinaryReader reader)
 
override void save (BinaryWriter writer)
 
override void saveUsedGUID (BinaryWriter writer, bool inIncludeChildUseRomGUID)
 Export the GUID you are using (for tools) More...
 
void createInternalUseModel (string path)
 
List< string > loadDefFile (string defFileName)
 
List< string > getTexListFromDef (List< string > defList, bool isRemoveGuid=false)
 
void getTextureAndDef (List< string > outDefList, List< string > outTexList, string workFileName)
 
override bool initializingAfterLoading ()
 
override void initializeKmyGfx ()
 
override void ChangeId (Dictionary< Guid, Rom.RomItem > inChangeIdDic)
 
override void setNativeResourcePath (string inFolderPath)
 set full path of native resource for system project y More...
 
void overwriteImport (string newPath, bool inOptimize, float inScale)
 simple overwrite import More...
 
void overwriteImport (string newPath)
 simple overwrite import More...
 
- 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 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 postImport (string srcpath)
 
virtual void reImport ()
 
virtual void export (string path)
 
virtual void onCatalogCleanup ()
 
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 float getSize (string srcpath)
 Get maximum model size More...
 
static string makeCreatePath (string srcpath, bool overwrite=false)
 Get the path to copy the model file to More...
 
static Model import (string srcpath, string createpath, bool optimize, float scale, bool newTexture)
 
static Model convert (string path, bool genMaterial, Option option)
 
static void convertToResourceAll (Catalog catalog)
 
- 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

MaterialSet m_materialSet = new MaterialSet()
 
SharpKmyGfx.ModelData m_mdl = null
 
bool m_isShield = false
 
SharpKmyMath.Vector3 m_previewOffset = new SharpKmyMath.Vector3()
 
SharpKmyMath.Vector3 m_previewAngle = new SharpKmyMath.Vector3()
 
bool vertexCompressMode = true
 
- 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 int errorHandle = 0
 
static ERRCHECKER errchecker = null
 
static CONVERTER converter = null
 
- 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 List< ResourceHolderGetResourceHolderList ()
 
override void afterRenamePath (string inNewPath)
 
- 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)
 
- Protected Member Functions inherited from Yukar.Common.Rom.RomItem
virtual void Dispose (bool disposing)
 

Properties

override string ImportPath [get, set]
 
bool VertexCompressMode [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]
 
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 model resources

Constructor & Destructor Documentation

◆ Model()

Yukar.Common.Resource.Model.Model ( )

Member Function Documentation

◆ afterRenamePath()

override void Yukar.Common.Resource.Model.afterRenamePath ( string  inNewPath)
protectedvirtual

◆ ChangeId()

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

◆ ChangeReImportPath()

override void Yukar.Common.Resource.Model.ChangeReImportPath ( )
virtual

◆ convert()

static Model Yukar.Common.Resource.Model.convert ( string  path,
bool  genMaterial,
Option  option 
)
static

◆ CONVERTER()

delegate bool Yukar.Common.Resource.Model.CONVERTER ( ref string  path,
ref string  ext,
string  tmpPath,
float  scale 
)

◆ convertToResourceAll()

static void Yukar.Common.Resource.Model.convertToResourceAll ( Catalog  catalog)
static

◆ createInternalUseModel()

void Yukar.Common.Resource.Model.createInternalUseModel ( string  path)

◆ ERRCHECKER()

delegate int Yukar.Common.Resource.Model.ERRCHECKER ( string  path)

◆ export()

override void Yukar.Common.Resource.Model.export ( string  dstpath)
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ GetResourceHolderList()

override List< ResourceHolder > Yukar.Common.Resource.Model.GetResourceHolderList ( )
protectedvirtual

◆ getSize()

static float Yukar.Common.Resource.Model.getSize ( string  srcpath)
static

Get maximum model size

Parameters
srcpathmodel path
Returns
Maximum size

◆ getTexListFromDef()

List< string > Yukar.Common.Resource.Model.getTexListFromDef ( List< string >  defList,
bool  isRemoveGuid = false 
)

◆ getTextureAndDef()

void Yukar.Common.Resource.Model.getTextureAndDef ( List< string >  outDefList,
List< string >  outTexList,
string  workFileName 
)

◆ import()

static Model Yukar.Common.Resource.Model.import ( string  srcpath,
string  createpath,
bool  optimize,
float  scale,
bool  newTexture 
)
static

◆ initializeKmyGfx()

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

◆ initializingAfterLoading()

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

Reimplemented from Yukar.Common.Rom.RomItem.

◆ IsErrorImp()

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

◆ load()

override void Yukar.Common.Resource.Model.load ( BinaryReader  reader)
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ loadDefFile()

List< string > Yukar.Common.Resource.Model.loadDefFile ( string  defFileName)

◆ makeCreatePath()

static string Yukar.Common.Resource.Model.makeCreatePath ( string  srcpath,
bool  overwrite = false 
)
static

Get the path to copy the model file to

Parameters
srcpathPath of the model file to import from
overwriteOverwrite?
Returns
Path to copy model files to

◆ onCatalogCleanup()

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

Reimplemented from Yukar.Common.Rom.RomItem.

◆ overwriteImport() [1/2]

void Yukar.Common.Resource.Model.overwriteImport ( string  newPath)

simple overwrite import

Parameters
newPathnew import file

◆ overwriteImport() [2/2]

void Yukar.Common.Resource.Model.overwriteImport ( string  newPath,
bool  inOptimize,
float  inScale 
)

simple overwrite import

Parameters
newPathnew import file
inOptimizeOptimize?
inScalescale

◆ reImport()

override void Yukar.Common.Resource.Model.reImport ( )
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ reload()

override void Yukar.Common.Resource.Model.reload ( )
virtual

◆ save()

override void Yukar.Common.Resource.Model.save ( BinaryWriter  writer)
virtual

Reimplemented from Yukar.Common.Rom.RomItem.

◆ saveUsedGUID()

override void Yukar.Common.Resource.Model.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.

◆ setNativeResourcePath()

override void Yukar.Common.Resource.Model.setNativeResourcePath ( string  inFolderPath)
virtual

set full path of native resource for system project y

Parameters
inFolderPathCurrent folder path of the project

Reimplemented from Yukar.Common.Resource.ResourceItem.

◆ updateMaterialSet()

void Yukar.Common.Resource.Model.updateMaterialSet ( )

Member Data Documentation

◆ converter

CONVERTER Yukar.Common.Resource.Model.converter = null
static

◆ errchecker

ERRCHECKER Yukar.Common.Resource.Model.errchecker = null
static

◆ errorHandle

int Yukar.Common.Resource.Model.errorHandle = 0
static

◆ m_isShield

bool Yukar.Common.Resource.Model.m_isShield = false

◆ m_materialSet

MaterialSet Yukar.Common.Resource.Model.m_materialSet = new MaterialSet()

◆ m_mdl

SharpKmyGfx.ModelData Yukar.Common.Resource.Model.m_mdl = null

◆ m_previewAngle

SharpKmyMath.Vector3 Yukar.Common.Resource.Model.m_previewAngle = new SharpKmyMath.Vector3()

◆ m_previewOffset

SharpKmyMath.Vector3 Yukar.Common.Resource.Model.m_previewOffset = new SharpKmyMath.Vector3()

◆ vertexCompressMode

bool Yukar.Common.Resource.Model.vertexCompressMode = true

Property Documentation

◆ ImportPath

override string Yukar.Common.Resource.Model.ImportPath
getset

◆ VertexCompressMode

bool Yukar.Common.Resource.Model.VertexCompressMode
getset