Example #1
0
    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;
    }
Example #2
0
    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;
    }
Example #3
0
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;
}
Example #4
0
    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;
    }
Example #5
0
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;
}