Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-25 17:55:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-25 17:55:16 +0400
commitd417cdc9f4ff73d29c74f1a04aa2d35249e90560 (patch)
tree5e003847d1c4d8b974673f01139135f6fde572a0 /source/blender/editors/space_view3d
parent1091030c1157918a3499a0a1b4e228936c3f013e (diff)
edit fix for [#32177] - drawing text isnt really needed for selections.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 31b13fb0d1c..244588f10c5 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -6447,19 +6447,6 @@ static void draw_rigid_body_pivot(bRigidBodyJointConstraint *data, const short d
const char *axis_str[3] = {"px", "py", "pz"};
int axis;
float mat[4][4];
- unsigned char _col[4], *col;
-
- /* color */
- if (dflag & DRAW_CONSTCOLOR) {
- /* so we can draw pivot point in current const color */
- float tcol[4];
- col = _col;
- glGetFloatv(GL_CURRENT_COLOR, tcol);
- rgb_float_to_uchar(col, tcol);
- }
- else {
- col = ob_wire_col;
- }
eul_to_mat4(mat, &data->axX);
glLineWidth(4.0f);
@@ -6470,7 +6457,7 @@ static void draw_rigid_body_pivot(bRigidBodyJointConstraint *data, const short d
copy_v3_v3(v, &data->pivX);
- dir[axis] = 1.f;
+ dir[axis] = 1.0f;
glBegin(GL_LINES);
mul_m4_v3(mat, dir);
add_v3_v3(v, dir);
@@ -6478,7 +6465,11 @@ static void draw_rigid_body_pivot(bRigidBodyJointConstraint *data, const short d
glVertex3fv(v);
glEnd();
- view3d_cached_text_draw_add(v, axis_str[axis], 0, V3D_CACHE_TEXT_ASCII, col);
+ /* when const color is set wirecolor is NULL - we could get the current color but
+ * with selection and group instancing its not needed to draw the text */
+ if ((dflag & DRAW_CONSTCOLOR) == 0) {
+ view3d_cached_text_draw_add(v, axis_str[axis], 0, V3D_CACHE_TEXT_ASCII, ob_wire_col);
+ }
}
glLineWidth(1.0f);
setlinestyle(0);