Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: independant axis?  (Read 8392 times)

VBSmiles

  • Full Member
  • ***
  • Posts: 203
    • View Profile
independant axis?
« on: November 13, 2008, 01:21:55 am »

Gained a new fustration  >:(

Objects seem to have an axis independant of the "Object axis" or "viewport axis"
Turning the model or it's axis appears to do squat when moving a point with a point3 declaration. Moving the axis also doesn't do anything. maybe Im missing something?
Code: [Select]
/*************************************************/
/*** Script in progress made to flatten points ***/
/*** Created by: VBSmiles                              ***/
/*************************************************/
/*** declaration ***/
#command("object"); /*1*//* To start as menu item ? */
point3 $c_point, $ModLoc;    /*2*//* current point */
float $dist;    /*6*//* Distance between points and ... */
shape $model;
int $test, $i, $NP;
file $file;
string $Output;

/*** Initialization ***/
$model = project.curObject.LookupShape("mesh01");
$ModLoc = $model.loc;
/*** Get the number of points in model ***/
if ($model != NULL)
{
$model.Open();

$NP = $model.GetNumPoints();

for $i = 0 to $NP do
 {
   /* Get the selected point */
   $test = $model.GetPointSelected($i);
   
   /*** if selected then store it's values ***/
   if ($test == 1)
      {
      $c_point = $model.GetPoint ($i);

      $c_point.y =  $ModLoc.y;
      /*** move the point ***/
      $model.SetPoint ($i, $c_point);

      }
   }
$model.Close();
refresh();
   $file.open("$console", "w");
  $Output = PrintToString("Parent Location:%e", $ModLoc.y);
   $file.print("\n" +$Output+ "\n");
$file.close;
} else
{
  $file.open("$console", "w");
   $file.print("\n\n where the hell is the model? \n\n");
$file.close;
}

In my code, I used the Parent location to play around with it a little. but even this seems effected by this "invisible axis"
« Last Edit: November 13, 2008, 01:32:00 am by VBSmiles »
Logged

VBSmiles

  • Full Member
  • ***
  • Posts: 203
    • View Profile
Re: independant axis?
« Reply #1 on: November 13, 2008, 02:14:43 am »

Oh poo. I think I know what's going on. I'd have to do my own matric math.
I'm pretty rusty on that.
Logged