Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_keyframing.h
| Show First 20 Lines • Show All 397 Lines • ▼ Show 20 Lines | |||||
| /* Copy the given driver's variables to the buffer */ | /* Copy the given driver's variables to the buffer */ | ||||
| bool ANIM_driver_vars_copy(struct ReportList *reports, struct FCurve *fcu); | bool ANIM_driver_vars_copy(struct ReportList *reports, struct FCurve *fcu); | ||||
| /* Paste the variables in the buffer to the given FCurve */ | /* Paste the variables in the buffer to the given FCurve */ | ||||
| bool ANIM_driver_vars_paste(struct ReportList *reports, struct FCurve *fcu, bool replace); | bool ANIM_driver_vars_paste(struct ReportList *reports, struct FCurve *fcu, bool replace); | ||||
| /* -------- */ | /* -------- */ | ||||
| /* Compute an ID pointer and path to property valid for use in a driver. | |||||
| * Corrects for ID references that are not independent (e.g. material NodeTree). */ | |||||
| bool ANIM_get_target_ID_and_path_to_property(struct Main *bmain, | |||||
| struct PointerRNA *ptr, | |||||
| struct PropertyRNA *prop, | |||||
| int index, | |||||
| struct ID **r_id, | |||||
| char **r_path); | |||||
mont29: I don't think that this belong to anim code. This is RNA business to provide a proper RNA path… | |||||
| /* Create a driver & variable that reads the specified property, | /* Create a driver & variable that reads the specified property, | ||||
| * and store it in the buffers for Paste Driver and Paste Variables. */ | * and store it in the buffers for Paste Driver and Paste Variables. */ | ||||
| void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const char *var_name); | void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const char *var_name); | ||||
| /* ************ Auto-Keyframing ********************** */ | /* ************ Auto-Keyframing ********************** */ | ||||
| /* Notes: | /* Notes: | ||||
| * - All the defines for this (User-Pref settings and Per-Scene settings) | * - All the defines for this (User-Pref settings and Per-Scene settings) | ||||
| * are defined in DNA_userdef_types.h | * are defined in DNA_userdef_types.h | ||||
| ▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines | |||||
I don't think that this belong to anim code. This is RNA business to provide a proper RNA path, and it's important in other contexts than animation.
RNA_path_from_ID_to_struct() should rather be changed to detect that new flag when it's dealing with IDs, and handle it properly (probably by defining a path callback for the ntree RNA struct, to handle those cases...). And add a way to return the PointerRNA of the actual ID owner too.