Blender
V3.3
|
#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 struct ColorTemplate ColorTemplate |
Add a Simple stroke with colors (original design created by Daniel M. Lara and Matias Mendiola).
Definition at line 193 of file gpencil_add_stroke.c.
References Object::actcol, BKE_gpencil_frame_addnew(), BKE_gpencil_layer_addnew(), BKE_gpencil_stroke_add(), BKE_gpencil_stroke_geometry_update(), C, RenderData::cfra, CTX_data_main(), CTX_data_scene(), Object::data, data0, DEG_id_tag_update(), ED_gpencil_stroke_init_data(), bGPdata::flag, GP_DATA_CACHE_IS_DIRTY, gp_stroke_material_black, gp_stroke_material_blue, gp_stroke_material_green, gp_stroke_material_grey, gp_stroke_material_red, gp_stroke_material_white, gpencil_stroke_material(), bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, Scene::r, scene, and UNUSED_VARS.
Referenced by object_gpencil_add_exec().
|
static |
Definition at line 36 of file gpencil_add_stroke.c.
References BKE_gpencil_object_material_ensure_by_name(), copy_v4_v4(), DATA_, ColorTemplate::fill, MaterialGPencilStyle::fill_rgba, MaterialGPencilStyle::flag, GP_MATERIAL_FILL_SHOW, Material::gp_style, ColorTemplate::line, ColorTemplate::name, srgb_to_linearrgb_v4(), and MaterialGPencilStyle::stroke_rgba.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 60 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 154 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 178 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 172 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 184 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 166 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().
|
static |
Definition at line 160 of file gpencil_add_stroke.c.
Referenced by ED_gpencil_create_stroke().