Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyingsets.c
| Show First 20 Lines • Show All 703 Lines • ▼ Show 20 Lines | int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks) | ||||
| index = BLI_findindex(&builtin_keyingsets, ks); | index = BLI_findindex(&builtin_keyingsets, ks); | ||||
| if (index != -1) | if (index != -1) | ||||
| return -(index + 1); | return -(index + 1); | ||||
| else | else | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| /* Get Keying Set to use for Auto-Keyframing some transforms */ | /* Get Keying Set to use for Auto-Keyframing some transforms */ | ||||
| KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformKSName) | KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *transformKSName) | ||||
| { | { | ||||
| /* get KeyingSet to use | /* get KeyingSet to use | ||||
| * - use the active KeyingSet if defined (and user wants to use it for all autokeying), | * - use the active KeyingSet if defined (and user wants to use it for all autokeying), | ||||
| * or otherwise key transforms only | * or otherwise key transforms only | ||||
| */ | */ | ||||
| if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset)) | if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset)) | ||||
| return ANIM_scene_get_active_keyingset(scene); | return ANIM_scene_get_active_keyingset(scene); | ||||
| else if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL)) | else if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL)) | ||||
| return ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_AVAILABLE_ID); | return ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_AVAILABLE_ID); | ||||
| else | else | ||||
| return ANIM_builtin_keyingset_get_named(NULL, tranformKSName); | return ANIM_builtin_keyingset_get_named(NULL, transformKSName); | ||||
| } | } | ||||
| /* Menu of All Keying Sets ----------------------------- */ | /* Menu of All Keying Sets ----------------------------- */ | ||||
| /* Dynamically populate an enum of Keying Sets */ | /* Dynamically populate an enum of Keying Sets */ | ||||
| const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) | const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| ▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines | |||||