Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_key.c
| Show All 40 Lines | |||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| # include <stddef.h> | # include <stddef.h> | ||||
| # include "DNA_object_types.h" | # include "DNA_object_types.h" | ||||
| # include "BLI_listbase.h" | |||||
| # include "BLI_string_utils.h" | # include "BLI_string_utils.h" | ||||
| # include "BKE_animsys.h" | # include "BKE_animsys.h" | ||||
| # include "BKE_key.h" | # include "BKE_key.h" | ||||
| # include "BKE_main.h" | # include "BKE_main.h" | ||||
| # include "DEG_depsgraph.h" | # include "DEG_depsgraph.h" | ||||
| ▲ Show 20 Lines • Show All 513 Lines • ▼ Show 20 Lines | static void rna_ShapeKey_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) | ||||
| int tot = kb->totelem, size = key->elemsize; | int tot = kb->totelem, size = key->elemsize; | ||||
| if (GS(key->from->name) == ID_CU && tot > 0) { | if (GS(key->from->name) == ID_CU && tot > 0) { | ||||
| Curve *cu = (Curve *)key->from; | Curve *cu = (Curve *)key->from; | ||||
| StructRNA *type = NULL; | StructRNA *type = NULL; | ||||
| NurbInfo info = {0}; | NurbInfo info = {0}; | ||||
| /* Check if all sub-curves have the same type. */ | /* Check if all sub-curves have the same type. */ | ||||
| for (Nurb *nu = cu->nurb.first; nu; nu = nu->next) { | LISTBASE_FOREACH (Nurb *, nu, &cu->nurb) { | ||||
| if (type == NULL) { | if (type == NULL) { | ||||
| type = rna_ShapeKey_curve_point_type(nu); | type = rna_ShapeKey_curve_point_type(nu); | ||||
| rna_ShapeKey_NurbInfo_init(&info, nu); | rna_ShapeKey_NurbInfo_init(&info, nu); | ||||
| } | } | ||||
| else if (type != rna_ShapeKey_curve_point_type(nu)) { | else if (type != rna_ShapeKey_curve_point_type(nu)) { | ||||
| type = NULL; | type = NULL; | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 478 Lines • Show Last 20 Lines | |||||