Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-22 17:04:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-22 17:04:47 +0300
commitfc7c3c663ef6d908e3c165515a144bdbfddee867 (patch)
tree86df3dff8ae11197814fd4d46b778e3b6a84b1ba /source/blender/editors/sculpt_paint
parenta69524358bc3fdd2018ad64f79cba9e92f5e0e07 (diff)
- weight paint poll would crash if no area was found.
- don't print a line for each operator run when in background mode. - extrude was using an invalid type for RNA access.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index b0979817c88..6859fd333bc 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -127,15 +127,18 @@ int weight_paint_mode_poll(bContext *C)
int weight_paint_poll(bContext *C)
{
- Object *ob = CTX_data_active_object(C);
-
- if(ob && ob->mode & OB_MODE_WEIGHT_PAINT &&
- paint_brush(&CTX_data_tool_settings(C)->wpaint->paint)) {
- ScrArea *sa= CTX_wm_area(C);
- if(sa->spacetype==SPACE_VIEW3D) {
- ARegion *ar= CTX_wm_region(C);
- if(ar->regiontype==RGN_TYPE_WINDOW)
- return 1;
+ Object *ob= CTX_data_active_object(C);
+ ScrArea *sa;
+
+ if( (ob != NULL) &&
+ (ob->mode & OB_MODE_WEIGHT_PAINT) &&
+ (paint_brush(&CTX_data_tool_settings(C)->wpaint->paint) != NULL) &&
+ (sa= CTX_wm_area(C)) &&
+ (sa->spacetype == SPACE_VIEW3D)
+ ) {
+ ARegion *ar= CTX_wm_region(C);
+ if(ar->regiontype==RGN_TYPE_WINDOW) {
+ return 1;
}
}
return 0;