diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 051202b28ef..62274fc664a 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -222,6 +222,18 @@ static int find_specialvar(char *string) return i; } +static int find_decorator(char *string) +{ + if(string[0] == '@') { + int i = 1; + while(text_check_identifier(string[i])) { + i++; + } + return i; + } + return -1; +} + static int find_bool(char *string) { int i = 0; @@ -375,6 +387,8 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) prev = 'v'; else if((i=find_builtinfunc(str)) != -1) prev = 'b'; + else if((i=find_decorator(str)) != -1) + prev = 'v'; /* could have a new color for this */ if(i>0) { while(i>1) { *fmt = prev; fmt++; str++; diff --git a/source/blender/python/doc/examples/mathutils.py b/source/blender/python/doc/examples/mathutils.py index 4a5de5887c9..0b30a0f4505 100644 --- a/source/blender/python/doc/examples/mathutils.py +++ b/source/blender/python/doc/examples/mathutils.py @@ -3,8 +3,8 @@ from math import radians vec = mathutils.Vector((1.0, 2.0, 3.0)) -mat_rot = mathutils.RotationMatrix(radians(90), 4, 'X') -mat_trans = mathutils.TranslationMatrix(vec) +mat_rot = mathutils.Matrix.Rotation(radians(90), 4, 'X') +mat_trans = mathutils.Matrix.Translation(vec) mat = mat_trans * mat_rot mat.invert()