Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_uv.c
| Show First 20 Lines • Show All 486 Lines • ▼ Show 20 Lines | if (data) { | ||||
| int *uniqueUv; | int *uniqueUv; | ||||
| data->tool = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_SMOOTH) ? | data->tool = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_SMOOTH) ? | ||||
| UV_SCULPT_TOOL_RELAX : | UV_SCULPT_TOOL_RELAX : | ||||
| ts->uvsculpt->paint.brush->uv_sculpt_tool; | ts->uvsculpt->paint.brush->uv_sculpt_tool; | ||||
| data->invert = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_INVERT) ? 1 : 0; | data->invert = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_INVERT) ? 1 : 0; | ||||
| data->uvsculpt = &ts->uvsculpt->paint; | data->uvsculpt = &ts->uvsculpt->paint; | ||||
| if (do_island_optimization) { | /* Winding was added to island detection in 5197aa04c6bd | ||||
| /* We will need island information */ | * However the sculpt tools can flip faces, potentially creating orphaned islands. | ||||
| data->elementMap = BM_uv_element_map_create(bm, scene, false, true, true); | * See T100132 */ | ||||
| } | bool use_winding = false; | ||||
| else { | data->elementMap = BM_uv_element_map_create( | ||||
| data->elementMap = BM_uv_element_map_create(bm, scene, false, true, false); | bm, scene, false, use_winding, do_island_optimization); | ||||
| } | |||||
| if (!data->elementMap) { | if (!data->elementMap) { | ||||
| uv_sculpt_stroke_exit(C, op); | uv_sculpt_stroke_exit(C, op); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /* Mouse coordinates, useful for some functions like grab and sculpt all islands */ | /* Mouse coordinates, useful for some functions like grab and sculpt all islands */ | ||||
| UI_view2d_region_to_view(®ion->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); | UI_view2d_region_to_view(®ion->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); | ||||
| ▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines | |||||