MCPcopy Create free account
hub / github.com/carbonengine/trinity / OnModified

Method OnModified

trinity/Particle/Tr2StaticEmitter.cpp:60–76  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Implements INotify interface. Allows the emitter o respond to parameter changes generated in Python. If the particle geometry resource path changes, the emitter starts loading new particle data. Arguments: value - The Blue-exposed parameter that changed Return Value: true always ------------------

Source from the content-addressed store, hash-verified

58// true always
59// --------------------------------------------------------------------------------------
60bool Tr2StaticEmitter::OnModified( Be::Var* value )
61{
62 if( IsMatch( value, m_geometryResourcePath ) )
63 {
64 BeResMan->GetResource( m_geometryResourcePath,
65 "raw",
66 m_geometryResource );
67 }
68 else if( IsMatch( value, m_particleSystem ) )
69 {
70 if( m_isThreadSafe && m_particleSystem )
71 {
72 m_particleSystem->SetThreadSafeFlag();
73 }
74 }
75 return true;
76}
77
78// --------------------------------------------------------------------------------------
79// Description:

Callers

nothing calls this directly

Calls 3

IsMatchFunction · 0.85
GetResourceMethod · 0.45
SetThreadSafeFlagMethod · 0.45

Tested by

no test coverage detected