Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_ipo_utils.c
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | if (RNA_path_resolve_property(&id_ptr, fcu->rna_path, &ptr, &prop)) { | ||||||||||||
| if (nameprop) { | if (nameprop) { | ||||||||||||
| /* this gets a string which will need to be freed */ | /* this gets a string which will need to be freed */ | ||||||||||||
| structname = RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0, NULL); | structname = RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0, NULL); | ||||||||||||
| free_structname = 1; | free_structname = 1; | ||||||||||||
| } | } | ||||||||||||
| else { | else { | ||||||||||||
| structname = RNA_struct_ui_name(ptr.type); | structname = RNA_struct_ui_name(ptr.type); | ||||||||||||
| } | } | ||||||||||||
| /* For the VSE, a strips 'Transform' or 'Crop' are nested (under Sequence) structs, but | |||||||||||||
| * displaying the struct name alone is no meaningful information (and also cannot be | |||||||||||||
| * filtered well), same for modifiers, so display strip name alongside as well. */ | |||||||||||||
HooglyBoogly: Some grammar thingies here. | |||||||||||||
| if (strstr(fcu->rna_path, ".sequences_all[") && | |||||||||||||
| (strstr(fcu->rna_path, ".transform.") || strstr(fcu->rna_path, ".crop.") || | |||||||||||||
| strstr(fcu->rna_path, ".modifiers["))) { | |||||||||||||
Done Inline Actions
IMO this is a bit more readable with the "or" part separated into another if statement (at the cost of another indentation of course). HooglyBoogly: IMO this is a bit more readable with the "or" part separated into another if statement (at the… | |||||||||||||
| char *stripname = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["); | |||||||||||||
| const char *structname_all = BLI_sprintfN("%s : %s", stripname ? stripname : "", structname); | |||||||||||||
| if (free_structname) { | |||||||||||||
| MEM_freeN((void *)structname); | |||||||||||||
| } | |||||||||||||
| if (stripname) { | |||||||||||||
| MEM_freeN(stripname); | |||||||||||||
| } | |||||||||||||
| structname = structname_all; | |||||||||||||
| free_structname = 1; | |||||||||||||
| } | |||||||||||||
| } | } | ||||||||||||
| /* Property Name is straightforward */ | /* Property Name is straightforward */ | ||||||||||||
| propname = RNA_property_ui_name(prop); | propname = RNA_property_ui_name(prop); | ||||||||||||
| /* Array Index - only if applicable */ | /* Array Index - only if applicable */ | ||||||||||||
| if (RNA_property_array_check(prop)) { | if (RNA_property_array_check(prop)) { | ||||||||||||
| char c = RNA_property_array_item_char(prop, fcu->array_index); | char c = RNA_property_array_item_char(prop, fcu->array_index); | ||||||||||||
| ▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines | |||||||||||||
Some grammar thingies here.