94 ot->
name =
"View Lock Clear";
96 ot->
idname =
"VIEW3D_OT_view_lock_clear";
151 ot->
name =
"View Lock to Active";
153 ot->
idname =
"VIEW3D_OT_view_lock_to_active";
203 ot->
name =
"Frame Camera Bounds";
204 ot->
description =
"Center the camera view, resizing the view to fit its bounds";
205 ot->
idname =
"VIEW3D_OT_view_center_camera";
235 ot->
name =
"View Lock Center";
237 ot->
idname =
"VIEW3D_OT_view_center_lock";
329 ot->
name =
"Set Render Region";
330 ot->
description =
"Set the boundaries of the border render and enable border render";
331 ot->
idname =
"VIEW3D_OT_render_border";
389 ot->
name =
"Clear Render Region";
390 ot->
description =
"Clear the boundaries of the border render and disable border render";
391 ot->
idname =
"VIEW3D_OT_clear_render_border";
417 int im_width, im_height;
447 ot->
name =
"Zoom Camera 1:1";
448 ot->
description =
"Match the camera to 1:1 to the render output";
449 ot->
idname =
"VIEW3D_OT_zoom_camera_1_to_1";
492 ot->
name =
"View Perspective/Orthographic";
493 ot->
description =
"Switch the current view from perspective/orthographic projection";
494 ot->
idname =
"VIEW3D_OT_view_persportho";
532 ot->
name =
"View Navigation (Walk/Fly)";
534 "Interactively navigate around the scene (uses the mode (walk/fly) preference)";
600 ot->
name =
"Add Background Image";
602 ot->
idname =
"VIEW3D_OT_background_image_add";
640 "Cannot remove background image %d from camera '%s', as it is from the linked "
663 ot->
name =
"Remove Background Image";
664 ot->
description =
"Remove a background image from the 3D view";
665 ot->
idname =
"VIEW3D_OT_background_image_remove";
676 ot->
srna,
"index", 0, 0, INT_MAX,
"Index",
"Background image index to remove", 0, INT_MAX);
718 ot->
idname =
"VIEW3D_OT_drop_world";
741 const float mat[4][4])
748 for (
int i = 0; i < 8; i++) {
797 ot->
name =
"Clipping Region";
799 ot->
idname =
"VIEW3D_OT_clip_border";
825 const bool use_depth,
832 bool depth_used =
false;
858 if (depth_used ==
false) {
867 const bool use_depth,
870 float cursor_quat[4])
889 cursor_quat[0] *= -1.0f;
898 cursor_quat[0] *= -1.0f;
900 const float mval_fl[2] = {
UNPACK2(mval)};
917 .use_occlusion_test =
true,
936 float z_src[3] = {0, 0, 1};
944 const float ortho_axis_dot[3] = {
952 float angle_best = -1.0f;
961 for (
int axis = 0; axis < 2; axis++) {
962 float tan_src[3] = {0, 0, 0};
963 tan_src[axis] = 1.0f;
966 for (
int axis_sign = 0; axis_sign < 2; axis_sign++) {
970 if (angle_test < angle_best || angle_best == -1.0f) {
971 angle_best = angle_test;
986 const bool use_depth,
998 float quat[4], quat_prev[4];
1002 C,
mval, use_depth, orientation, cursor_curr->
location, quat);
1006 float tmat[3][3], cmat[3][3];
1023 float co_2d_curr[2], co_2d_prev[2];
1080 ot->
name =
"Set 3D Cursor";
1100 "Orient to the current transform setting"},
1106 ot->
srna,
"use_depth",
true,
"Surface Project",
"Project onto the surface");
1114 "Preset viewpoint to use");
1125 {
OB_WIRE,
"WIREFRAME", 0,
"Wireframe",
"Toggle wireframe shading"},
1126 {
OB_SOLID,
"SOLID", 0,
"Solid",
"Toggle solid shading"},
1127 {
OB_MATERIAL,
"MATERIAL", 0,
"Material Preview",
"Toggle material preview shading"},
1128 {
OB_RENDER,
"RENDERED", 0,
"Rendered",
"Toggle rendered shading"},
1175 ot->
name =
"Toggle Shading Type";
1177 ot->
idname =
"VIEW3D_OT_toggle_shading";
1228 ot->
name =
"Toggle X-Ray";
1229 ot->
idname =
"VIEW3D_OT_toggle_xray";
1230 ot->
description =
"Transparent scene display. Allow selecting through items";
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_active_if_layer_visible(struct Object *ob)
Camera data-block and utility functions.
struct CameraBGImage * BKE_camera_background_image_new(struct Camera *cam)
void BKE_camera_background_image_remove(struct Camera *cam, struct CameraBGImage *bgpic)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct wmMsgBus * CTX_wm_message_bus(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_pose_armature_get(struct Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_cursor_quat_to_rot(struct View3DCursor *cursor, const float quat[4], bool use_compat)
void BKE_render_resolution(const struct RenderData *r, const bool use_crop, int *r_width, int *r_height)
void BKE_scene_cursor_rot_to_quat(const struct View3DCursor *cursor, float quat[4])
float BKE_screen_view3d_zoom_from_fac(float zoomfac)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float min_ff(float a, float b)
MINLINE int axis_dominant_v3_ortho_single(const float vec[3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
bool is_negative_m4(const float mat[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3])
float angle_normalized_qt(const float q[4])
void mat3_to_quat(float q[4], const float mat[3][3])
void mul_qt_v3(const float q[4], float r[3])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void copy_qt_qt(float q[4], const float a[4])
void quat_to_mat3(float mat[3][3], const float q[4])
void axis_angle_to_mat3(float R[3][3], const float axis[3], float angle)
MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
float angle_signed_on_axis_v3v3_v3(const float v1[3], const float v2[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v3(float r[3])
MINLINE void zero_v2(float r[2])
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL
@ SCE_SNAP_MODE_FACE_RAYCAST
@ USER_LOCK_CURSOR_ADJUST
#define RV3D_VIEW_IS_AXIS(view)
@ V3D_OVERLAY_BONE_SELECT
#define RV3D_LOCK_FLAGS(rv3d)
@ RV3D_LOCK_ANY_TRANSFORM
@ V3D_SHADING_XRAY_WIREFRAME
#define V3D_RENDER_BORDER
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_camera_poll(struct bContext *C)
void ED_region_tag_redraw(struct ARegion *region)
bool ED_operator_view3d_active(struct bContext *C)
bool ED_operator_scene_editable(struct bContext *C)
bool ED_operator_region_view3d_active(struct bContext *C)
SnapObjectContext * ED_transform_snap_object_context_create(struct Scene *scene, int flag)
void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx)
eSnapMode ED_transform_snap_object_project_view3d_ex(struct SnapObjectContext *sctx, struct Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const eSnapMode snap_to, const struct SnapObjectParams *params, const float init_co[3], const float mval[2], const float prev_co[3], float *dist_px, float r_loc[3], float r_no[3], int *r_index, struct Object **r_ob, float r_obmat[4][4], float r_face_nor[3])
void ED_view3d_calc_camera_border_size(const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, float r_size[2])
void ED_view3d_win_to_3d_int(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
bool ED_operator_rv3d_user_region_poll(struct bContext *C)
bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d)
@ V3D_CURSOR_ORIENT_XFORM
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3])
void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], const struct ARegion *region, const struct Object *ob, const struct rcti *rect)
void view3d_operator_needs_opengl(const struct bContext *C)
struct RegionView3D * ED_view3d_context_rv3d(struct bContext *C)
void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const struct BoundBox *clipbb, bool is_flip)
void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *area)
bool ED_view3d_context_user_region(struct bContext *C, struct View3D **r_v3d, struct ARegion **r_region)
void ED_view3d_lock_clear(struct View3D *v3d)
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)
float ED_view3d_calc_zfac_ex(const struct RegionView3D *rv3d, const float co[3], bool *r_flip)
bool ED_view3d_autodist(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], bool alphaoverride, const float fallback_depth_pt[3])
_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 type
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
#define ND_RENDER_OPTIONS
#define NS_VIEW3D_SHADING
#define ND_DRAW_RENDER_VIEWPORT
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Depsgraph * depsgraph
IconTextureDrawCall border
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct ListBase bg_images
struct Object * ob_center
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void ED_view3d_cursor3d_update(bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation)
static int toggle_xray_exec(bContext *C, wmOperator *op)
static int view3d_center_lock_exec(bContext *C, wmOperator *UNUSED(op))
static int view3d_clipping_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int background_image_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int view3d_clipping_exec(bContext *C, wmOperator *op)
static int view3d_cursor3d_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ED_view3d_cursor3d_position_rotation(bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation, float cursor_co[3], float cursor_quat[4])
static int background_image_remove_exec(bContext *C, wmOperator *op)
static int view3d_navigate_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
void VIEW3D_OT_view_persportho(wmOperatorType *ot)
static const EnumPropertyItem prop_shading_type_items[]
static Camera * background_image_camera_from_context(bContext *C)
static int drop_world_exec(bContext *C, wmOperator *op)
static bool view3d_camera_user_poll(bContext *C)
static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op))
static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_toggle_xray(wmOperatorType *ot)
static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_center_camera(wmOperatorType *ot)
void VIEW3D_OT_view_center_lock(wmOperatorType *ot)
void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot)
void VIEW3D_OT_clip_border(wmOperatorType *ot)
static int view_lock_to_active_exec(bContext *C, wmOperator *UNUSED(op))
static int background_image_add_exec(bContext *C, wmOperator *UNUSED(op))
static int toggle_shading_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_lock_to_active(wmOperatorType *ot)
static void view3d_set_1_to_1_viewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, View3D *v3d)
void VIEW3D_OT_cursor3d(wmOperatorType *ot)
void ED_view3d_clipping_local(RegionView3D *rv3d, const float mat[4][4])
void VIEW3D_OT_clear_render_border(wmOperatorType *ot)
void VIEW3D_OT_background_image_add(wmOperatorType *ot)
void VIEW3D_OT_view_lock_clear(wmOperatorType *ot)
void VIEW3D_OT_navigate(wmOperatorType *ot)
static bool background_image_add_poll(bContext *C)
static void calc_local_clipping(float clip_local[6][4], const BoundBox *clipbb, const float mat[4][4])
static int view_lock_clear_exec(bContext *C, wmOperator *UNUSED(op))
static int render_border_exec(bContext *C, wmOperator *op)
void ED_view3d_cursor3d_position(bContext *C, const int mval[2], const bool use_depth, float cursor_co[3])
static int clear_render_border_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_render_border(wmOperatorType *ot)
static bool drop_world_poll(bContext *C)
static bool view3d_lock_poll(bContext *C)
void VIEW3D_OT_background_image_remove(wmOperatorType *ot)
void VIEW3D_OT_toggle_shading(wmOperatorType *ot)
void VIEW3D_OT_drop_world(wmOperatorType *ot)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_msg_publish_rna_params(struct wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params)
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
ID * WM_operator_properties_id_lookup_from_name_or_session_uuid(Main *bmain, PointerRNA *ptr, const ID_Type type)
void WM_operator_properties_border(wmOperatorType *ot)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
ID * WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short idcode)