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 | |
void | ED_gpencil_stroke_init_data (bGPDstroke *gps, const float *array, const int totpoints, const float mat[4][4]) |
static int | gpencil_monkey_color (Main *bmain, Object *ob, const ColorTemplate *pct, bool stroke, bool fill) |
void | ED_gpencil_create_monkey (bContext *C, Object *ob, float mat[4][4]) |
typedef struct ColorTemplate ColorTemplate |
Add a 2D Suzanne (original model created by Matias Mendiola).
Definition at line 824 of file gpencil_add_monkey.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, data1, data10, data11, data12, data13, data14, data15, data16, data17, data18, data19, data2, data20, data21, data22, data23, data24, data25, data26, data27, data3, data4, data5, data6, data7, data8, data9, DEG_id_tag_update(), ED_gpencil_stroke_init_data(), bGPdata::flag, GP_DATA_CACHE_IS_DIRTY, gp_monkey_pct_black, gp_monkey_pct_eyes, gp_monkey_pct_pupils, gp_monkey_pct_skin, gp_monkey_pct_skin_light, gp_monkey_pct_skin_shadow, gpencil_monkey_color(), bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, Scene::r, and scene.
Referenced by object_gpencil_add_exec().
void ED_gpencil_stroke_init_data | ( | struct bGPDstroke * | gps, |
const float * | array, | ||
int | totpoints, | ||
const float | mat[4][4] | ||
) |
Populate stroke with point data from data buffers.
gps | Grease pencil stroke |
array | Flat array of point data values. Each entry has GP_PRIM_DATABUF_SIZE values. |
totpoints | Total of points |
mat | 4x4 transform matrix to transform points into the right coordinate space. |
Definition at line 28 of file gpencil_add_monkey.c.
References GP_PRIM_DATABUF_SIZE, mul_m4_v3(), bGPDstroke::points, bGPDspoint::pressure, bGPDspoint::strength, x, bGPDspoint::x, bGPDspoint::y, and bGPDspoint::z.
Referenced by ED_gpencil_create_monkey(), and ED_gpencil_create_stroke().
|
static |
Definition at line 55 of file gpencil_add_monkey.c.
References BKE_gpencil_object_material_ensure_by_name(), copy_v4_v4(), DATA_, ColorTemplate::fill, MaterialGPencilStyle::fill_rgba, MaterialGPencilStyle::flag, GP_MATERIAL_FILL_SHOW, GP_MATERIAL_STROKE_SHOW, Material::gp_style, ColorTemplate::line, ColorTemplate::name, srgb_to_linearrgb_v4(), and MaterialGPencilStyle::stroke_rgba.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 83 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey(), lookup_table_read(), and lookup_table_read_2D().
|
static |
Definition at line 221 of file gpencil_add_monkey.c.
Referenced by blender::compositor::convolve(), CustomData_data_add(), CustomData_data_equals(), ED_gpencil_create_monkey(), layerAdd_mloop_origspace(), layerAdd_mloopcol(), layerAdd_mloopuv(), layerAdd_propcol(), layerAdd_propfloat2(), layerAdd_propfloat3(), layerEqual_mloop_origspace(), layerEqual_mloopcol(), layerEqual_mloopuv(), layerEqual_propcol(), lookup_table_read(), lookup_table_read_2D(), and TEST().
|
static |
Definition at line 423 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 451 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 463 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 475 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 495 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 515 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 551 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 571 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 591 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 611 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 241 of file gpencil_add_monkey.c.
Referenced by blender::compositor::convolve(), CustomData_data_add(), CustomData_data_equals(), ED_gpencil_create_monkey(), layerAdd_mloop_origspace(), layerAdd_mloopcol(), layerAdd_mloopuv(), layerAdd_propcol(), layerAdd_propfloat2(), layerAdd_propfloat3(), layerEqual_mloop_origspace(), layerEqual_mloopcol(), layerEqual_mloopuv(), layerEqual_propcol(), radixsort_pair(), and TEST().
|
static |
Definition at line 631 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 651 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 686 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 702 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 718 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 738 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 750 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 762 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 253 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey(), and TEST().
|
static |
Definition at line 288 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 308 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 343 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 363 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 375 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 403 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 785 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 809 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 815 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 791 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 797 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().
|
static |
Definition at line 803 of file gpencil_add_monkey.c.
Referenced by ED_gpencil_create_monkey().