Эх сурвалжийг харах

merge bullshit

Former-commit-id: cb62d642b93ca08b7c53532bfa53ee04c9849904
Alec Jacobson (jalec 11 жил өмнө
parent
commit
4db0b4ee7b

+ 2 - 2
examples/quicklook-mesh/Makefile

@@ -8,8 +8,8 @@ C=llvm-gcc
 EIGEN=/opt/local/include/eigen3/
 EIGEN3_INC=-I$(EIGEN) -I$(EIGEN)/unsupported
 
-LIBIGL=/usr/local/igl/libigl/
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab
+LIBIGL=../../
+LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
 LIBIGL_INC=-I $(LIBIGL)/include
 
 # Do not use the GLU that comes with the macports Mesa:

+ 8 - 4
include/igl/xml/ReAntTweakBarXMLSerialization.cpp

@@ -5,7 +5,8 @@
 
 IGL_INLINE bool igl::save_ReAntTweakBar(igl::ReTwBar* bar, const char* file_name)
 {
-  std::string name = bar->name + "_AntTweakBar";
+  const char * name_chars = TwGetBarName(bar->bar);
+  std::string name = std::string(name_chars) + "_AntTweakBar";
 	
   const std::vector<igl::ReTwRWItem>& rw_items = bar->get_rw_items();
 	for(std::vector<ReTwRWItem>::const_iterator it = rw_items.begin(); it != rw_items.end(); it++)
@@ -39,7 +40,8 @@ IGL_INLINE bool igl::save_ReAntTweakBar(igl::ReTwBar* bar, tinyxml2::XMLDocument
 {
   std::vector<char**> buffer;
 	
-	std::string name = bar->name + "_AntTweakBar";
+  const char * name_chars = TwGetBarName(bar->bar);
+  std::string name = std::string(name_chars) + "_AntTweakBar";
 	igl::XMLSerializer* s = new igl::XMLSerializer(name);
 	
   const std::vector<igl::ReTwRWItem>& rw_items = bar->get_rw_items();
@@ -95,7 +97,8 @@ IGL_INLINE bool igl::load_ReAntTweakBar(igl::ReTwBar* bar, const char *file_name
 	char value_str[REANTTWEAKBAR_MAX_WORD];
 	TwType type;
 	
-  std::string name = bar->name + "_AntTweakBar";
+  const char * name_chars = TwGetBarName(bar->bar);
+  std::string name = std::string(name_chars) + "_AntTweakBar";
 
   const std::vector<igl::ReTwRWItem>& rw_items = bar->get_rw_items();
 	for(std::vector<ReTwRWItem>::const_iterator it = rw_items.begin(); it != rw_items.end(); it++)
@@ -139,7 +142,8 @@ IGL_INLINE bool igl::load_ReAntTweakBar(igl::ReTwBar* bar, tinyxml2::XMLDocument
 	std::map<std::string,char*> variables;
 	std::map<std::string,char*> cbVariables;
 
-	std::string name = bar->name + "_AntTweakBar";
+  const char * name_chars = TwGetBarName(bar->bar);
+  std::string name = std::string(name_chars) + "_AntTweakBar";
 	igl::XMLSerializer* s = new igl::XMLSerializer(name);
 	
 	std::map<std::string,char*>::iterator iter;