Friendlyskies AoI Forum

You are not logged in.

Announcement

#1 June 23, 2009, 4:20 pm

mayid
42
From: Argentina
Registered: March 29, 2009,
Posts: 1004
Reputation :   
Website

error in Mosaic script

I´m giving a path to a picture to the Mosaic script. But it returns an error. What this means?



Method getDefaultMapping() not found in class'artofillusion.texture.UniformTexture'

... at line 60.


Comunidad en español:
www.aoi-castellano.com.ar/ForoBB/index.php
Comunidad de aprendizaje.

Offline

 

#2 June 23, 2009, 6:59 pm

mayid
42
From: Argentina
Registered: March 29, 2009,
Posts: 1004
Reputation :   
Website

Re: error in Mosaic script

ok. I read Francois´ scripting tutorial. And then i looked for the API references.

The method that is giving me an error is a native method that it´s present in class'artofillusion.texture.UniformTexture' . So why it´s not being founded?

This scripts seems to be great. And i´ll like to solve this little issue so to make good things with it.

Thanks.


Comunidad en español:
www.aoi-castellano.com.ar/ForoBB/index.php
Comunidad de aprendizaje.

Offline

 

#3 June 23, 2009, 9:44 pm

ecannon
Serial Contributor
From: Northern California
Registered: May 7, 2007,
Posts: 301
Reputation :   
Website

Re: error in Mosaic script

you need to edit the script, the API changed slightly at one point if you are applying the texture to object hi it should be <texturename>.getDefaultMapping(hi)
edit one line and it should work.


check out the new renderfarm software at http://gc-films.com/renderfarm/! Version 0.3 now out.
Watch the movie rendered in AoI http://unicornschool.org/imagination/imagination360.avi!

Offline

 

#4 June 24, 2009, 9:29 am

mayid
42
From: Argentina
Registered: March 29, 2009,
Posts: 1004
Reputation :   
Website

Re: error in Mosaic script

Thanks a lot.

I assume that this is the object:
tile=new Cube(tileX,tileY,tileZ);

So i write:
getDefaultMapping(tile)

And this happends:
Attempt to resolve method: addObject() on undefined variable or class name: script.
Encountered "script.addObject (tile, new CoordinateSystem (pos ,0,0,0))" at line 61

For what i see, it´s true that 'script' is not being declared before that line.


Comunidad en español:
www.aoi-castellano.com.ar/ForoBB/index.php
Comunidad de aprendizaje.

Offline

 

#5 June 24, 2009, 6:59 pm

mayid
42
From: Argentina
Registered: March 29, 2009,
Posts: 1004
Reputation :   
Website

Re: error in Mosaic script

Wait a minute. This script will separate an image en several parts, or will repeat the same pattern like in the islamic walls?.

btw: I know too little about Java, but i suppose the class name 'script' is common for every script, and the programmer hasn´t to declare it. Then, maybe the problem is again because of changes in AoI API releases?

: Attempt to resolve method: addObject() on undefined variable or class name: script.
Encountered "script.addObject (tile, new CoordinateSystem (pos ,0,0,0))" at line 61

It´s a grammar problem?


Comunidad en español:
www.aoi-castellano.com.ar/ForoBB/index.php
Comunidad de aprendizaje.

Offline

 

#6 June 25, 2009, 5:14 am

utrrrongeeb
Sentient Primitive
From: Eastern Canada
Registered: August 27, 2005,
Posts: 402
Reputation :   

Re: error in Mosaic script

The "script" object is not available to every script -- it is only available for object scripts. The Mosaic script is an object script, and should be installed in AoI's Scripts/Objects directory. If you are writing an object script, use Tools>Create Scripted Object>Ok (New Script will be selected), instead of Tools>Execute Script.


neutral utrrrongeeb [Art] formerly amateurmodeller
Win Win Win Honorable count3

Offline

 

#7 June 25, 2009, 9:09 am

mayid
42
From: Argentina
Registered: March 29, 2009,
Posts: 1004
Reputation :   
Website

Re: error in Mosaic script

Well, other object scripts are functioning for me.

But nevermind this post if the squares will have all the same figure. I was dreaming about cubes with a splited image. For making a background.

Anyway, taking a look over scripts is good for me. I´d like to write code in a future.


Comunidad en español:
www.aoi-castellano.com.ar/ForoBB/index.php
Comunidad de aprendizaje.

Offline

 

#8 June 25, 2009, 9:22 am

mayid
42
From: Argentina
Registered: March 29, 2009,
Posts: 1004
Reputation :   
Website

Re: error in Mosaic script

It worked out! I don´t know how, but it´s working.
Maybe because i saved it before executing, or because i rename the jpg...

So i have different colours cubes. Thanks.


Comunidad en español:
www.aoi-castellano.com.ar/ForoBB/index.php
Comunidad de aprendizaje.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson