vector array Error

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2006   #1
vector array Error

I tried this command ,then error occur in line2

vector $a[] = {<<0,0,0>>,<<5,0,0>>};
float $b = $a[0].x;

single vector work fine like this

vector $c = <<0,0,0>>;
float $d = $c.x;

is there some fault ?
 
Old 01 January 2006   #2
I believe this is a mel limitation.
You cannot access $a[0].x directly, but have to pass trough another variable:

{
vector $a[] = {<<0,0,0>>,<<5,0,0>>};
vector $dummy = $a[0];
float $b = $dummy.x;
}

I'll try to look in the help to be sure there's no other way...

Regards,
Pascal.
 
Old 01 January 2006   #3
Ummm, yeah, there are a number of faults. Mainly, you can't declare vecotrs inside of array, and arrays inside of vectors. The two are seperate, if you need to make a multi-column, multi-row variable like that, just use a matrix instead.
 
Old 01 January 2006   #4
Yeah, this particular mel limitation is a real bummer (;_;). I wrote my own matrix / vector plugin because Mel's types bothered me so much. I can't speak for expressions, since I've never used them, but most other Mel things that require a vector can also work with float arrays of size 3 (i.e. float [3]).

*sigh*
 
Old 01 January 2006   #5
I'll try using both temporary nonarray vector and matrix as the situation demand.

Thank you for all replys!
 
Old 01 January 2006   #6
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:53 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.