[fixed] Proper var name for color anim in Sprites (color_)

[fixed] Proper var name for color anim in Sprites (color_)

Postby Skinnytorus » Friday, 20.September 2013, 07:44

I have just remembered we had this problem: viewtopic.php?f=41&t=1068
IMHO, the variable should be called Color and not "color_" or be given some meaningful name exactly corresponding to the param marked with "*".
I don't know which ops other than Sprites have this problem, but there might be similar cases. I can investigate a little ;)
Of course, this will break compatibility, but we've already stepped on that way...
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: Proper var name for color anim in Sprites (color_)

Postby ikam » Saturday, 21.September 2013, 07:21

It's because this var name is a reserved keyword, so it change it at compil to avoid conflict...
here are all concerned name :

Code: Select all
  if(buffer==L"int") buffer = L"int_";
  if(buffer==L"float") buffer = L"float_";
  if(buffer==L"color") buffer = L"color_";
  if(buffer==L"string") buffer = L"string_";
  // may be add more keywords...


need to find a solution...
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: Proper var name for color anim in Sprites (color_)

Postby Skinnytorus » Saturday, 21.September 2013, 07:50

Maybe rename color anim variable in Sprites (and other ops with animated Color) to "Colors"?
The others do not seem to be used elsewhere in anim scripts as animatable params.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: Proper var name for color anim in Sprites (color_)

Postby ikam » Saturday, 21.September 2013, 12:28

ok it is done. renamed to colors
all impacted op :
-modslice
-print
-sprites
-layer2d
-SSAo
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: Proper var name for color anim in Sprites (color_)

Postby Skinnytorus » Saturday, 21.September 2013, 13:02

Works like a charm! Thanks a whole lot! \:D/
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46


Return to Bug reports



Who is online

Users browsing this forum: No registered users and 1 guest

cron