Game Development Community

Zeroing Brushes

by Peter Vieira · in Constructor · 05/18/2007 (9:40 am) · 0 replies

I want to create a tool that zero out the brushe's pivot position to the world origin (0,0,0).
How would I do this in script ??
I was thinking it was the same as resetting pivot, but I want the position to be at 0,0,0.

code sample was taken from resetpivotpoint.cs
%plugin = %inst.instance;
      
      //*** Perform the pivot point reset
      %map = scene.getCurrentMap();
      %brushes = %map.getSelectedBrushes();
      %count = getWordCount(%brushes);
      for(%i=0; %i<%count; %i++)
      {
         %map.setBrushPivot(getWord(%brushes, %i), "0 0 0 1 0 0 0");
      }