MCPcopy Create free account
hub / github.com/defold/defold / UnassignTexture

Function UnassignTexture

engine/gui/src/gui.cpp:778–796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776 }
777
778 static void UnassignTexture(HScene scene, dmhash_t texture_name_hash)
779 {
780 uint32_t n = scene->m_Nodes.Size();
781 InternalNode* nodes = scene->m_Nodes.Begin();
782 for (uint32_t i = 0; i < n; ++i)
783 {
784 Node& node = nodes[i].m_Node;
785 if (node.m_TextureHash == texture_name_hash)
786 {
787 if (node.m_TextureType == NODE_TEXTURE_TYPE_TEXTURE_SET)
788 {
789 CancelNodeFlipbookAnim(scene, GetNodeHandle(&nodes[i]));
790 }
791
792 node.m_Texture = 0;
793 node.m_TextureType = NODE_TEXTURE_TYPE_NONE;
794 }
795 }
796 }
797
798 void RemoveTexture(HScene scene, dmhash_t texture_name_hash)
799 {

Callers 2

RemoveTextureFunction · 0.85
DeleteDynamicTextureFunction · 0.85

Calls 4

CancelNodeFlipbookAnimFunction · 0.70
GetNodeHandleFunction · 0.70
SizeMethod · 0.45
BeginMethod · 0.45

Tested by

no test coverage detected