Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/buttons_context.c
| Show First 20 Lines • Show All 1,243 Lines • ▼ Show 20 Lines | for (a = path->len - 1; a >= 0; a--) { | ||||
| /* pin particle settings instead of system, since only settings are an idblock*/ | /* pin particle settings instead of system, since only settings are an idblock*/ | ||||
| if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) { | if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) { | ||||
| if (ptr->type == &RNA_ParticleSystem && ptr->data) { | if (ptr->type == &RNA_ParticleSystem && ptr->data) { | ||||
| ParticleSystem *psys = (ParticleSystem *)ptr->data; | ParticleSystem *psys = (ParticleSystem *)ptr->data; | ||||
| return &psys->part->id; | return &psys->part->id; | ||||
| } | } | ||||
| } | } | ||||
| /* There is no valid image ID panel, Image Empty objects need this workaround.*/ | |||||
| if (sbuts->mainb == BCONTEXT_DATA && sbuts->flag & SB_PIN_CONTEXT) { | |||||
| if (ptr->type == &RNA_Image && ptr->data) { | |||||
| continue; | |||||
| } | |||||
| } | |||||
| if (ptr->owner_id) { | if (ptr->owner_id) { | ||||
| return ptr->owner_id; | return ptr->owner_id; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||