virtual bool pre(const scene::INodePtr& node) { NamespacedPtr namespaced = Node_getNamespaced(node); // Only do this, if the item is Namespaced and attached to a Namespace if (namespaced != NULL && namespaced->getNamespace() != NULL) { namespaced->connectNameObservers(); } return true; }
virtual bool pre(const scene::INodePtr& node) { // Insert node if it is a Namespaced object NamespacedPtr namespaced = Node_getNamespaced(node); if (namespaced) { result.insert(namespaced); } return true; }
inline scene::Node& node_for_eclass (EntityClass* eclass) { scene::Node& node = entity_for_eclass(eclass); Node_getEntity(node)->setKeyValue("classname", eclass->name()); Namespaced* namespaced = Node_getNamespaced(node); if (namespaced != 0) { namespaced->setNamespace(GlobalNamespace()); } return node; }
virtual bool pre(const scene::INodePtr& node) { NamespacedPtr namespaced = Node_getNamespaced(node); // Only do this, if the item is Namespaced and attached to a Namespace if (namespaced != NULL && namespaced->getNamespace() != NULL) { // Remove names and clear namespace namespaced->detachNames(); namespaced->setNamespace(NULL); } return true; }
inline scene::Node& node_for_eclass(EntityClass* eclass) { scene::Node& node = entity_for_eclass(eclass); Node_getEntity(node)->setKeyValue("classname", eclass->name()); if(g_gameType == eGameTypeDoom3 && string_not_empty(eclass->name()) && !string_equal(eclass->name(), "worldspawn") && !string_equal(eclass->name(), "UNKNOWN_CLASS")) { char buffer[1024]; strcpy(buffer, eclass->name()); strcat(buffer, "_1"); GlobalNamespace().makeUnique(buffer, EntitySetNameCaller(*Node_getEntity(node))); } Namespaced* namespaced = Node_getNamespaced(node); if(namespaced != 0) { namespaced->setNamespace(GlobalNamespace()); } return node; }