Merge branch 'refactor-mesh-position-generic' into refactor-mesh-corners-generic

This commit is contained in:
Hans Goudey 2023-01-01 14:46:24 -05:00
commit 83682536d2
4 changed files with 9 additions and 7 deletions

View File

@ -326,7 +326,7 @@ class GPENCIL_MT_cleanup(Menu):
layout.separator()
layout.operator("gpencil.frame_clean_duplicate", text="Delete Duplicated Frames")
layout.operator("gpencil.frame_clean_duplicate", text="Delete Duplicate Frames")
layout.operator("gpencil.recalc_geometry", text="Recalculate Geometry")
if ob.mode != 'PAINT_GPENCIL':
layout.operator("gpencil.reproject")

View File

@ -238,8 +238,7 @@ class DOPESHEET_HT_editor_buttons:
# Layer management
if st.mode == 'GPENCIL':
ob = context.active_object
selected = st.dopesheet.show_only_selected
enable_but = selected and ob is not None and ob.type == 'GPENCIL'
enable_but = ob is not None and ob.type == 'GPENCIL'
row = layout.row(align=True)
row.enabled = enable_but

View File

@ -881,7 +881,7 @@ void GPENCIL_OT_frame_clean_loose(wmOperatorType *ot)
INT_MAX);
}
/* ********************* Clean Duplicated Frames ************************** */
/* ********************* Clean Duplicate Frames ************************** */
static bool gpencil_frame_is_equal(const bGPDframe *gpf_a, const bGPDframe *gpf_b)
{
if ((gpf_a == NULL) || (gpf_b == NULL)) {
@ -1015,9 +1015,9 @@ void GPENCIL_OT_frame_clean_duplicate(wmOperatorType *ot)
};
/* identifiers */
ot->name = "Clean Duplicated Frames";
ot->name = "Clean Duplicate Frames";
ot->idname = "GPENCIL_OT_frame_clean_duplicate";
ot->description = "Remove any duplicated frame";
ot->description = "Remove duplicate keyframes";
/* callbacks */
ot->exec = gpencil_frame_clean_duplicate_exec;

View File

@ -222,7 +222,8 @@ static void geom_add_polygon(Geometry *geom,
else {
geom->track_vertex_index(corner.vert_index);
}
if (got_uv) {
/* Ignore UV index, if the geometry does not have any UVs (T103212). */
if (got_uv && !global_vertices.uv_vertices.is_empty()) {
corner.uv_vert_index += corner.uv_vert_index < 0 ? global_vertices.uv_vertices.size() : -1;
if (corner.uv_vert_index < 0 || corner.uv_vert_index >= global_vertices.uv_vertices.size()) {
fprintf(stderr,
@ -251,6 +252,8 @@ static void geom_add_polygon(Geometry *geom,
geom->face_corners_.append(corner);
curr_face.corner_count_++;
/* Some files contain extra stuff per face (e.g. 4 indices); skip any remainder (T103441). */
p = drop_non_whitespace(p, end);
/* Skip whitespace to get to the next face corner. */
p = drop_whitespace(p, end);
}