Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_armature.c
| Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
| static int gpencil_bone_looper(Object *ob, | static int gpencil_bone_looper(Object *ob, | ||||
| Bone *bone, | Bone *bone, | ||||
| void *data, | void *data, | ||||
| int (*bone_func)(Object *, Bone *, void *)) | int (*bone_func)(Object *, Bone *, void *)) | ||||
| { | { | ||||
| /* We want to apply the function bone_func to every bone | /* We want to apply the function bone_func to every bone | ||||
| * in an armature -- feed bone_looper the first bone and | * in an armature -- feed bone_looper the first bone and | ||||
| * a pointer to the bone_func and watch it go!. The int count | * a pointer to the bone_func and watch it go! The int count | ||||
| * can be useful for counting bones with a certain property | * can be useful for counting bones with a certain property | ||||
| * (e.g. skinnable) | * (e.g. skinnable) | ||||
| */ | */ | ||||
| int count = 0; | int count = 0; | ||||
| if (bone) { | if (bone) { | ||||
| /* only do bone_func if the bone is non null */ | /* only do bone_func if the bone is non null */ | ||||
| count += bone_func(ob, bone, data); | count += bone_func(ob, bone, data); | ||||
| ▲ Show 20 Lines • Show All 613 Lines • Show Last 20 Lines | |||||