Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: independant axis?  (Read 2768 times)

VBSmiles

  • Full Member
  • ***
  • Posts: 203
    • View Profile
independant axis?
« on: November 13, 2008, 06: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, 06:32:00 am by VBSmiles »
Logged

VBSmiles

  • Full Member
  • ***
  • Posts: 203
    • View Profile
Re: independant axis?
« Reply #1 on: November 13, 2008, 07: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