diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-30 09:37:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-30 09:42:19 +0300 |
commit | 501d2443d03cce18985fab3ffad5d23238748f3e (patch) | |
tree | 1d127d4e4c6d82fc85feedc9826dd5619174e346 /source/blender/editors/include | |
parent | df9597cfba78deb40009553ab9dcf09c21edd434 (diff) |
Cleanup: use const arguments for accessor functions
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_curve.h | 8 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gizmo_library.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 16 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mask.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_node.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 5 |
7 files changed, 19 insertions, 18 deletions
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 8015a665970..44c5897d3a3 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -60,21 +60,21 @@ bool ED_curve_editnurb_select_pick( struct Nurb *ED_curve_add_nurbs_primitive( struct bContext *C, struct Object *obedit, float mat[4][4], int type, int newob); -bool ED_curve_nurb_select_check(struct View3D *v3d, struct Nurb *nu); -int ED_curve_nurb_select_count(struct View3D *v3d, struct Nurb *nu); +bool ED_curve_nurb_select_check(const struct View3D *v3d, const struct Nurb *nu); +int ED_curve_nurb_select_count(const struct View3D *v3d, const struct Nurb *nu); bool ED_curve_nurb_select_all(const struct Nurb *nu); bool ED_curve_nurb_deselect_all(const struct Nurb *nu); int ED_curve_join_objects_exec(struct bContext *C, struct wmOperator *op); /* editcurve_select.c */ -bool ED_curve_select_check(struct View3D *v3d, struct EditNurb *editnurb); +bool ED_curve_select_check(const struct View3D *v3d, const struct EditNurb *editnurb); bool ED_curve_deselect_all(struct EditNurb *editnurb); bool ED_curve_deselect_all_multi_ex(struct Base **bases, int bases_len); bool ED_curve_deselect_all_multi(struct bContext *C); bool ED_curve_select_all(struct EditNurb *editnurb); bool ED_curve_select_swap(struct EditNurb *editnurb, bool hide_handles); -int ED_curve_select_count(struct View3D *v3d, struct EditNurb *editnurb); +int ED_curve_select_count(const struct View3D *v3d, const struct EditNurb *editnurb); /* editcurve_undo.c */ void ED_curve_undosys_type(struct UndoType *ut); diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h index 571519e52f7..357d5e10fa7 100644 --- a/source/blender/editors/include/ED_gizmo_library.h +++ b/source/blender/editors/include/ED_gizmo_library.h @@ -275,7 +275,7 @@ void ED_gizmotypes_snap_3d_flag_clear(struct wmGizmo *gz, eSnapGizmo flag); bool ED_gizmotypes_snap_3d_flag_test(struct wmGizmo *gz, eSnapGizmo flag); bool ED_gizmotypes_snap_3d_invert_snap_get(struct wmGizmo *gz); -bool ED_gizmotypes_snap_3d_is_enabled(struct wmGizmo *gz); +bool ED_gizmotypes_snap_3d_is_enabled(const struct wmGizmo *gz); short ED_gizmotypes_snap_3d_update(struct wmGizmo *gz, struct Depsgraph *depsgraph, diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index bad080e1609..59b5a1abaa6 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -189,7 +189,7 @@ bool ED_gpencil_layer_frames_looper(struct bGPDlayer *gpl, bool (*gpf_cb)(struct bGPDframe *, struct Scene *)); void ED_gpencil_layer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, bool onlysel); -bool ED_gpencil_layer_frame_select_check(struct bGPDlayer *gpl); +bool ED_gpencil_layer_frame_select_check(const struct bGPDlayer *gpl); void ED_gpencil_layer_frame_select_set(struct bGPDlayer *gpl, short mode); void ED_gpencil_layer_frames_select_box(struct bGPDlayer *gpl, float min, @@ -364,23 +364,23 @@ void ED_gpencil_init_random_settings(struct Brush *brush, const int mval[2], struct GpRandomSettings *random_settings); -bool ED_gpencil_stroke_check_collision(struct GP_SpaceConversion *gsc, +bool ED_gpencil_stroke_check_collision(const struct GP_SpaceConversion *gsc, struct bGPDstroke *gps, const float mouse[2], const int radius, const float diff_mat[4][4]); -bool ED_gpencil_stroke_point_is_inside(struct bGPDstroke *gps, - struct GP_SpaceConversion *gsc, - int mouse[2], +bool ED_gpencil_stroke_point_is_inside(const struct bGPDstroke *gps, + const struct GP_SpaceConversion *gsc, + const int mouse[2], const float diff_mat[4][4]); -void ED_gpencil_projected_2d_bound_box(struct GP_SpaceConversion *gsc, - struct bGPDstroke *gps, +void ED_gpencil_projected_2d_bound_box(const struct GP_SpaceConversion *gsc, + const struct bGPDstroke *gps, const float diff_mat[4][4], float r_min[2], float r_max[2]); struct bGPDstroke *ED_gpencil_stroke_nearest_to_ends(struct bContext *C, - struct GP_SpaceConversion *gsc, + const struct GP_SpaceConversion *gsc, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps, diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 08d19318d4c..0493832c06f 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -452,7 +452,7 @@ bool autokeyframe_cfra_can_key(const struct Scene *scene, struct ID *id); /* Lesser Keyframe Checking API call: * - Used for the buttons to check for keyframes... */ -bool fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter); +bool fcurve_frame_has_keyframe(const struct FCurve *fcu, float frame, short filter); /* Lesser Keyframe Checking API call: * - Returns whether the current value of a given property differs from the interpolated value. diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 247911bdc55..c2fdbc160de 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -100,7 +100,7 @@ bool ED_masklayer_frames_looper(struct MaskLayer *mask_layer, struct Scene *)); void ED_masklayer_make_cfra_list(struct MaskLayer *mask_layer, ListBase *elems, bool onlysel); -bool ED_masklayer_frame_select_check(struct MaskLayer *mask_layer); +bool ED_masklayer_frame_select_check(const struct MaskLayer *mask_layer); void ED_masklayer_frame_select_set(struct MaskLayer *mask_layer, short mode); void ED_masklayer_frames_select_box(struct MaskLayer *mask_layer, float min, diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index ba65840dc99..73a1548362c 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -110,7 +110,7 @@ bool ED_node_is_geometry(struct SpaceNode *snode); void ED_node_shader_default(const struct bContext *C, struct ID *id); void ED_node_composit_default(const struct bContext *C, struct Scene *scene); void ED_node_texture_default(const struct bContext *C, struct Tex *tex); -bool ED_node_select_check(ListBase *lb); +bool ED_node_select_check(const ListBase *lb); void ED_node_select_all(ListBase *lb, int action); void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree); void ED_node_set_active(struct Main *bmain, diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 1738c383328..888dcd9d428 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -62,7 +62,8 @@ struct Object *ED_object_active_context(const struct bContext *C); void ED_collection_hide_menu_draw(const struct bContext *C, struct uiLayout *layout); Object **ED_object_array_in_mode_or_selected(struct bContext *C, - bool (*filter_fn)(struct Object *ob, void *user_data), + bool (*filter_fn)(const struct Object *ob, + void *user_data), void *filter_user_data, uint *r_objects_len); @@ -387,7 +388,7 @@ void ED_object_mode_generic_exit(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob); -bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, struct Object *ob); +bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, const struct Object *ob); void ED_object_posemode_set_for_weight_paint(struct bContext *C, struct Main *bmain, |