Blender  V3.3
Classes | Typedefs | Functions | Variables
gpencil_add_stroke.c File Reference
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BLT_translation.h"
#include "DEG_depsgraph.h"
#include "ED_gpencil.h"

Go to the source code of this file.

Classes

struct  ColorTemplate
 

Typedefs

typedef struct ColorTemplate ColorTemplate
 

Functions

static int gpencil_stroke_material (Main *bmain, Object *ob, const ColorTemplate *pct, const bool fill)
 
void ED_gpencil_create_stroke (bContext *C, Object *ob, float mat[4][4])
 

Variables

static const float data0 [175 *GP_PRIM_DATABUF_SIZE]
 
static const ColorTemplate gp_stroke_material_black
 
static const ColorTemplate gp_stroke_material_white
 
static const ColorTemplate gp_stroke_material_red
 
static const ColorTemplate gp_stroke_material_green
 
static const ColorTemplate gp_stroke_material_blue
 
static const ColorTemplate gp_stroke_material_grey
 

Typedef Documentation

◆ ColorTemplate

typedef struct ColorTemplate ColorTemplate

Function Documentation

◆ ED_gpencil_create_stroke()

void ED_gpencil_create_stroke ( struct bContext C,
struct Object ob,
float  mat[4][4] 
)

◆ gpencil_stroke_material()

static int gpencil_stroke_material ( Main bmain,
Object ob,
const ColorTemplate pct,
const bool  fill 
)
static

Variable Documentation

◆ data0

const float data0[175 *GP_PRIM_DATABUF_SIZE]
static

Definition at line 60 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().

◆ gp_stroke_material_black

const ColorTemplate gp_stroke_material_black
static
Initial value:
= {
N_("Black"),
{0.0f, 0.0f, 0.0f, 1.0f},
{0.0f, 0.0f, 0.0f, 0.0f},
}
#define N_(msgid)

Definition at line 154 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().

◆ gp_stroke_material_blue

const ColorTemplate gp_stroke_material_blue
static
Initial value:
= {
N_("Blue"),
{0.0f, 0.0f, 1.0f, 1.0f},
{0.0f, 0.0f, 0.0f, 0.0f},
}

Definition at line 178 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().

◆ gp_stroke_material_green

const ColorTemplate gp_stroke_material_green
static
Initial value:
= {
N_("Green"),
{0.0f, 1.0f, 0.0f, 1.0f},
{0.0f, 0.0f, 0.0f, 0.0f},
}

Definition at line 172 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().

◆ gp_stroke_material_grey

const ColorTemplate gp_stroke_material_grey
static
Initial value:
= {
N_("Grey"),
{0.358f, 0.358f, 0.358f, 1.0f},
{0.5f, 0.5f, 0.5f, 1.0f},
}

Definition at line 184 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().

◆ gp_stroke_material_red

const ColorTemplate gp_stroke_material_red
static
Initial value:
= {
N_("Red"),
{1.0f, 0.0f, 0.0f, 1.0f},
{0.0f, 0.0f, 0.0f, 0.0f},
}

Definition at line 166 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().

◆ gp_stroke_material_white

const ColorTemplate gp_stroke_material_white
static
Initial value:
= {
N_("White"),
{1.0f, 1.0f, 1.0f, 1.0f},
{0.0f, 0.0f, 0.0f, 0.0f},
}

Definition at line 160 of file gpencil_add_stroke.c.

Referenced by ED_gpencil_create_stroke().