image.setBody( body ) not working
Posted: Sun Apr 13, 2014 8:12 am
With the following script:
image img = getImage("testImage");
body b = getBody("testBody");
img.setBody( b );
I get the following error
"Invalid body passed to setBody (image id 1)"
Doesn't matter whether I use string names or ids and I've tried various image, body and script scenarios but nothing seems to work.
Bah I just resolved it by going
img.setBody( b.id );
instead. Still, what is the reason the first version doesn't work?
Thanks,
Jules.
image img = getImage("testImage");
body b = getBody("testBody");
img.setBody( b );
I get the following error
"Invalid body passed to setBody (image id 1)"
Doesn't matter whether I use string names or ids and I've tried various image, body and script scenarios but nothing seems to work.
Bah I just resolved it by going
img.setBody( b.id );
instead. Still, what is the reason the first version doesn't work?
Thanks,
Jules.