| 74 | #if COMPILE_WITH_MATERIAL_GRAPH |
| 75 | |
| 76 | BytesContainer MaterialFunction::LoadSurface() |
| 77 | { |
| 78 | BytesContainer result; |
| 79 | if (WaitForLoaded()) |
| 80 | return result; |
| 81 | ScopeLock lock(Locker); |
| 82 | if (HasChunk(0)) |
| 83 | { |
| 84 | if (!LoadChunks(GET_CHUNK_FLAG(0))) |
| 85 | { |
| 86 | const auto surfaceChunk = GetChunk(0); |
| 87 | result.Copy(surfaceChunk->Data); |
| 88 | } |
| 89 | } |
| 90 | return result; |
| 91 | } |
| 92 | |
| 93 | bool MaterialFunction::LoadSurface(MaterialGraph& graph, bool loadMeta) |
| 94 | { |