Anim8or Community
May 19, 2013, 05:59:58 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: The v0.97d Preview is now available!  See the "Anim8or v0.97 Preview" Forum for details.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: One way to group objects in hiearchal form  (Read 224 times)
lppena
Full Member
***
Posts: 197


Anim8or, It does a body good.


View Profile WWW
« on: July 12, 2012, 12:30:51 pm »

I found that moving blocks of text around is helping me understand a little on how Anim8or can be set to link objects in hiearchal form. I still get frame read and commentary errors, but the model file seems somewhat intact in terms of 3d Exploration being able to display them for viewing. The text block I moved is listed below to show what I copied and moved to be under area of the XSI script that I've been working on from the original script created by Raxx. I could really use some feedback on how to get rid of the frame read and commentary error. I posted a pic of the hiearchal display and actual errors in 3DEX. Thanks, Leroy. PS: I attached the modified script for others to take a look at and possibly modify it some more.

Code:
$curObject.GetShapes($childShapes);
$shapes.size = 0;
while ($childShapes.size > 0)
    $shapes.push($childShapes.pop());
    
/*$output.print("Frame Frm {\n     FrameTransformMatrix {\n  1.000000,0.000000,0.000000,0.000000,\n  0.000000,1.000000,0.000000,0.000000,\n  0.000000,0.000000,1.000000,0.000000,\n  0.000000,0.000000,0.000000,1.000000;;\n   }\n");*/


while ($shapes.size > 0) {
    $shape = $shapes.pop();
    
        if ($shape.GetKind() == SHAPE_KIND_GROUP) {
        $shape.GetShapes($childShapes);
        
        while ($childShapes.size > 0) {
            $shapes.push($childShapes.pop());

 $output.print("Frame %s {\nFrameTransformMatrix {\n", $shape.name);
  
        $transformMat = $shape.GetGlobalTransform();
        $tr4=$transformMat.Project((0.0,0.0,0.0));
        $tr1=$transformMat.Project((1.0,0.0,0.0))-$tr4;
        $tr2=$transformMat.Project((0.0,1.0,0.0))-$tr4;
        $tr3=$transformMat.Project((0.0,0.0,1.0))-$tr4;
        $output.print("  %.6f,%.6f,%.6f,0.000000,\n",$tr1);
        $output.print("  %.6f,%.6f,%.6f,0.000000,\n",$tr2);
        $output.print("  %.6f,%.6f,%.6f,0.000000,\n",$tr3);
        $output.print("  %.6f,%.6f,%.6f,1.000000;;\n }\n",$tr4);
        

« Last Edit: July 12, 2012, 12:57:00 pm by lppena » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!