Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
| Show First 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | static void options_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | ||||
| const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | ||||
| const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetEnabled(layout, !is_baked); | uiLayoutSetEnabled(layout, !is_baked); | ||||
| if (use_cache && !is_first) { | if (use_cache && !is_first) { | ||||
| uiItemL(layout, "Cached from the first line art modifier.", ICON_INFO); | uiItemL(layout, TIP_("Cached from the first line art modifier"), ICON_INFO); | ||||
| return; | return; | ||||
| } | } | ||||
| uiLayout *row = uiLayoutRowWithHeading(layout, false, IFACE_("Custom Camera")); | uiLayout *row = uiLayoutRowWithHeading(layout, false, IFACE_("Custom Camera")); | ||||
| uiItemR(row, ptr, "use_custom_camera", 0, "", 0); | uiItemR(row, ptr, "use_custom_camera", 0, "", 0); | ||||
| uiLayout *subrow = uiLayoutRow(row, true); | uiLayout *subrow = uiLayoutRow(row, true); | ||||
| uiLayoutSetActive(subrow, RNA_boolean_get(ptr, "use_custom_camera")); | uiLayoutSetActive(subrow, RNA_boolean_get(ptr, "use_custom_camera")); | ||||
| uiLayoutSetPropSep(subrow, true); | uiLayoutSetPropSep(subrow, true); | ||||
| Show All 34 Lines | static void occlusion_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool use_multiple_levels = RNA_boolean_get(ptr, "use_multiple_levels"); | const bool use_multiple_levels = RNA_boolean_get(ptr, "use_multiple_levels"); | ||||
| const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front"); | const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front"); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetEnabled(layout, !is_baked); | uiLayoutSetEnabled(layout, !is_baked); | ||||
| if (!show_in_front) { | if (!show_in_front) { | ||||
| uiItemL(layout, IFACE_("Object is not in front"), ICON_INFO); | uiItemL(layout, TIP_("Object is not in front"), ICON_INFO); | ||||
| } | } | ||||
| layout = uiLayoutColumn(layout, false); | layout = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetActive(layout, show_in_front); | uiLayoutSetActive(layout, show_in_front); | ||||
| uiItemR(layout, ptr, "use_multiple_levels", 0, IFACE_("Range"), ICON_NONE); | uiItemR(layout, ptr, "use_multiple_levels", 0, IFACE_("Range"), ICON_NONE); | ||||
| if (use_multiple_levels) { | if (use_multiple_levels) { | ||||
| ▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | static void face_mark_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | ||||
| const bool use_mark = RNA_boolean_get(ptr, "use_face_mark"); | const bool use_mark = RNA_boolean_get(ptr, "use_face_mark"); | ||||
| const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | ||||
| const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | ||||
| uiLayoutSetEnabled(layout, !is_baked); | uiLayoutSetEnabled(layout, !is_baked); | ||||
| if (use_cache && !is_first) { | if (use_cache && !is_first) { | ||||
| uiItemL(layout, "Cached from the first line art modifier.", ICON_INFO); | uiItemL(layout, TIP_("Cached from the first line art modifier"), ICON_INFO); | ||||
| return; | return; | ||||
| } | } | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetActive(layout, use_mark); | uiLayoutSetActive(layout, use_mark); | ||||
| uiItemR(layout, ptr, "use_face_mark_invert", 0, NULL, ICON_NONE); | uiItemR(layout, ptr, "use_face_mark_invert", 0, NULL, ICON_NONE); | ||||
| Show All 11 Lines | static void chaining_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | ||||
| const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | ||||
| const bool is_geom = RNA_boolean_get(ptr, "use_geometry_space_chain"); | const bool is_geom = RNA_boolean_get(ptr, "use_geometry_space_chain"); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetEnabled(layout, !is_baked); | uiLayoutSetEnabled(layout, !is_baked); | ||||
| if (use_cache && !is_first) { | if (use_cache && !is_first) { | ||||
| uiItemL(layout, "Cached from the first line art modifier.", ICON_INFO); | uiItemL(layout, TIP_("Cached from the first line art modifier"), ICON_INFO); | ||||
| return; | return; | ||||
| } | } | ||||
| uiLayout *col = uiLayoutColumnWithHeading(layout, true, IFACE_("Chain")); | uiLayout *col = uiLayoutColumnWithHeading(layout, true, IFACE_("Chain")); | ||||
| uiItemR(col, ptr, "use_fuzzy_intersections", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "use_fuzzy_intersections", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, ptr, "use_fuzzy_all", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "use_fuzzy_all", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, ptr, "use_loose_edge_chain", 0, IFACE_("Loose Edges"), ICON_NONE); | uiItemR(col, ptr, "use_loose_edge_chain", 0, IFACE_("Loose Edges"), ICON_NONE); | ||||
| uiItemR(col, ptr, "use_loose_as_contour", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "use_loose_as_contour", 0, NULL, ICON_NONE); | ||||
| Show All 20 Lines | static void vgroup_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | ||||
| const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | const bool use_cache = RNA_boolean_get(ptr, "use_cache"); | ||||
| const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiLayoutSetEnabled(layout, !is_baked); | uiLayoutSetEnabled(layout, !is_baked); | ||||
| if (use_cache && !is_first) { | if (use_cache && !is_first) { | ||||
| uiItemL(layout, "Cached from the first line art modifier.", ICON_INFO); | uiItemL(layout, TIP_("Cached from the first line art modifier"), ICON_INFO); | ||||
| return; | return; | ||||
| } | } | ||||
| uiLayout *col = uiLayoutColumn(layout, true); | uiLayout *col = uiLayoutColumn(layout, true); | ||||
| uiLayout *row = uiLayoutRow(col, true); | uiLayout *row = uiLayoutRow(col, true); | ||||
| uiItemR(row, ptr, "source_vertex_group", 0, IFACE_("Filter Source"), ICON_GROUP_VERTEX); | uiItemR(row, ptr, "source_vertex_group", 0, IFACE_("Filter Source"), ICON_GROUP_VERTEX); | ||||
| Show All 16 Lines | static void bake_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | const bool is_baked = RNA_boolean_get(ptr, "is_baked"); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| if (is_baked) { | if (is_baked) { | ||||
| uiLayout *col = uiLayoutColumn(layout, false); | uiLayout *col = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetPropSep(col, false); | uiLayoutSetPropSep(col, false); | ||||
| uiItemL(col, IFACE_("Modifier has baked data"), ICON_NONE); | uiItemL(col, TIP_("Modifier has baked data"), ICON_NONE); | ||||
| uiItemR( | uiItemR( | ||||
| col, ptr, "is_baked", UI_ITEM_R_TOGGLE, IFACE_("Continue Without Clearing"), ICON_NONE); | col, ptr, "is_baked", UI_ITEM_R_TOGGLE, IFACE_("Continue Without Clearing"), ICON_NONE); | ||||
| } | } | ||||
| uiLayout *col = uiLayoutColumn(layout, false); | uiLayout *col = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetEnabled(col, !is_baked); | uiLayoutSetEnabled(col, !is_baked); | ||||
| uiItemO(col, NULL, ICON_NONE, "OBJECT_OT_lineart_bake_strokes"); | uiItemO(col, NULL, ICON_NONE, "OBJECT_OT_lineart_bake_strokes"); | ||||
| uiItemO(col, NULL, ICON_NONE, "OBJECT_OT_lineart_bake_strokes_all"); | uiItemO(col, NULL, ICON_NONE, "OBJECT_OT_lineart_bake_strokes_all"); | ||||
| Show All 13 Lines | static void composition_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front"); | const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front"); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiItemR(layout, ptr, "overscan", 0, NULL, ICON_NONE); | uiItemR(layout, ptr, "overscan", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, ptr, "use_image_boundary_trimming", 0, NULL, ICON_NONE); | uiItemR(layout, ptr, "use_image_boundary_trimming", 0, NULL, ICON_NONE); | ||||
| if (show_in_front) { | if (show_in_front) { | ||||
| uiItemL(layout, IFACE_("Object is shown in front"), ICON_ERROR); | uiItemL(layout, TIP_("Object is shown in front"), ICON_ERROR); | ||||
| } | } | ||||
| uiLayout *col = uiLayoutColumn(layout, false); | uiLayout *col = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetActive(col, !show_in_front); | uiLayoutSetActive(col, !show_in_front); | ||||
| uiItemR(col, ptr, "stroke_depth_offset", UI_ITEM_R_SLIDER, IFACE_("Depth Offset"), ICON_NONE); | uiItemR(col, ptr, "stroke_depth_offset", UI_ITEM_R_SLIDER, IFACE_("Depth Offset"), ICON_NONE); | ||||
| uiItemR( | uiItemR( | ||||
| col, ptr, "use_offset_towards_custom_camera", 0, IFACE_("Towards Custom Camera"), ICON_NONE); | col, ptr, "use_offset_towards_custom_camera", 0, IFACE_("Towards Custom Camera"), ICON_NONE); | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||