MTex *add_mtex(void) { MTex *mtex; mtex = MEM_callocN(sizeof(MTex), "add_mtex"); default_mtex(mtex); return mtex; }
static void brush_defaults(Brush *brush) { brush->blend = 0; brush->flag = 0; brush->ob_mode = OB_MODE_ALL_PAINT; /* BRUSH SCULPT TOOL SETTINGS */ brush->weight = 1.0f; /* weight of brush 0 - 1.0 */ brush->size = 35; /* radius of the brush in pixels */ brush->alpha = 0.5f; /* brush strength/intensity probably variable should be renamed? */ brush->autosmooth_factor = 0.0f; brush->crease_pinch_factor = 0.5f; brush->sculpt_plane = SCULPT_DISP_DIR_AREA; brush->plane_offset = 0.0f; /* how far above or below the plane that is found by averaging the faces */ brush->plane_trim = 0.5f; brush->clone.alpha = 0.5f; brush->normal_weight = 0.0f; brush->flag |= BRUSH_ALPHA_PRESSURE; /* BRUSH PAINT TOOL SETTINGS */ brush->rgb[0] = 1.0f; /* default rgb color of the brush when painting - white */ brush->rgb[1] = 1.0f; brush->rgb[2] = 1.0f; /* BRUSH STROKE SETTINGS */ brush->flag |= (BRUSH_SPACE | BRUSH_SPACE_ATTEN); brush->spacing = 10; /* how far each brush dot should be spaced as a percentage of brush diameter */ brush->smooth_stroke_radius = 75; brush->smooth_stroke_factor = 0.9f; brush->rate = 0.1f; /* time delay between dots of paint or sculpting when doing airbrush mode */ brush->jitter = 0.0f; /* BRUSH TEXTURE SETTINGS */ default_mtex(&brush->mtex); brush->texture_sample_bias = 0; /* value to added to texture samples */ brush->texture_overlay_alpha = 33; /* brush appearance */ brush->add_col[0] = 1.00; /* add mode color is light red */ brush->add_col[1] = 0.39; brush->add_col[2] = 0.39; brush->sub_col[0] = 0.39; /* subtract mode color is light blue */ brush->sub_col[1] = 0.39; brush->sub_col[2] = 1.00; }