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

Function SetNodeParticlefx

engine/gui/src/gui.cpp:3437–3450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3435 }
3436
3437 Result SetNodeParticlefx(HScene scene, HNode node, dmhash_t particlefx_id)
3438 {
3439 InternalNode* n = GetNode(scene, node);
3440 if (n->m_Node.m_NodeType != NODE_TYPE_PARTICLEFX) {
3441 return RESULT_WRONG_TYPE;
3442 }
3443
3444 if (scene->m_Particlefxs.Get(particlefx_id) == 0) {
3445 return RESULT_RESOURCE_NOT_FOUND;
3446 }
3447
3448 n->m_Node.m_ParticlefxHash = particlefx_id;
3449 return RESULT_OK;
3450 }
3451
3452 Result GetNodeParticlefx(HScene scene, HNode node, dmhash_t& particlefx_id)
3453 {

Callers 5

LuaNewParticlefxNodeFunction · 0.70
LuaSetParticlefxFunction · 0.70
TEST_FFunction · 0.50
SetupGuiTestSceneFunction · 0.50
SetNodeFunction · 0.50

Calls 2

GetNodeFunction · 0.70
GetMethod · 0.45

Tested by 2

TEST_FFunction · 0.40
SetupGuiTestSceneFunction · 0.40