2.6 Code removal:

* Deleted some #if 0 code, which was either already replaced or won't come back.
This commit is contained in:
Thomas Dinges 2011-11-24 17:19:38 +00:00
parent 0c965e16ac
commit fc77949b5d
3 changed files with 0 additions and 188 deletions

@ -377,37 +377,6 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad)
glDisable( GL_LINE_SMOOTH );
}
/* plain fake antialiased unfilled round rectangle */
#if 0 /* UNUSED 2.5 */
static void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
{
float color[4], alpha;
float raddiff;
int i, passes=4;
/* get the color and divide up the alpha */
glGetFloatv(GL_CURRENT_COLOR, color);
alpha = 1; //color[3];
color[3]= 0.5*alpha/(float)passes;
glColor4fv(color);
/* set the 'jitter amount' */
raddiff = (1/(float)passes) * asp;
glEnable( GL_BLEND );
/* draw lots of lines on top of each other */
for (i=passes; i>=(-passes); i--) {
uiDrawBox(GL_LINE_LOOP, minx, miny, maxx, maxy, rad+(i*raddiff));
}
glDisable( GL_BLEND );
color[3] = alpha;
glColor4fv(color);
}
#endif
/* (old, used in outliner) plain antialiased filled box */
void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad)
{

@ -1365,142 +1365,6 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3
}
#endif
#if 0 // XXX not used
static void delete_sketch_armature(bContext *C, void *arg1, void *arg2)
{
BIF_deleteSketch(C);
}
static void convert_sketch_armature(bContext *C, void *arg1, void *arg2)
{
BIF_convertSketch(C);
}
static void assign_template_sketch_armature(bContext *C, void *arg1, void *arg2)
{
int index = *(int*)arg1;
BIF_setTemplate(C, index);
}
static int view3d_panel_bonesketch_spaces_poll(const bContext *C, PanelType *pt)
{
Object *obedit = CTX_data_edit_object(C);
/* replace with check call to sketching lib */
return (obedit && obedit->type == OB_ARMATURE);
}
static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
{
Scene *scene = CTX_data_scene(C);
static int template_index;
static char joint_label[128];
uiBlock *block;
uiBut *but;
char *bone_name;
int yco = 130;
int nb_joints;
static char subdiv_tooltip[4][64] = {
"Subdivide arcs based on a fixed number of bones",
"Subdivide arcs in bones of equal length",
"Subdivide arcs based on correlation",
"Retarget template to stroke"
};
block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
uiBlockBeginAlign(block);
/* use real flag instead of 1 */
uiDefButBitC(block, TOG, BONE_SKETCHING, B_REDR, "Use Bone Sketching", 10, yco, 160, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Use sketching to create and edit bones, (Ctrl snaps to mesh volume)");
uiDefButBitC(block, TOG, BONE_SKETCHING_ADJUST, B_REDR, "A", 170, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Adjust strokes by drawing near them");
uiDefButBitC(block, TOG, BONE_SKETCHING_QUICK, B_REDR, "Q", 190, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Automatically convert and delete on stroke end");
yco -= 20;
but = uiDefBut(block, BUT, B_REDR, "Convert", 10,yco,100,20, 0, 0, 0, 0, 0, "Convert sketch to armature");
uiButSetFunc(but, convert_sketch_armature, NULL, NULL);
but = uiDefBut(block, BUT, B_REDR, "Delete", 110,yco,100,20, 0, 0, 0, 0, 0, "Delete sketch");
uiButSetFunc(but, delete_sketch_armature, NULL, NULL);
yco -= 20;
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefButC(block, MENU, B_REDR, "Subdivision Method%t|Length%x1|Adaptative%x2|Fixed%x0|Template%x3", 10,yco,60,19, &scene->toolsettings->bone_sketching_convert, 0, 0, 0, 0, subdiv_tooltip[(unsigned char)scene->toolsettings->bone_sketching_convert]);
switch(scene->toolsettings->bone_sketching_convert)
{
case SK_CONVERT_CUT_LENGTH:
uiDefButF(block, NUM, B_REDR, "Lim:", 70, yco, 140, 19, &scene->toolsettings->skgen_length_limit,0.1,50.0, 10, 0, "Maximum length of the subdivided bones");
yco -= 20;
break;
case SK_CONVERT_CUT_ADAPTATIVE:
uiDefButF(block, NUM, B_REDR, "Thres:", 70, yco, 140, 19, &scene->toolsettings->skgen_correlation_limit,0.0, 1.0, 0.01, 0, "Correlation threshold for subdivision");
yco -= 20;
break;
default:
case SK_CONVERT_CUT_FIXED:
uiDefButC(block, NUM, B_REDR, "Num:", 70, yco, 140, 19, &scene->toolsettings->skgen_subdivision_number,1, 100, 1, 5, "Number of subdivided bones");
yco -= 20;
break;
case SK_CONVERT_RETARGET:
uiDefButC(block, ROW, B_NOP, "No", 70, yco, 40,19, &scene->toolsettings->skgen_retarget_roll, 0, 0, 0, 0, "No special roll treatment");
uiDefButC(block, ROW, B_NOP, "View", 110, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_VIEW, 0, 0, "Roll bones perpendicular to view");
uiDefButC(block, ROW, B_NOP, "Joint", 160, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_JOINT, 0, 0, "Roll bones relative to joint bend");
yco -= 30;
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
/* button here to select what to do (copy or not), template, ...*/
BIF_makeListTemplates(C);
template_index = BIF_currentTemplate(C);
but = uiDefButI(block, MENU, B_REDR, BIF_listTemplates(C), 10,yco,200,19, &template_index, 0, 0, 0, 0, "Template");
uiButSetFunc(but, assign_template_sketch_armature, &template_index, NULL);
yco -= 20;
uiDefButF(block, NUM, B_NOP, "A:", 10, yco, 66,19, &scene->toolsettings->skgen_retarget_angle_weight, 0, 10, 1, 0, "Angle Weight");
uiDefButF(block, NUM, B_NOP, "L:", 76, yco, 67,19, &scene->toolsettings->skgen_retarget_length_weight, 0, 10, 1, 0, "Length Weight");
uiDefButF(block, NUM, B_NOP, "D:", 143,yco, 67,19, &scene->toolsettings->skgen_retarget_distance_weight, 0, 10, 1, 0, "Distance Weight");
yco -= 20;
uiDefBut(block, TEX,B_REDR,"S:", 10, yco, 90, 20, scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace &S with");
uiDefBut(block, TEX,B_REDR,"N:", 100, yco, 90, 20, scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace &N with");
uiDefIconButBitC(block, TOG, SK_RETARGET_AUTONAME, B_NOP, ICON_AUTO,190,yco,20,20, &scene->toolsettings->skgen_retarget_options, 0, 0, 0, 0, "Use Auto Naming");
yco -= 20;
/* auto renaming magic */
uiBlockEndAlign(block);
nb_joints = BIF_nbJointsTemplate(C);
if (nb_joints == -1)
{
//XXX
//nb_joints = G.totvertsel;
}
bone_name = BIF_nameBoneTemplate(C);
BLI_snprintf(joint_label, 32, "%i joints: %s", nb_joints, bone_name);
uiDefBut(block, LABEL, 1, joint_label, 10, yco, 200, 20, NULL, 0.0, 0.0, 0, 0, "");
yco -= 20;
break;
}
uiBlockEndAlign(block);
}
#endif // XXX not used
void view3d_buttons_register(ARegionType *art)
{
PanelType *pt;

@ -2789,27 +2789,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
/* JPEG and AVI JPEG */
#if 0 /* moved */
prop= RNA_def_property(srna, "file_quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies, compression for PNG's");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
/* Tiff */
#if 0 /* replaced, use generic */
prop= def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
#ifdef WITH_QUICKTIME
/* QuickTime */