Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/drawobject.c
| Context not available. | |||||
| glDepthMask(1); | glDepthMask(1); | ||||
| } | } | ||||
| static void draw_wire_extra(Scene *scene, RegionView3D *rv3d, Object *ob, unsigned char ob_wire_col[4]) | static void draw_wire_extra(Scene *scene, RegionView3D *rv3d, Object *ob, const unsigned char ob_wire_col[4]) | ||||
| { | { | ||||
| if (ELEM4(ob->type, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL)) { | if (ELEM4(ob->type, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL)) { | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| static void draw_rigid_body_pivot(bRigidBodyJointConstraint *data, const short dflag, unsigned char ob_wire_col[4]) | static void draw_rigid_body_pivot(bRigidBodyJointConstraint *data, const short dflag, const unsigned char ob_wire_col[4]) | ||||
| { | { | ||||
| const char *axis_str[3] = {"px", "py", "pz"}; | const char *axis_str[3] = {"px", "py", "pz"}; | ||||
| int axis; | int axis; | ||||
| Context not available. | |||||
| float vec1[3], vec2[3]; | float vec1[3], vec2[3]; | ||||
| unsigned int col = 0; | unsigned int col = 0; | ||||
| unsigned char _ob_wire_col[4]; /* dont initialize this */ | unsigned char _ob_wire_col[4]; /* dont initialize this */ | ||||
| unsigned char *ob_wire_col = NULL; /* dont initialize this, use NULL crashes as a way to find invalid use */ | const unsigned char *ob_wire_col = NULL; /* dont initialize this, use NULL crashes as a way to find invalid use */ | ||||
| int i, selstart, selend, empty_object = 0; | int i, selstart, selend, empty_object = 0; | ||||
| short dtx; | short dtx; | ||||
| char dt; | char dt; | ||||
| Context not available. | |||||
| const bool is_obact = (ob == OBACT); | const bool is_obact = (ob == OBACT); | ||||
| const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0; | const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0; | ||||
| const bool is_picking = (G.f & G_PICKSEL) != 0; | const bool is_picking = (G.f & G_PICKSEL) != 0; | ||||
| const bool is_wire_color = V3D_IS_WIRECOLOR(v3d); | |||||
| bool particle_skip_object = false; /* Draw particles but not their emitter object. */ | bool particle_skip_object = false; /* Draw particles but not their emitter object. */ | ||||
| /* only once set now, will be removed too, should become a global standard */ | /* only once set now, will be removed too, should become a global standard */ | ||||
| Context not available. | |||||
| ED_view3d_project_base(ar, base); | ED_view3d_project_base(ar, base); | ||||
| draw_object_wire_color(scene, base, _ob_wire_col); | if (is_wire_color) { | ||||
| _ob_wire_col[0] = (unsigned char)(ob->col[0] * 255); | |||||
| _ob_wire_col[1] = (unsigned char)(ob->col[1] * 255); | |||||
| _ob_wire_col[2] = (unsigned char)(ob->col[2] * 255); | |||||
| _ob_wire_col[3] = 255; | |||||
| } | |||||
| else { | |||||
| draw_object_wire_color(scene, base, _ob_wire_col); | |||||
| } | |||||
| ob_wire_col = _ob_wire_col; | ob_wire_col = _ob_wire_col; | ||||
| glColor3ubv(ob_wire_col); | glColor3ubv(ob_wire_col); | ||||
| Context not available. | |||||
| draw_object_matcap_check(v3d, ob); | draw_object_matcap_check(v3d, ob); | ||||
| } | } | ||||
| if (is_wire_color & !(dflag & SELECT)) { | |||||
| setlinestyle(1); | |||||
| } | |||||
| /* draw-extra supported for boundbox drawmode too */ | /* draw-extra supported for boundbox drawmode too */ | ||||
| if (dt >= OB_BOUNDBOX) { | if (dt >= OB_BOUNDBOX) { | ||||
| dtx = ob->dtx; | dtx = ob->dtx; | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| if (is_wire_color & !(dflag & SELECT)) { | |||||
| setlinestyle(0); | |||||
| } | |||||
| free_old_images(); | free_old_images(); | ||||
| ED_view3d_clear_mats_rv3d(rv3d); | ED_view3d_clear_mats_rv3d(rv3d); | ||||
| Context not available. | |||||