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>2009-12-23 18:51:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-23 18:51:39 +0300
commit4aa15ee9f2799e6d39150ec9918bbcb015f7eea0 (patch)
treedd0208ea8323477c9fd90e07d283508825a87a16
parent6c1bbcd8a2a617b04d053f7f4444b2613a720aa0 (diff)
crash fix for sculpt when loading some files
-rw-r--r--release/scripts/ui/space_view3d_toolbar.py2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py
index ca8978eecf8..15902215d84 100644
--- a/release/scripts/ui/space_view3d_toolbar.py
+++ b/release/scripts/ui/space_view3d_toolbar.py
@@ -690,7 +690,7 @@ class VIEW3D_PT_sculpt_options(PaintPanel):
bl_label = "Options"
def poll(self, context):
- return context.sculpt_object
+ return (context.sculpt_object and context.tool_settings.sculpt)
def draw(self, context):
layout = self.layout
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index edb91f2b0c9..8060514accd 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2796,6 +2796,8 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
else if(dt==OB_SOLID) {
+ Paint *p;
+
if((v3d->flag&V3D_SELECT_OUTLINE) && (base->flag&SELECT) && !draw_wire && !ob->sculpt)
draw_mesh_object_outline(v3d, ob, dm);
@@ -2804,8 +2806,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glEnable(GL_LIGHTING);
glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
- if(ob->sculpt) {
- Paint *p = paint_get_active(scene);
+ if(ob->sculpt && (p=paint_get_active(scene))) {
float planes[4][4];
float (*fpl)[4] = NULL;
int fast= (p->flags & PAINT_FAST_NAVIGATE) && (rv3d->rflag & RV3D_NAVIGATING);