diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-01 17:19:31 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-01 17:20:32 +0300 |
commit | 6ec463a4b754bf69baf94ba6b3683655f6834ccd (patch) | |
tree | 01e760a04eaf8260ce24d21d083388abf5f50668 /source/blender/blenkernel/intern/scene.c | |
parent | 952c4e41bb4dae0d1b4a36a316f6cf67c054afe0 (diff) |
Cleanup/Refactor: Transform Orientation: Use 'orient_index' instead 'orient_type'
`orient_index` is a more comprehensive value as it reveals both the type and index.
Differential Revision: https://developer.blender.org/D9595
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index de3e1023b08..e0ff0b0268a 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2517,6 +2517,18 @@ int BKE_scene_orientation_slot_get_index(const TransformOrientationSlot *orient_ orient_slot->type; } +int BKE_scene_orientation_get_index(Scene *scene, int slot_index) +{ + TransformOrientationSlot *orient_slot = BKE_scene_orientation_slot_get(scene, slot_index); + return BKE_scene_orientation_slot_get_index(orient_slot); +} + +int BKE_scene_orientation_get_index_from_flag(Scene *scene, int flag) +{ + TransformOrientationSlot *orient_slot = BKE_scene_orientation_slot_get_from_flag(scene, flag); + return BKE_scene_orientation_slot_get_index(orient_slot); +} + /** \} */ static bool check_rendered_viewport_visible(Main *bmain) |