diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-30 16:15:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-30 16:15:16 +0400 |
commit | 71446eea573db3ac6bac5f297c0655acbeada67c (patch) | |
tree | 6bac99531e7c4ce7cc9d8b512920a037e444be32 /source/blender/editors/space_buttons/buttons_context.c | |
parent | 253de0ed86f273d0032acbbd0b8237a358b35cbd (diff) |
* Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
/usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
bpy.data.images.load(), missed this call.
(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index e1df3b9f18f..961c3cf17ce 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -816,21 +816,9 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r static void pin_cb(bContext *C, void *arg1, void *arg2) { SpaceButs *sbuts= CTX_wm_space_buts(C); - ButsContextPath *path= sbuts->path; - PointerRNA *ptr; - int a; if(sbuts->flag & SB_PIN_CONTEXT) { - if(path->len) { - for(a=path->len-1; a>=0; a--) { - ptr= &path->ptr[a]; - - if(ptr->id.data) { - sbuts->pinid= ptr->id.data; - break; - } - } - } + sbuts->pinid= buttons_context_id_path(C); } else sbuts->pinid= NULL; @@ -901,3 +889,24 @@ void buttons_context_register(ARegionType *art) pt->flag= PNL_NO_HEADER; BLI_addtail(&art->paneltypes, pt); } + +ID *buttons_context_id_path(const bContext *C) +{ + SpaceButs *sbuts= CTX_wm_space_buts(C); + ButsContextPath *path= sbuts->path; + PointerRNA *ptr; + int a; + + if(path->len) { + for(a=path->len-1; a>=0; a--) { + ptr= &path->ptr[a]; + + if(ptr->id.data) { + return ptr->id.data; + break; + } + } + } + + return NULL; +} |