bool pre( scene::Node& node ) const { scene::Path path( NodeReference( GlobalSceneGraph().root() ) ); path.push( NodeReference( *m_entity->QER_Entity ) ); path.push( NodeReference( node ) ); scene::Instance* instance = GlobalSceneGraph().find( path ); ASSERT_MESSAGE( instance != 0, "" ); if ( Node_isPatch( node ) ) { DPatch* loadPatch = m_entity->NewPatch(); loadPatch->LoadFromPatch( *instance ); } else if ( Node_isBrush( node ) ) { DBrush* loadBrush = m_entity->NewBrush( m_count++ ); loadBrush->LoadFromBrush( *instance, true ); } return false; }
void DEntity_loadPatch( DEntity& entity, scene::Instance& patch ){ DPatch* loadPatch = entity.NewPatch(); loadPatch->LoadFromPatch( patch ); }