move draw all edges into the object settings (object panel), makes more sense here since its next to draw extra wire

This commit is contained in:
Campbell Barton 2013-01-18 19:01:26 +00:00
parent a08a3ab931
commit 5f9ea0d7eb
10 changed files with 46 additions and 43 deletions

@ -230,6 +230,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
col.prop(ob, "show_x_ray", text="X-Ray")
if ob.type == 'MESH':
col.prop(ob, "show_transparent", text="Transparency")
col.prop(ob, "show_all_edges")
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):

@ -2382,9 +2382,6 @@ class VIEW3D_PT_view3d_display(Panel):
col.prop(view, "show_outline_selected")
col.prop(view, "show_all_objects_origin")
col.prop(view, "show_relationship_lines")
if ob and ob.type == 'MESH':
mesh = ob.data
col.prop(mesh, "show_all_edges")
col = layout.column()
col.active = display_all

@ -206,7 +206,7 @@ static int check_ob_drawface_dot(Scene *sce, View3D *vd, char dt)
/* check for glsl drawing */
int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, const short dt)
int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, const char dt)
{
if (!GPU_glsl_support())
return 0;
@ -1077,7 +1077,7 @@ static void draw_transp_spot_volume(Lamp *la, float x, float z)
}
static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
const short dt, const short dflag, const unsigned char ob_wire_col[4])
const char dt, const short dflag, const unsigned char ob_wire_col[4])
{
Object *ob = base->object;
const float pixsize = ED_view3d_pixel_size(rv3d, ob->obmat[3]);
@ -2820,7 +2820,7 @@ static DMDrawOption draw_em_fancy__setGLSLFaceOpts(void *userData, int index)
}
static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
Object *ob, BMEditMesh *em, DerivedMesh *cageDM, DerivedMesh *finalDM, const short dt)
Object *ob, BMEditMesh *em, DerivedMesh *cageDM, DerivedMesh *finalDM, const char dt)
{
Mesh *me = ob->data;
@ -3026,7 +3026,7 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm)
}
static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, Base *base,
const short dt, const unsigned char ob_wire_col[4], const short dflag)
const char dt, const unsigned char ob_wire_col[4], const short dflag)
{
Object *ob = base->object;
Mesh *me = ob->data;
@ -3235,7 +3235,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glDepthMask(0); /* disable write in zbuffer, selected edge wires show better */
}
dm->drawEdges(dm, (dt == OB_WIRE || totface == 0), me->drawflag & ME_ALLEDGES);
dm->drawEdges(dm, (dt == OB_WIRE || totface == 0), (ob->dtx & OB_DRAW_ALL_EDGES));
if (dt != OB_WIRE && (draw_wire == OBDRAW_WIRE_ON_DEPTH)) {
glDepthMask(1);
@ -3261,7 +3261,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
/* returns 1 if nothing was drawn, for detecting to draw an object center */
static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, Base *base,
const short dt, const unsigned char ob_wire_col[4], const short dflag)
const char dt, const unsigned char ob_wire_col[4], const short dflag)
{
Object *ob = base->object;
Object *obedit = scene->obedit;
@ -3583,7 +3583,7 @@ static void drawCurveDMWired(Object *ob)
}
/* return 1 when nothing was drawn */
static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, const short dt)
static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, const char dt)
{
Object *ob = base->object;
DerivedMesh *dm = ob->derivedFinal;
@ -3619,7 +3619,7 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B
* \return 1 when nothing was drawn
*/
static int drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
const short dt, const short dflag, const unsigned char ob_wire_col[4])
const char dt, const short dflag, const unsigned char ob_wire_col[4])
{
Object *ob = base->object;
ListBase *lb = NULL;
@ -3745,7 +3745,7 @@ static int drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3d
return FALSE;
}
static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
const short dt, const short dflag, const unsigned char ob_wire_col[4])
const char dt, const short dflag, const unsigned char ob_wire_col[4])
{
int retval;
@ -5262,7 +5262,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
}
static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, Nurb *nurb,
const short dt, const short dflag, const unsigned char ob_wire_col[4])
const char dt, const short dflag, const unsigned char ob_wire_col[4])
{
ToolSettings *ts = scene->toolsettings;
Object *ob = base->object;
@ -5591,7 +5591,7 @@ static void drawcone(const float vec[3], float radius, float height, float tmat[
}
/* return TRUE if nothing was drawn */
static int drawmball(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
const short dt, const short dflag, const unsigned char ob_wire_col[4])
const char dt, const short dflag, const unsigned char ob_wire_col[4])
{
Object *ob = base->object;
MetaBall *mb;
@ -6240,7 +6240,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
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 */
int i, selstart, selend, empty_object = 0;
short dt, dtx, zbufoff = 0;
short dtx;
char dt;
short zbufoff = 0;
const short is_obact = (ob == OBACT);
/* only once set now, will be removed too, should become a global standard */
@ -6754,7 +6756,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
if (ob->gameflag & OB_BOUNDS) {
if (ob->boundtype != ob->collision_boundtype || (dtx & OB_BOUNDBOX) == 0) {
if (ob->boundtype != ob->collision_boundtype || (dtx & OB_DRAWBOUNDOX) == 0) {
setlinestyle(2);
draw_bounding_volume(scene, ob, ob->collision_boundtype);
@ -6768,7 +6770,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if (dtx & OB_AXIS) {
drawaxes(1.0f, OB_ARROWS);
}
if (dtx & OB_BOUNDBOX) {
if (dtx & OB_DRAWBOUNDOX) {
draw_bounding_volume(scene, ob, ob->boundtype);
}
if (dtx & OB_TEXSPACE) {
@ -7251,7 +7253,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r
if (dm) dm->release(dm);
}
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, const short dt, int outline)
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, const char dt, int outline)
{
if (ob == NULL)
return;

@ -1927,7 +1927,8 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
BoundBox bb, *bb_tmp; /* use a copy because draw_object, calls clear_mesh_caches */
GLuint displist = 0;
short transflag, use_displist = -1; /* -1 is initialize */
char dt, dtx;
char dt;
short dtx;
if (base->object->restrictflag & OB_RESTRICT_VIEW) return;

@ -119,8 +119,8 @@ void draw_motion_paths_cleanup(View3D *v3d);
/* drawobject.c */
void draw_object(Scene *scene, struct ARegion *ar, View3D *v3d, Base *base, const short dflag);
int draw_glsl_material(Scene *scene, struct Object *ob, View3D *v3d, const short dt);
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob, const short dt, int outline);
int draw_glsl_material(Scene *scene, struct Object *ob, View3D *v3d, const char dt);
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob, const char dt, int outline);
void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob);
void drawaxes(float size, char drawtype);

@ -879,7 +879,8 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
ARegion *ar = vc->ar;
rctf rect;
short code, hits;
char dt, dtx;
char dt;
short dtx;
G.f |= G_PICKSEL;

@ -186,7 +186,7 @@ typedef struct TFace {
#define ME_DRAWNORMALS (1 << 2)
#define ME_DRAW_VNORMALS (1 << 3)
#define ME_ALLEDGES (1 << 4)
// #define ME_ALLEDGES (1 << 4)
#define ME_HIDDENEDGES (1 << 5)
#define ME_DRAWCREASES (1 << 6)

@ -218,10 +218,8 @@ typedef struct Object {
char boundtype; /* bounding box use for drawing */
char collision_boundtype; /* bounding box type used for collision */
char restrictflag; /* for restricting view, select, render etc. accessible in outliner */
short dtx; /* viewport draw extra settings */
char dt; /* viewport draw type */
char dtx; /* viewport draw extra settings */
char empty_drawtype;
float empty_drawsize;
float dupfacesca; /* dupliface scale */
@ -241,8 +239,9 @@ typedef struct Object {
struct BulletSoftBody *bsoft; /* settings for game engine bullet soft body */
char restrictflag; /* for restricting view, select, render etc. accessible in outliner */
char recalc; /* dependency flag */
short softflag; /* softbody settings */
short recalc; /* dependency flag */
float anisotropicFriction[3];
ListBase constraints; /* object constraints */
@ -406,17 +405,19 @@ typedef struct DupliObject {
#define OB_PAINT 100 /* temporary used in draw code */
/* dtx: flags, char! */
#define OB_AXIS 2
#define OB_TEXSPACE 4
#define OB_DRAWNAME 8
#define OB_DRAWIMAGE 16
/* dtx: flags (short) */
#define OB_DRAWBOUNDOX (1 << 0)
#define OB_AXIS (1 << 1)
#define OB_TEXSPACE (1 << 2)
#define OB_DRAWNAME (1 << 3)
#define OB_DRAWIMAGE (1 << 4)
/* for solid+wire display */
#define OB_DRAWWIRE 32
/* for overdraw */
#define OB_DRAWXRAY 64
#define OB_DRAWWIRE (1 << 5)
/* for overdraw s*/
#define OB_DRAWXRAY (1 << 6)
/* enable transparent draw */
#define OB_DRAWTRANSP 128
#define OB_DRAWTRANSP (1 << 7)
#define OB_DRAW_ALL_EDGES (1 << 8) /* only for meshes currently */
/* empty_drawtype: no flags */
#define OB_ARROWS 1

@ -2900,11 +2900,6 @@ static void rna_def_mesh(BlenderRNA *brna)
"Display selected edges using highlights in the 3D view and UV editor");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop = RNA_def_property(srna, "show_all_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_ALLEDGES);
RNA_def_property_ui_text(prop, "All Edges", "Display all edges for wireframe in all view modes in the 3D view");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
RNA_def_property_ui_text(prop, "Draw Faces", "Display all faces as shades in the 3D view and UV editor");

@ -2557,7 +2557,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
prop = RNA_def_property(srna, "show_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_BOUNDBOX);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWBOUNDOX);
RNA_def_property_ui_text(prop, "Draw Bounds", "Display the object's bounds");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
@ -2586,7 +2586,12 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWWIRE);
RNA_def_property_ui_text(prop, "Draw Wire", "Add the object's wireframe over solid drawing");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
prop = RNA_def_property(srna, "show_all_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAW_ALL_EDGES);
RNA_def_property_ui_text(prop, "Draw All Edges", "Display all edges for mesh objects");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
prop = RNA_def_property(srna, "show_transparent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWTRANSP);
RNA_def_property_ui_text(prop, "Draw Transparent",