55 tgp_ob->layers.first = tgp_ob->layers.last =
NULL;
56 tgp_ob->vfx.first = tgp_ob->vfx.last =
NULL;
62 tgp_ob->do_mat_holdout =
false;
63 for (
int i = 0; i < ob->
totcol; i++) {
67 tgp_ob->do_mat_holdout =
true;
111 copy_v3_v3(tgp_ob->plane_mat[2], tgp_ob->plane_normal);
116 rescale_m4(tgp_ob->plane_mat, (
float[3]){radius, radius, radius});
130 #define SORT_IMPL_LINKTYPE GPENCIL_tObject
132 #define SORT_IMPL_FUNC gpencil_tobject_sort_fn_r
133 #include "../../blenlib/intern/list_sort_impl.h"
134 #undef SORT_IMPL_FUNC
136 #undef SORT_IMPL_LINKTYPE
196 const bool is_obact = ((pd->
obact) && (pd->
obact == ob));
203 if (is_obact && is_fade) {
226 const float *onion_col_custom = (use_onion_custom_col) ?
228 U.gpencil_new_layer_col;
235 clamp_f(*r_alpha, 0.01f, 1.0f);
253 const float hsv_saturation = 0.7f;
254 const float hsv_value = 0.6f;
259 const float hsv[3] = {hue, hsv_saturation, hsv_value};
278 float vert_col_opacity = (override_vertcol) ?
300 bool valid_mask =
false;
327 is_masked = valid_mask;
427 while (layer !=
NULL) {
#define GPENCIL_SIMPLIFY_TINT(scene)
struct bGPDlayer * BKE_gpencil_layer_named_get(struct bGPdata *gpd, const char *name)
struct MaterialGPencilStyle * BKE_gpencil_material_settings(struct Object *ob, short act)
General operations, lookup, etc. for blender objects.
void BKE_boundbox_calc_size_aabb(const struct BoundBox *bb, float r_size[3])
void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3])
struct BoundBox * BKE_object_boundbox_get(struct Object *ob)
void BLI_bitmap_set_all(BLI_bitmap *bitmap, bool set, size_t bits)
#define BLI_BITMAP_SET(_bitmap, _index, _set)
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
BLI_INLINE float BLI_hash_int_01(unsigned int k)
Single link-list utility macros. (header only api).
#define BLI_LINKS_APPEND(list, link)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float clamp_f(float value, float min, float max)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
void orthogonalize_m4(float R[4][4], int axis)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
bool invert_m4(float R[4][4])
void unit_m4(float m[4][4])
void mul_mat3_m4_v3(const float M[4][4], float r[3])
void rescale_m4(float mat[4][4], const float scale[3])
void mul_m4_v3(const float M[4][4], float r[3])
float mat4_to_scale(const float M[4][4])
void transpose_m4(float R[4][4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void add_v3_fl(float r[3], float f)
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void * BLI_memblock_alloc(BLI_memblock *mblk) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define GPENCIL_VERTEX_MODE(gpd)
@ GP_DATA_STROKE_KEEPTHICKNESS
@ eGplBlendMode_HardLight
@ GP_MATERIAL_IS_STROKE_HOLDOUT
@ GP_MATERIAL_IS_FILL_HOLDOUT
@ V3D_SHADING_VERTEX_COLOR
@ V3D_SHADING_RANDOM_COLOR
@ DRW_STATE_STENCIL_EQUAL
@ DRW_STATE_STENCIL_ALWAYS
@ DRW_STATE_BLEND_ADD_FULL
@ DRW_STATE_DEPTH_LESS_EQUAL
@ DRW_STATE_BLEND_ALPHA_PREMUL
@ DRW_STATE_DEPTH_GREATER
@ DRW_STATE_WRITE_STENCIL
NSNotificationCenter * center
struct GPUShader GPUShader
struct GPUTexture GPUTexture
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const float * DRW_viewport_size_get(void)
const float * DRW_viewport_invert_size_get(void)
void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value)
void DRW_shgroup_state_disable(DRWShadingGroup *shgroup, DRWState state)
void DRW_shgroup_uniform_texture(DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
void DRW_shgroup_state_enable(DRWShadingGroup *shgroup, DRWState state)
void DRW_shgroup_uniform_vec3_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
bool DRW_view_is_persp_get(const DRWView *view)
void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *shgroup, Object *ob, uint tri_count)
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_vec4_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
void DRW_shgroup_uniform_texture_ref(DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
DRWPass * DRW_pass_create(const char *name, DRWState state)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_shgroup_uniform_vec2_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
void DRW_shgroup_stencil_mask(DRWShadingGroup *shgroup, uint mask)
GPENCIL_tLayer * gpencil_layer_cache_get(GPENCIL_tObject *tgp_ob, int number)
GPENCIL_tLayer * gpencil_layer_cache_add(GPENCIL_PrivateData *pd, const Object *ob, const bGPDlayer *gpl, const bGPDframe *gpf, GPENCIL_tObject *tgp_ob)
static float gpencil_layer_final_opacity_get(const GPENCIL_PrivateData *pd, const Object *ob, const bGPDlayer *gpl)
static int gpencil_tobject_dist_sort(const void *a, const void *b)
static void gpencil_layer_final_tint_and_alpha_get(const GPENCIL_PrivateData *pd, const bGPdata *gpd, const bGPDlayer *gpl, const bGPDframe *gpf, float r_tint[4], float *r_alpha)
static void gpencil_layer_random_color_get(const Object *ob, const bGPDlayer *gpl, float r_color[3])
void gpencil_object_cache_sort(GPENCIL_PrivateData *pd)
GPENCIL_tObject * gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob)
struct GPUShader * GPENCIL_shader_layer_blend_get(void)
#define GPENCIL_PIXEL_FACTOR
struct GPUShader * GPENCIL_shader_geometry_get(void)
GPUTexture * scene_depth_tx
struct BLI_memblock * gp_layer_pool
struct BLI_memblock * gp_maskbit_pool
struct BLI_memblock * gp_object_pool
float vertex_paint_opacity
float fade_gp_object_opacity
struct GPENCIL_PrivateData::@211 tobjects_infront
struct GPENCIL_PrivateData::@211 tobjects
GPUTexture * reveal_layer_tx
GPUTexture * color_layer_tx
DRWShadingGroup * base_shgrp
BLI_bitmap * mask_invert_bits
struct GPENCIL_tLayer * next
struct GPENCIL_tObject::@209 layers
struct GPENCIL_tObject * next
bGPDframe_Runtime runtime
float vertex_paint_opacity
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)