Home
last modified time | relevance | path

Searched refs:gp_style (Results 1 – 25 of 40) sorted by relevance

12

/dports/graphics/blender/blender-2.91.0/source/blender/draw/engines/gpencil/
H A Dgpencil_draw_data.c123 gp_style = &gp_style_tmp; in gpencil_viewport_material_overrides()
128 memcpy(&gp_style_tmp, gp_style, sizeof(*gp_style)); in gpencil_viewport_material_overrides()
129 gp_style = &gp_style_tmp; in gpencil_viewport_material_overrides()
130 if ((gp_style->stroke_style == GP_MATERIAL_STROKE_STYLE_TEXTURE) && (gp_style->sima)) { in gpencil_viewport_material_overrides()
135 if ((gp_style->fill_style == GP_MATERIAL_FILL_STYLE_TEXTURE) && (gp_style->ima)) { in gpencil_viewport_material_overrides()
145 gp_style = &gp_style_tmp; in gpencil_viewport_material_overrides()
150 copy_v4_v4(gp_style->stroke_rgba, gp_style->fill_rgba); in gpencil_viewport_material_overrides()
154 gp_style = &gp_style_tmp; in gpencil_viewport_material_overrides()
171 return gp_style; in gpencil_viewport_material_overrides()
248 gp_style = gpencil_viewport_material_overrides(pd, ob, color_type, gp_style); in gpencil_material_pool_create()
[all …]
H A Dgpencil_cache_utils.c64 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, i + 1); in gpencil_object_cache_add() local
65 if ((gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT) || in gpencil_object_cache_add()
66 ((gp_style->flag & GP_MATERIAL_IS_FILL_HOLDOUT))) { in gpencil_object_cache_add()
H A Dgpencil_engine.c488 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(iter->ob, gps->mat_nr + 1); in gpencil_stroke_cache_populate() local
491 bool hide_material = (gp_style->flag & GP_MATERIAL_HIDE) != 0; in gpencil_stroke_cache_populate()
492 bool show_stroke = ((gp_style->flag & GP_MATERIAL_STROKE_SHOW) != 0) || in gpencil_stroke_cache_populate()
494 bool show_fill = (gps->tot_triangles > 0) && ((gp_style->flag & GP_MATERIAL_FILL_SHOW) != 0) && in gpencil_stroke_cache_populate()
499 ((gp_style->flag & GP_MATERIAL_HIDE_ONIONSKIN) != 0); in gpencil_stroke_cache_populate()
/dports/graphics/blender/blender-2.91.0/source/blender/editors/gpencil/
H A Dgpencil_ops_versioning.c127 MaterialGPencilStyle *gp_style = ma->gp_style; in gpencil_convert_old_files_exec() local
128 copy_v4_v4(gp_style->stroke_rgba, palcolor->color); in gpencil_convert_old_files_exec()
129 copy_v4_v4(gp_style->fill_rgba, palcolor->fill); in gpencil_convert_old_files_exec()
132 gp_style->gradient_radius = 0.5f; in gpencil_convert_old_files_exec()
133 ARRAY_SET_ITEMS(gp_style->mix_rgba, 1.0f, 1.0f, 1.0f, 0.2f); in gpencil_convert_old_files_exec()
134 ARRAY_SET_ITEMS(gp_style->gradient_scale, 1.0f, 1.0f); in gpencil_convert_old_files_exec()
135 ARRAY_SET_ITEMS(gp_style->texture_scale, 1.0f, 1.0f); in gpencil_convert_old_files_exec()
136 gp_style->texture_pixsize = 100.0f; in gpencil_convert_old_files_exec()
138 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in gpencil_convert_old_files_exec()
139 gp_style->flag |= GP_MATERIAL_FILL_SHOW; in gpencil_convert_old_files_exec()
H A Dgpencil_vertex_ops.c523 if (gp_style == NULL) { in gpencil_extract_palette_from_vertex()
604 switch (gp_style->mode) { in get_material_type()
625 switch (gp_style->mode) { in get_material_type()
653 r_i += gp_style->stroke_rgba[3] * 1e7; in get_material_type()
656 r_i += gp_style->fill_rgba[3] * 1e3; in get_material_type()
713 if (gp_style == NULL) { in gpencil_material_to_vertex_exec()
720 (gp_style->fill_rgba[3] > 0.0f)); in gpencil_material_to_vertex_exec()
769 ma->gp_style->flag |= GP_MATERIAL_FILL_SHOW; in gpencil_material_to_vertex_exec()
772 ma->gp_style->flag &= ~GP_MATERIAL_FILL_SHOW; in gpencil_material_to_vertex_exec()
775 ma->gp_style->stroke_rgba[3] = gp_style->stroke_rgba[3]; in gpencil_material_to_vertex_exec()
[all …]
H A Dgpencil_add_stroke.c71 copy_v4_v4(ma->gp_style->stroke_rgba, pct->line); in gpencil_stroke_material()
72 srgb_to_linearrgb_v4(ma->gp_style->stroke_rgba, ma->gp_style->stroke_rgba); in gpencil_stroke_material()
74 copy_v4_v4(ma->gp_style->fill_rgba, pct->fill); in gpencil_stroke_material()
75 srgb_to_linearrgb_v4(ma->gp_style->fill_rgba, ma->gp_style->fill_rgba); in gpencil_stroke_material()
78 ma->gp_style->flag |= GP_MATERIAL_FILL_SHOW; in gpencil_stroke_material()
H A Dgpencil_trace_utils.c262 MaterialGPencilStyle *gp_style = mat_gp->gp_style; in ED_gpencil_trace_data_to_strokes() local
264 copy_v4_v4(gp_style->stroke_rgba, default_color); in ED_gpencil_trace_data_to_strokes()
265 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in ED_gpencil_trace_data_to_strokes()
266 gp_style->flag |= GP_MATERIAL_FILL_SHOW; in ED_gpencil_trace_data_to_strokes()
273 MaterialGPencilStyle *gp_style = mat_gp->gp_style; in ED_gpencil_trace_data_to_strokes() local
275 copy_v4_v4(gp_style->stroke_rgba, default_color); in ED_gpencil_trace_data_to_strokes()
276 copy_v4_v4(gp_style->fill_rgba, default_color); in ED_gpencil_trace_data_to_strokes()
277 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in ED_gpencil_trace_data_to_strokes()
278 gp_style->flag |= GP_MATERIAL_FILL_SHOW; in ED_gpencil_trace_data_to_strokes()
279 gp_style->flag |= GP_MATERIAL_IS_STROKE_HOLDOUT; in ED_gpencil_trace_data_to_strokes()
[all …]
H A Ddrawgpencil.c321 MaterialGPencilStyle *gp_style = (ma) ? ma->gp_style : NULL; in gpencil_draw_strokes() local
323 if ((gp_style == NULL) || (gp_style->flag & GP_MATERIAL_HIDE) || in gpencil_draw_strokes()
325 (tgpw->onion && (gp_style->flag & GP_MATERIAL_HIDE_ONIONSKIN))) { in gpencil_draw_strokes()
330 if ((tgpw->disable_fill == 1) && (gp_style->fill_rgba[3] > 0.0f) && in gpencil_draw_strokes()
331 ((gps->flag & GP_STROKE_NOFILL) == 0) && (gp_style->flag & GP_MATERIAL_FILL_SHOW)) { in gpencil_draw_strokes()
361 interp_v3_v3v3(tcolor, gp_style->stroke_rgba, tgpw->tintcolor, tgpw->tintcolor[3]); in gpencil_draw_strokes()
362 tcolor[3] = gp_style->stroke_rgba[3] * tgpw->opacity; in gpencil_draw_strokes()
370 ARRAY_SET_ITEMS(tcolor, UNPACK3(gp_style->stroke_rgba), tgpw->opacity); in gpencil_draw_strokes()
382 if (gp_style->mode == GP_MATERIAL_MODE_DOT) { in gpencil_draw_strokes()
H A Dgpencil_add_monkey.c69 copy_v4_v4(ma->gp_style->stroke_rgba, pct->line); in gpencil_monkey_color()
70 srgb_to_linearrgb_v4(ma->gp_style->stroke_rgba, ma->gp_style->stroke_rgba); in gpencil_monkey_color()
72 copy_v4_v4(ma->gp_style->fill_rgba, pct->fill); in gpencil_monkey_color()
73 srgb_to_linearrgb_v4(ma->gp_style->fill_rgba, ma->gp_style->fill_rgba); in gpencil_monkey_color()
76 ma->gp_style->flag &= ~GP_MATERIAL_STROKE_SHOW; in gpencil_monkey_color()
80 ma->gp_style->flag &= ~GP_MATERIAL_FILL_SHOW; in gpencil_monkey_color()
83 ma->gp_style->flag |= GP_MATERIAL_FILL_SHOW; in gpencil_monkey_color()
H A Dgpencil_data.c2955 gp_style = ma->gp_style; in gpencil_lock_layer_exec()
2976 gp_style = ma->gp_style; in gpencil_lock_layer_exec()
2978 if (gp_style != NULL) { in gpencil_lock_layer_exec()
3045 gp_style = ma->gp_style; in gpencil_material_isolate_exec()
3060 gp_style = ma->gp_style; in gpencil_material_isolate_exec()
3064 gp_style->flag |= flags; in gpencil_material_isolate_exec()
3075 gp_style = ma->gp_style; in gpencil_material_isolate_exec()
3138 color = ma->gp_style; in gpencil_material_hide_exec()
3201 gp_style = ma->gp_style; in gpencil_material_reveal_exec()
3254 gp_style = ma->gp_style; in gpencil_material_lock_all_exec()
[all …]
H A Dgpencil_merge.c445 if ((ma == NULL) || (ma->gp_style == NULL)) { in gpencil_strokes_merge_poll()
450 MaterialGPencilStyle *gp_style = ma->gp_style; in gpencil_strokes_merge_poll() local
451 if ((gp_style->flag & GP_MATERIAL_HIDE) || (gp_style->flag & GP_MATERIAL_LOCKED)) { in gpencil_strokes_merge_poll()
H A Dgpencil_utils.c583 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1); in ED_gpencil_stroke_color_use() local
585 if (gp_style != NULL) { in ED_gpencil_stroke_color_use()
586 if (gp_style->flag & GP_MATERIAL_HIDE) { in ED_gpencil_stroke_color_use()
1816 MaterialGPencilStyle *gp_style = NULL; in gpencil_brush_cursor_draw() local
1858 gp_style = ma->gp_style; in gpencil_brush_cursor_draw()
1864 if ((gp_style) && (GPENCIL_PAINT_MODE(gpd)) && in gpencil_brush_cursor_draw()
1869 copy_v3_v3(color, gp_style->stroke_rgba); in gpencil_brush_cursor_draw()
1949 if ((gp_style) && (GPENCIL_PAINT_MODE(gpd)) && in gpencil_brush_cursor_draw()
2874 MaterialGPencilStyle *gp_style = material->gp_style; in ED_gpencil_sbuffer_vertex_color_set() local
2901 copy_v4_v4(gpd->runtime.vert_color_fill, gp_style->fill_rgba); in ED_gpencil_sbuffer_vertex_color_set()
[all …]
H A Dgpencil_fill.c178 MaterialGPencilStyle *gp_style = ma->gp_style; in gpencil_draw_basic_stroke() local
203 float alpha = gp_style->stroke_rgba[3] * pt->strength; in gpencil_draw_basic_stroke()
338 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1); in gpencil_draw_datablock() local
339 if ((gp_style == NULL) || (gp_style->flag & GP_MATERIAL_HIDE)) { in gpencil_draw_datablock()
/dports/graphics/blender/blender-2.91.0/source/blender/blenkernel/intern/
H A Dgpencil_curve.c81 MaterialGPencilStyle *gp_style = ma->gp_style; in gpencil_check_same_material_color() local
97 rgb_to_hsv_v(gp_style->fill_rgba, hsv2); in gpencil_check_same_material_color()
98 hsv2[3] = gp_style->fill_rgba[3]; in gpencil_check_same_material_color()
111 rgb_to_hsv_v(gp_style->stroke_rgba, hsv2); in gpencil_check_same_material_color()
112 hsv2[3] = gp_style->stroke_rgba[3]; in gpencil_check_same_material_color()
147 MaterialGPencilStyle *gp_style = mat_gp->gp_style; in gpencil_add_from_curve_material() local
152 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in gpencil_add_from_curve_material()
158 gp_style->flag |= GP_MATERIAL_FILL_SHOW; in gpencil_add_from_curve_material()
164 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in gpencil_add_from_curve_material()
279 mat_gp->gp_style->flag &= ~GP_MATERIAL_FILL_SHOW; in gpencil_get_stroke_material_fromcurve()
[all …]
H A Dmaterial.c132 material_dst->gp_style = MEM_dupallocN(material_src->gp_style); in material_copy_data()
203 if (ma->gp_style) { in material_blend_write()
231 if (ma->gp_style != NULL) { in material_blend_read_lib()
232 MaterialGPencilStyle *gp_style = ma->gp_style; in material_blend_read_lib() local
236 if (gp_style->ima != NULL) { in material_blend_read_lib()
247 if (ma->gp_style) { in material_blend_read_expand()
248 MaterialGPencilStyle *gp_style = ma->gp_style; in material_blend_read_expand() local
282 MaterialGPencilStyle *gp_style = ma->gp_style; in BKE_gpencil_material_attr_init() local
290 gp_style->mix_factor = 0.5f; in BKE_gpencil_material_attr_init()
712 if (ma->gp_style == NULL) { in BKE_gpencil_material_settings()
[all …]
H A Dgpencil_geom.c2241 MaterialGPencilStyle *gp_style = mat_gp->gp_style; in gpencil_add_material() local
2245 ARRAY_SET_ITEMS(gp_style->stroke_rgba, 0.0f, 0.0f, 0.0f, 1.0f); in gpencil_add_material()
2246 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in gpencil_add_material()
2249 copy_v4_v4(gp_style->stroke_rgba, color); in gpencil_add_material()
2250 gp_style->flag &= ~GP_MATERIAL_STROKE_SHOW; in gpencil_add_material()
2254 copy_v4_v4(gp_style->fill_rgba, color); in gpencil_add_material()
2256 gp_style->flag |= GP_MATERIAL_FILL_SHOW; in gpencil_add_material()
2260 if (((gp_style->flag & GP_MATERIAL_STROKE_SHOW) == 0) && in gpencil_add_material()
2261 ((gp_style->flag & GP_MATERIAL_FILL_SHOW) == 0)) { in gpencil_add_material()
2262 gp_style->flag |= GP_MATERIAL_STROKE_SHOW; in gpencil_add_material()
[all …]
/dports/graphics/blender/blender-2.91.0/source/blender/editors/interface/
H A Dinterface_eyedropper_gpencil_color.c130 MaterialGPencilStyle *gp_style = ma->gp_style; in eyedropper_add_material() local
131 if (gp_style != NULL) { in eyedropper_add_material()
133 bool found_stroke = compare_v3v3(gp_style->stroke_rgba, col_conv, 0.01f) && in eyedropper_add_material()
134 (gp_style->flag & GP_MATERIAL_STROKE_SHOW); in eyedropper_add_material()
136 bool found_fill = compare_v3v3(gp_style->fill_rgba, col_conv, 0.01f) && in eyedropper_add_material()
137 (gp_style->flag & GP_MATERIAL_FILL_SHOW); in eyedropper_add_material()
139 if ((only_stroke) && (found_stroke) && ((gp_style->flag & GP_MATERIAL_FILL_SHOW) == 0)) { in eyedropper_add_material()
142 else if ((only_fill) && (found_fill) && ((gp_style->flag & GP_MATERIAL_STROKE_SHOW) == 0)) { in eyedropper_add_material()
170 MaterialGPencilStyle *gp_style_new = ma_new->gp_style; in eyedropper_add_material()
/dports/graphics/blender/blender-2.91.0/source/blender/gpencil_modifiers/intern/
H A DMOD_gpencilcolor.c118 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1); in deformStroke() local
124 if ((gp_style != NULL) && (gps->vert_color_fill[3] == 0.0f) && in deformStroke()
125 (gp_style->fill_rgba[3] > 0.0f)) { in deformStroke()
126 copy_v4_v4(gps->vert_color_fill, gp_style->fill_rgba); in deformStroke()
143 if ((gp_style != NULL) && (pt->vert_color[3] == 0.0f) && (gp_style->stroke_rgba[3] > 0.0f)) { in deformStroke()
144 copy_v4_v4(pt->vert_color, gp_style->stroke_rgba); in deformStroke()
H A DMOD_gpencil_util.c94 MaterialGPencilStyle *gp_style = ma->gp_style; in is_stroke_affected_by_modifier() local
138 if (gp_style->index != mpassindex) { in is_stroke_affected_by_modifier()
143 if (gp_style->index == mpassindex) { in is_stroke_affected_by_modifier()
H A DMOD_gpenciltint.c149 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1); in deformStroke() local
178 if ((gp_style != NULL) && (gps->vert_color_fill[3] == 0.0f) && in deformStroke()
179 (gp_style->fill_rgba[3] > 0.0f)) { in deformStroke()
180 copy_v4_v4(gps->vert_color_fill, gp_style->fill_rgba); in deformStroke()
226 if ((gp_style != NULL) && (pt->vert_color[3] == 0.0f) && (gp_style->stroke_rgba[3] > 0.0f)) { in deformStroke()
227 copy_v4_v4(pt->vert_color, gp_style->stroke_rgba); in deformStroke()
/dports/graphics/blender/blender-2.91.0/source/blender/blenloader/intern/
H A Dversioning_defaults.c440 ma->gp_style->mode = GP_MATERIAL_MODE_DOT; in BLO_update_defaults_startup_blend()
447 ma->gp_style->mode = GP_MATERIAL_MODE_SQUARE; in BLO_update_defaults_startup_blend()
452 ma->gp_style->mix_rgba[3] = 1.0f; in BLO_update_defaults_startup_blend()
453 ma->gp_style->texture_offset[0] = -0.5f; in BLO_update_defaults_startup_blend()
454 ma->gp_style->mix_factor = 0.5f; in BLO_update_defaults_startup_blend()
460 ma->gp_style->flag &= ~GP_MATERIAL_STROKE_SHOW; in BLO_update_defaults_startup_blend()
461 ma->gp_style->mix_rgba[3] = 1.0f; in BLO_update_defaults_startup_blend()
462 ma->gp_style->texture_offset[0] = -0.5f; in BLO_update_defaults_startup_blend()
463 ma->gp_style->mix_factor = 0.5f; in BLO_update_defaults_startup_blend()
H A Dversioning_280.c1691 if (ma && ma->gp_style) { in do_versions_after_linking_280()
1695 if (ma && ma->gp_style) { in do_versions_after_linking_280()
1699 if (ma && ma->gp_style) { in do_versions_after_linking_280()
3095 if (mat->gp_style) { in blo_do_versions_280()
4665 MaterialGPencilStyle *gp_style = mat->gp_style; in blo_do_versions_280() local
4670 srgb_to_linearrgb_v4(gp_style->stroke_rgba, gp_style->stroke_rgba); in blo_do_versions_280()
4671 srgb_to_linearrgb_v4(gp_style->fill_rgba, gp_style->fill_rgba); in blo_do_versions_280()
4675 gp_style->texture_angle = gp_style->gradient_angle; in blo_do_versions_280()
4676 copy_v2_v2(gp_style->texture_scale, gp_style->gradient_scale); in blo_do_versions_280()
4677 copy_v2_v2(gp_style->texture_offset, gp_style->gradient_shift); in blo_do_versions_280()
[all …]
/dports/graphics/blender/blender-2.91.0/source/blender/draw/engines/overlay/
H A Doverlay_outline.c219 MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(iter->ob, gps->mat_nr + 1); in gpencil_stroke_cache_populate() local
221 bool hide_material = (gp_style->flag & GP_MATERIAL_HIDE) != 0; in gpencil_stroke_cache_populate()
222 bool show_stroke = (gp_style->flag & GP_MATERIAL_STROKE_SHOW) != 0; in gpencil_stroke_cache_populate()
224 bool show_fill = (gps->tot_triangles > 0) && (gp_style->flag & GP_MATERIAL_FILL_SHOW) != 0; in gpencil_stroke_cache_populate()
H A Doverlay_gpencil.c318 MaterialGPencilStyle *gp_style = ma->gp_style; in overlay_gpencil_draw_stroke_color_name() local
320 if ((gps->points == NULL) || (gps->totpoints < 1) || (gp_style == NULL)) { in overlay_gpencil_draw_stroke_color_name()
324 if (gp_style->flag & GP_MATERIAL_HIDE) { in overlay_gpencil_draw_stroke_color_name()
/dports/graphics/blender/blender-2.91.0/source/blender/makesdna/
H A DDNA_material_types.h207 struct MaterialGPencilStyle *gp_style; member

12