Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_action/action_edit.c
| Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | |||||
| /* ******************** New Action Operator *********************** */ | /* ******************** New Action Operator *********************** */ | ||||
| static int act_new_exec(bContext *C, wmOperator *UNUSED(op)) | static int act_new_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| PointerRNA ptr, idptr; | PointerRNA ptr, idptr; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| /* hook into UI */ | /* hook into UI */ | ||||
| uiIDContextProperty(C, &ptr, &prop); | UI_context_active_but_prop_get_templateID(C, &ptr, &prop); | ||||
| if (prop) { | if (prop) { | ||||
| bAction *action = NULL, *oldact = NULL; | bAction *action = NULL, *oldact = NULL; | ||||
| PointerRNA oldptr; | PointerRNA oldptr; | ||||
| /* create action - the way to do this depends on whether we've got an | /* create action - the way to do this depends on whether we've got an | ||||
| * existing one there already, in which case we make a copy of it | * existing one there already, in which case we make a copy of it | ||||
| * (which is useful for "versioning" actions within the same file) | * (which is useful for "versioning" actions within the same file) | ||||
| ▲ Show 20 Lines • Show All 1,595 Lines • Show Last 20 Lines | |||||