ported bobtoolz
[xonotic/netradiant.git] / radiant / brushmodule.cpp
index e289f3ccb1e161f1bfa58be1f61043f99170b42d..cbc4c0a28548188ff267f246731085fbc80faa88 100644 (file)
@@ -184,12 +184,13 @@ public:
   {
     return g_useAlternativeTextureProjection.m_value;
   }
-  void forEachBrushFace(scene::Node& brush, const BrushFaceDataCallback& callback)
+  void Brush_forEachFace(scene::Node& brush, const BrushFaceDataCallback& callback)
   {
-    Brush_forEachFace(*Node_getBrush(brush), FaceCallback(BrushFaceDataFromFaceCaller(callback)));
+    ::Brush_forEachFace(*Node_getBrush(brush), FaceCallback(BrushFaceDataFromFaceCaller(callback)));
   }
-  bool addBrushFace(scene::Node& brush, const _QERFaceData& faceData)
+  bool Brush_addFace(scene::Node& brush, const _QERFaceData& faceData)
   {
+    Node_getBrush(brush)->undoSave();
     return Node_getBrush(brush)->addPlane(faceData.m_p0, faceData.m_p1, faceData.m_p2, faceData.m_shader, TextureProjection(faceData.m_texdef, brushprimit_texdef_t(), Vector3(0, 0, 0), Vector3(0, 0, 0))) != 0;
   }
 };