diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-10 20:26:46 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-10 20:45:11 +0400 |
commit | 32bc1eb677687893f48e2a76c8b7421b53492631 (patch) | |
tree | fde56a8b6670babcd393a54bc629994da49b5422 /source/blender/editors/include | |
parent | b100bdca25b15df16c1cd3261f8151b824eb8b19 (diff) |
Cleanup (no functional changes):
* int -> bool where possible
* Use const where possible
* Get rid of magic numbers
* Add/tweak a few UI tips
* A few other misc changes.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_armature.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 24c80cbf005..b08cc12dc3e 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -157,9 +157,11 @@ void ED_armature_transform(struct bArmature *arm, float mat[4][4]); #define ARM_GROUPS_ENVELOPE 2 #define ARM_GROUPS_AUTO 3 -void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct Object *par, int mode, bool mirror); +void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, + struct Object *par, const int mode, const bool mirror); -void unique_editbone_name(struct ListBase *ebones, char *name, EditBone *bone); /* if bone is already in list, pass it as param to ignore it */ +/* if bone is already in list, pass it as param to ignore it */ +void unique_editbone_name(struct ListBase *ebones, char *name, EditBone *bone); void ED_armature_bone_rename(struct bArmature *arm, const char *oldnamep, const char *newnamep); void undo_push_armature(struct bContext *C, const char *name); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 2328f7d5135..39586039e8f 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -101,9 +101,10 @@ extern struct EnumPropertyItem prop_clear_parent_types[]; extern struct EnumPropertyItem prop_make_parent_types[]; #endif -int ED_object_parent_set(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, - struct Object *par, int partype, bool xmirror, bool keep_transform, const int vert_par[3]); -void ED_object_parent_clear(struct Object *ob, int type); +bool ED_object_parent_set(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, + struct Object *par, int partype, const bool xmirror, const bool keep_transform, + const int vert_par[3]); +void ED_object_parent_clear(struct Object *ob, const int type); struct Base *ED_object_scene_link(struct Scene *scene, struct Object *ob); void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); @@ -122,7 +123,7 @@ void ED_base_object_free_and_unlink(struct Main *bmain, struct Scene *scene, str /* single object duplicate, if (dupflag == 0), fully linked, else it uses the flags given */ struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct Base *base, int dupflag); -void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr); +void ED_object_parent(struct Object *ob, struct Object *parent, const int type, const char *substr); bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, int mode, struct ReportList *reports); void ED_object_toggle_modes(struct bContext *C, int mode); @@ -154,7 +155,7 @@ struct Object *ED_object_add_type( struct bContext *C, int type, const float loc[3], const float rot[3], bool enter_editmode, unsigned int layer) ATTR_RETURNS_NONNULL; -void ED_object_single_users(struct Main *bmain, struct Scene *scene, bool full, bool copy_groups); +void ED_object_single_users(struct Main *bmain, struct Scene *scene, const bool full, const bool copy_groups); void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob); /* object motion paths */ |