]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'osxnetradiant'
authorRudolf Polzer <rpolzer@grawp.(none)>
Sun, 28 Mar 2010 17:32:53 +0000 (19:32 +0200)
committerRudolf Polzer <rpolzer@grawp.(none)>
Sun, 28 Mar 2010 17:32:53 +0000 (19:32 +0200)
Conflicts:
contrib/bobtoolz/DPatch.cpp
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/bobtoolz/funchandlers-GTK.cpp
install-dylibs.sh
setup/data/osx/NetRadiant.app/Contents/MacOS/netradiant.sh

1  2 
Makefile
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/bobtoolz/funchandlers-GTK.cpp

diff --cc Makefile
Simple merge
Simple merge
index 5e7b25ce1d65379ff1fae15a65dd7f44cad3c0c1,8f26d7149538d7a95f9884b5d7dd52c12a19b7b9..2e4fce176dff32cec004bdd88b30db7a02da9274
@@@ -507,64 -537,68 +537,126 @@@ void DoSplitPatch() 
        Path_deleteTop(instance.path());
  }
  
+ void DoSplitPatchCols() {
+       UndoableCommand undo("bobToolz.splitPatchCols");
+       
+       DPatch patch;
+       
+       // ensure we have something selected
+       if( GlobalSelectionSystem().countSelected() != 1 )
+       {
+               //DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK);
+               globalErrorStream() << "bobToolz SplitPatchCols: Invalid number of patches selected, choose 1 only.\n";
+               return; 
+       }
+       
+       scene::Instance& instance = GlobalSelectionSystem().ultimateSelected();
+       
+       if( !Node_isPatch(instance.path().top()) ) {
+               //DoMessageBox("No patch selected, select ONLY one patch", "Error", eMB_OK);
+               globalErrorStream() << "bobToolz SplitPatchCols: No patch selected, select ONLY 1 patch.\n";
+               return; 
+       }
+       
+       patch.LoadFromPatch(instance);
+       
+       std::list<DPatch> patchList = patch.SplitCols();
+       for(std::list<DPatch>::iterator patches = patchList.begin(); patches != patchList.end(); patches++) {
+               (*patches).BuildInRadiant();
+       }
+       
+       Path_deleteTop(instance.path());
+ }
+ void DoSplitPatchRows() {
+       UndoableCommand undo("bobToolz.splitPatchRows");
+       
+       DPatch patch;
+       
+       // ensure we have something selected
+       if( GlobalSelectionSystem().countSelected() != 1 )
+       {
+               //DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK);
+               globalErrorStream() << "bobToolz SplitPatchRows: Invalid number of patches selected, choose 1 only.\n";
+               return; 
+       }
+       
+       scene::Instance& instance = GlobalSelectionSystem().ultimateSelected();
+       
+       if( !Node_isPatch(instance.path().top()) ) {
+               //DoMessageBox("No patch selected, select ONLY one patch", "Error", eMB_OK);
+               globalErrorStream() << "bobToolz SplitPatchRows: No patch selected, select ONLY 1 patch.\n";
+               return; 
+       }
+       
+       patch.LoadFromPatch(instance);
+       
+       std::list<DPatch> patchList = patch.SplitRows();
+       for(std::list<DPatch>::iterator patches = patchList.begin(); patches != patchList.end(); patches++) {
+               (*patches).BuildInRadiant();
+       }
+       
+       Path_deleteTop(instance.path());
+ }
 +void DoSplitPatchCols() {
 +      UndoableCommand undo("bobToolz.splitPatchCols");
 +      
 +      DPatch patch;
 +      
 +      // ensure we have something selected
 +      if( GlobalSelectionSystem().countSelected() != 1 )
 +      {
 +              DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK);
 +              return; 
 +      }
 +      
 +      scene::Instance& instance = GlobalSelectionSystem().ultimateSelected();
 +      
 +      if( !Node_isPatch(instance.path().top()) ) {
 +              DoMessageBox("You must select ONLY patches", "Error", eMB_OK);
 +              return; 
 +      }
 +      
 +      patch.LoadFromPatch(instance);
 +      
 +      std::list<DPatch> patchList = patch.SplitCols();
 +      for(std::list<DPatch>::iterator patches = patchList.begin(); patches != patchList.end(); patches++) {
 +              (*patches).BuildInRadiant();
 +      }
 +      
 +      Path_deleteTop(instance.path());
 +}
 +
 +void DoSplitPatchRows() {
 +      UndoableCommand undo("bobToolz.splitPatchRows");
 +      
 +      DPatch patch;
 +      
 +      // ensure we have something selected
 +      if( GlobalSelectionSystem().countSelected() != 1 )
 +      {
 +              DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK);
 +              return; 
 +      }
 +      
 +      scene::Instance& instance = GlobalSelectionSystem().ultimateSelected();
 +      
 +      if( !Node_isPatch(instance.path().top()) ) {
 +              DoMessageBox("You must select ONLY patches", "Error", eMB_OK);
 +              return; 
 +      }
 +      
 +      patch.LoadFromPatch(instance);
 +      
 +      std::list<DPatch> patchList = patch.SplitRows();
 +      for(std::list<DPatch>::iterator patches = patchList.begin(); patches != patchList.end(); patches++) {
 +              (*patches).BuildInRadiant();
 +      }
 +      
 +      Path_deleteTop(instance.path());
 +}
 +
  void DoVisAnalyse()
  {
        char filename[1024];