Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_data.c
| Show First 20 Lines • Show All 875 Lines • ▼ Show 20 Lines | RNA_def_int(ot->srna, | ||||
| 1, | 1, | ||||
| INT_MAX, | INT_MAX, | ||||
| "Limit", | "Limit", | ||||
| "Number of points to consider stroke as loose", | "Number of points to consider stroke as loose", | ||||
| 1, | 1, | ||||
| INT_MAX); | INT_MAX); | ||||
| } | } | ||||
| /* ********************* Clean Duplicated Frames ************************** */ | /* ********************* Clean Duplicate Frames ************************** */ | ||||
| static bool gpencil_frame_is_equal(const bGPDframe *gpf_a, const bGPDframe *gpf_b) | static bool gpencil_frame_is_equal(const bGPDframe *gpf_a, const bGPDframe *gpf_b) | ||||
| { | { | ||||
| if ((gpf_a == NULL) || (gpf_b == NULL)) { | if ((gpf_a == NULL) || (gpf_b == NULL)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* If the number of strokes is different, cannot be equal. */ | /* If the number of strokes is different, cannot be equal. */ | ||||
| const int totstrokes_a = BLI_listbase_count(&gpf_a->strokes); | const int totstrokes_a = BLI_listbase_count(&gpf_a->strokes); | ||||
| const int totstrokes_b = BLI_listbase_count(&gpf_b->strokes); | const int totstrokes_b = BLI_listbase_count(&gpf_b->strokes); | ||||
| ▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| static const EnumPropertyItem clean_type[] = { | static const EnumPropertyItem clean_type[] = { | ||||
| {0, "ALL", 0, "All Frames", ""}, | {0, "ALL", 0, "All Frames", ""}, | ||||
| {1, "SELECTED", 0, "Selected Frames", ""}, | {1, "SELECTED", 0, "Selected Frames", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Clean Duplicated Frames"; | ot->name = "Clean Duplicate Frames"; | ||||
| ot->idname = "GPENCIL_OT_frame_clean_duplicate"; | ot->idname = "GPENCIL_OT_frame_clean_duplicate"; | ||||
| ot->description = "Remove any duplicated frame"; | ot->description = "Remove duplicate keyframes"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->exec = gpencil_frame_clean_duplicate_exec; | ot->exec = gpencil_frame_clean_duplicate_exec; | ||||
| ot->poll = gpencil_active_layer_poll; | ot->poll = gpencil_active_layer_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| ▲ Show 20 Lines • Show All 2,894 Lines • Show Last 20 Lines | |||||