Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/drawobject.c
| Context not available. | |||||
| glColor3ubv(ob_wire_col); | glColor3ubv(ob_wire_col); | ||||
| } | } | ||||
| glLineWidth(2.f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(2.f); | |||||
| } | |||||
| glDisable(GL_LIGHTING); | glDisable(GL_LIGHTING); | ||||
| glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | ||||
| Context not available. | |||||
| glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); | glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); | ||||
| glEnable(GL_LIGHTING); | glEnable(GL_LIGHTING); | ||||
| glLineWidth(1.f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(1.f); | |||||
| } | |||||
| } | } | ||||
| if ((dflag & DRAW_CONSTCOLOR) == 0) { | if ((dflag & DRAW_CONSTCOLOR) == 0) { | ||||
| Context not available. | |||||
| glDisable(GL_LIGHTING); | glDisable(GL_LIGHTING); | ||||
| UI_ThemeColor(TH_CAMERA_PATH); | UI_ThemeColor(TH_CAMERA_PATH); | ||||
| glLineWidth(2.0f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(2.0f); | |||||
| } | |||||
| glBegin(GL_LINE_STRIP); | glBegin(GL_LINE_STRIP); | ||||
| for (a = 0; a < reconstruction->camnr; a++, camera++) { | for (a = 0; a < reconstruction->camnr; a++, camera++) { | ||||
| Context not available. | |||||
| } | } | ||||
| glEnd(); | glEnd(); | ||||
| glLineWidth(1.0f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(1.0f); | |||||
| } | |||||
| glEnable(GL_LIGHTING); | glEnable(GL_LIGHTING); | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| /* 6. draw the arrays */ | /* 6. draw the arrays */ | ||||
| /* 7. clean up */ | /* 7. clean up */ | ||||
| static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, | static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, | ||||
| Base *base, ParticleSystem *psys, int ob_dt) | Base *base, ParticleSystem *psys, int ob_dt, const short dflag) | ||||
| { | { | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
| ParticleEditSettings *pset = PE_settings(scene); | ParticleEditSettings *pset = PE_settings(scene); | ||||
| Context not available. | |||||
| MEM_freeN(cdata2); | MEM_freeN(cdata2); | ||||
| /* cd2 = */ /* UNUSED */ cdata2 = NULL; | /* cd2 = */ /* UNUSED */ cdata2 = NULL; | ||||
| glLineWidth(1.0f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(1.0f); | |||||
| } | |||||
| if ((part->draw & PART_DRAW_NUM) && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { | if ((part->draw & PART_DRAW_NUM) && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { | ||||
| cache = psys->pathcache; | cache = psys->pathcache; | ||||
| Context not available. | |||||
| else | else | ||||
| glPointSize(4.0); | glPointSize(4.0); | ||||
| glLineWidth(3.0); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(3.0); | |||||
| } | |||||
| draw_particle_arrays(draw_as, totpoint, ob_dt, 1); | draw_particle_arrays(draw_as, totpoint, ob_dt, 1); | ||||
| } | } | ||||
| Context not available. | |||||
| /* restore from select */ | /* restore from select */ | ||||
| glColor3fv(ma_col); | glColor3fv(ma_col); | ||||
| glPointSize(part->draw_size ? part->draw_size : 2.0); | glPointSize(part->draw_size ? part->draw_size : 2.0); | ||||
| glLineWidth(1.0); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(1.0); | |||||
| } | |||||
| /* enable other data arrays */ | /* enable other data arrays */ | ||||
| Context not available. | |||||
| float mat[4][4]; | float mat[4][4]; | ||||
| eul_to_mat4(mat, &data->axX); | eul_to_mat4(mat, &data->axX); | ||||
| glLineWidth(4.0f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(4.0f); | |||||
| } | |||||
| setlinestyle(2); | setlinestyle(2); | ||||
| for (axis = 0; axis < 3; axis++) { | for (axis = 0; axis < 3; axis++) { | ||||
| float dir[3] = {0, 0, 0}; | float dir[3] = {0, 0, 0}; | ||||
| Context not available. | |||||
| view3d_cached_text_draw_add(v, axis_str[axis], 2, 0, V3D_CACHE_TEXT_ASCII, ob_wire_col); | view3d_cached_text_draw_add(v, axis_str[axis], 2, 0, V3D_CACHE_TEXT_ASCII, ob_wire_col); | ||||
| } | } | ||||
| } | } | ||||
| glLineWidth(1.0f); | if ((dflag & DRAW_CONSTWIDTH) == 0) { | ||||
| glLineWidth(1.0f); | |||||
| } | |||||
| setlinestyle(0); | setlinestyle(0); | ||||
| } | } | ||||
| 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(scene, 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. | |||||
| draw_motion_paths_cleanup(v3d); | draw_motion_paths_cleanup(v3d); | ||||
| } | } | ||||
| /* multiply view with object matrix. | |||||
| * local viewmat and persmat, to calculate projections */ | |||||
| ED_view3d_init_mats_rv3d_gl(ob, rv3d); | |||||
| /* which wire color */ | /* which wire color */ | ||||
| if ((dflag & DRAW_CONSTCOLOR) == 0) { | if ((dflag & DRAW_CONSTCOLOR) == 0) { | ||||
| 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) { | ||||
| copy_v3_v3_char((char *)_ob_wire_col, ob->draw_color); | |||||
| _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); | ||||
| } | } | ||||
| /* multiply view with object matrix. | |||||
| * local viewmat and persmat, to calculate projections */ | |||||
| ED_view3d_init_mats_rv3d_gl(ob, rv3d); | |||||
| /* maximum drawtype */ | /* maximum drawtype */ | ||||
| dt = v3d->drawtype; | dt = v3d->drawtype; | ||||
| if (dt == OB_RENDER) dt = OB_SOLID; | if (dt == OB_RENDER) dt = OB_SOLID; | ||||
| Context not available. | |||||
| draw_update_ptcache_edit(scene, ob, edit); | draw_update_ptcache_edit(scene, ob, edit); | ||||
| } | } | ||||
| draw_new_particle_system(scene, v3d, rv3d, base, psys, dt); | draw_new_particle_system(scene, v3d, rv3d, base, psys, dt, dflag); | ||||
| } | } | ||||
| invert_m4_m4(ob->imat, ob->obmat); | invert_m4_m4(ob->imat, ob->obmat); | ||||
| view3d_cached_text_draw_end(v3d, ar, 0, NULL); | view3d_cached_text_draw_end(v3d, ar, 0, NULL); | ||||
| Context not available. | |||||