diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 05:25:53 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 05:25:53 +0400 |
commit | ebf1c5faca86286aa90ab5ab9fc4d3ddb1f51cdf (patch) | |
tree | 1e457366adcd664233760e5e17b20aa6c3f8e4a2 /source/blender/editors/space_buttons | |
parent | db1cab0f3a75562eebf5aea93753e77582a4c3e4 (diff) |
2.5/Texture paint
* Made texture paint object-localized too.
Note for Brecht: gpu_draw.c had three uses of G_TEXTUREPAINT that I was not able to cleanly fix, so commented out for now. Can you take a look and see what should be done here?
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index a1e1c589449..ad65177650f 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -321,14 +321,16 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path) scene= path->ptr[path->len-1].data; ts= scene->toolsettings; - if(obact && obact->mode & OB_MODE_SCULPT) - br= ts->sculpt->brush; - else if(obact && obact->mode & OB_MODE_VERTEX_PAINT) - br= ts->vpaint->brush; - else if(obact && obact->mode & OB_MODE_WEIGHT_PAINT) - br= ts->wpaint->brush; - else if(G.f & G_TEXTUREPAINT) - br= ts->imapaint.brush; + if(obact) { + if(obact->mode & OB_MODE_SCULPT) + br= ts->sculpt->brush; + else if(obact->mode & OB_MODE_VERTEX_PAINT) + br= ts->vpaint->brush; + else if(obact->mode & OB_MODE_WEIGHT_PAINT) + br= ts->wpaint->brush; + else if(obact->mode & OB_MODE_TEXTURE_PAINT) + br= ts->imapaint.brush; + } if(br) { RNA_id_pointer_create(&br->id, &path->ptr[path->len]); |