62 const bool force_camera_view = is_pdf && any_camera;
69 if (cam_ob !=
nullptr) {
137 Object *
object = base->object;
153 ObjectZ obz = {camera_z,
object};
165 ObjectZ obz = {zdepth * -1.0f,
object};
172 return obz1.zdepth < obz2.zdepth;
193 r_co[0] =
winx_ - r_co[0];
197 r_co[1] =
winy_ - r_co[1];
211 r_co[0] =
winx_ - r_co[0];
215 r_co[1] =
winy_ - r_co[1];
227 r_co.x = (r_co.x + 1.0f) / 2.0f * (
float)
render_x_;
228 r_co.y = (r_co.y + 1.0f) / 2.0f * (
float)
render_y_;
262 pt = &gps_perimeter->
points[0];
265 const float2 v1 = screen_co - screen_ex;
269 return MAX2(radius, 1.0f);
286 float avg_color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
289 avg_opacity_ += pt.strength;
314 const float gap = 10.0f;
332 if (gpf ==
nullptr) {
337 if (gps->totpoints == 0) {
351 select_boundbox_.
xmin =
min[0];
352 select_boundbox_.
ymin =
min[1];
353 select_boundbox_.
xmax =
max[0];
354 select_boundbox_.
ymax =
max[1];
359 boundbox->
xmin = select_boundbox_.
xmin;
360 boundbox->
xmax = select_boundbox_.
xmax;
361 boundbox->
ymin = select_boundbox_.
ymin;
362 boundbox->
ymax = select_boundbox_.
ymax;
typedef float(TangentPoint)[2]
Camera data-block and utility functions.
void BKE_camera_params_init(CameraParams *params)
void BKE_camera_params_from_object(CameraParams *params, const struct Object *cam_ob)
void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float aspx, float aspy)
void BKE_camera_params_compute_matrix(CameraParams *params)
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_gpencil_free_stroke(struct bGPDstroke *gps)
void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, struct Object *obact, struct bGPDlayer *gpl, float diff_mat[4][4])
struct bGPDstroke * BKE_gpencil_stroke_perimeter_from_view(struct RegionView3D *rv3d, struct bGPdata *gpd, const struct bGPDlayer *gpl, struct bGPDstroke *gps, int subdivisions, const float diff_mat[4][4])
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
General operations, lookup, etc. for materials.
struct MaterialGPencilStyle * BKE_gpencil_material_settings(struct Object *ob, short act)
void BKE_render_resolution(const struct RenderData *r, const bool use_crop, int *r_width, int *r_height)
bool BKE_scene_camera_switch_update(struct Scene *scene)
#define LISTBASE_FOREACH(type, var, list)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_v2_project_m4_v3(float r[2], const float M[4][4], const float vec[3])
MINLINE void add_v4_v4(float r[4], const float a[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v4_v4fl(float r[4], const float a[4], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
MINLINE void add_v2_fl(float r[2], float f)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define INIT_MINMAX2(min, max)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3])
void ED_view3d_calc_camera_border(const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, struct rctf *r_viewborder, bool no_shift)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
float2 gpencil_3D_point_to_render_space(const float3 co)
void selected_objects_boundbox_get(rctf *boundbox)
void filepath_set(const char *filepath)
float stroke_point_radius_get(struct bGPDlayer *gpl, struct bGPDstroke *gps)
GpencilIO(const GpencilIOParams *iparams)
blender::Vector< ObjectZ > ob_list_
struct Depsgraph * depsgraph_
void create_object_list()
struct RegionView3D * rv3d_
void prepare_stroke_export_colors(struct Object *ob, struct bGPDstroke *gps)
float2 gpencil_3D_point_to_2D(const float3 co)
void frame_number_set(int value)
float stroke_average_opacity_get()
void selected_objects_boundbox_calc()
bool gpencil_3D_point_to_screen_space(const float3 co, float2 &r_co)
void prepare_layer_export_matrix(struct Object *ob, struct bGPDlayer *gpl)
void prepare_camera_params(Scene *scene, const GpencilIOParams *iparams)
T length(const vec_base< T, Size > &a)