Added initial_setup_default virtual to prop material cache.

This commit is contained in:
Relintai 2021-08-09 20:24:29 +02:00
parent 7a3e3b20d4
commit f3d1e5278c
4 changed files with 15 additions and 0 deletions

View File

@ -236,6 +236,10 @@ void PropMaterialCache::refresh_rects() {
_initialized = true;
}
void PropMaterialCache::initial_setup_default() {
}
void PropMaterialCache::setup_material_albedo(Ref<Texture> texture) {
if (has_method("_setup_material_albedo"))
call("_setup_material_albedo", texture);

View File

@ -80,8 +80,11 @@ public:
void prop_add_textures(const Ref<PropData> &prop);
void prop_remove_textures(const Ref<PropData> &prop);
virtual void refresh_rects();
virtual void initial_setup_default();
void setup_material_albedo(Ref<Texture> texture);
PropMaterialCache();

View File

@ -128,6 +128,12 @@ void PropMaterialCachePCM::refresh_rects() {
_initialized = true;
}
void PropMaterialCache::initial_setup_default() {
PropMaterialCache::initial_setup_default();
//copy settings
}
void PropMaterialCachePCM::_setup_material_albedo(Ref<Texture> texture) {
int count = material_get_num();

View File

@ -67,6 +67,8 @@ public:
void refresh_rects();
void initial_setup_default();
void _setup_material_albedo(Ref<Texture> texture);
PropMaterialCachePCM();