[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31510] trunk/blender: - bugfix [#23407] vertex painting on a mesh with no face segfaults

Campbell Barton ideasman42 at gmail.com
Sun Aug 22 08:31:28 CEST 2010


Revision: 31510
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31510
Author:   campbellbarton
Date:     2010-08-22 08:31:26 +0200 (Sun, 22 Aug 2010)

Log Message:
-----------
- bugfix [#23407] vertex painting on a mesh with no face segfaults
- removed animsys update values that dont need animating.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/animsys_update.py
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py
    trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c

Modified: trunk/blender/release/scripts/op/animsys_update.py
===================================================================
--- trunk/blender/release/scripts/op/animsys_update.py	2010-08-22 05:45:04 UTC (rev 31509)
+++ trunk/blender/release/scripts/op/animsys_update.py	2010-08-22 06:31:26 UTC (rev 31510)
@@ -19,10 +19,6 @@
 # <pep8 compliant>
 
 data_path_update = [
-    ("AnimVizMotionPaths", "after_current", "frame_after"),
-    ("AnimVizMotionPaths", "before_current", "frame_before"),
-    ("AnimVizOnionSkinning", "after_current", "frame_after"),
-    ("AnimVizOnionSkinning", "before_current", "frame_before"),
     ("ClothCollisionSettings", "min_distance", "distance_min"),
     ("ClothCollisionSettings", "self_min_distance", "self_distance_min"),
     ("ClothCollisionSettings", "enable_collision", "use_collision"),
@@ -117,18 +113,6 @@
     ("OutflowFluidSettings", "export_animated_mesh", "use_animated_mesh"),
     ("ParticleFluidSettings", "drops", "use_drops"),
     ("ParticleFluidSettings", "floats", "use_floats"),
-    ("GameSoftBodySettings", "linstiff", "linear_stiffness"),
-    ("GameSoftBodySettings", "position_iterations", "location_iterations"),
-    ("GameSoftBodySettings", "bending_const", "use_bending_constraints"),
-    ("GameSoftBodySettings", "cluster_rigid_to_softbody", "use_cluster_rigid_to_softbody"),
-    ("GameSoftBodySettings", "cluster_soft_to_softbody", "use_cluster_soft_to_softbody"),
-    ("GameSoftBodySettings", "shape_match", "use_shape_match"),
-    ("NetRenderSettings", "master_broadcast", "use_master_broadcast"),
-    ("NetRenderSettings", "master_clear", "use_master_clear"),
-    ("NetRenderSettings", "slave_clear", "use_slave_clear"),
-    ("NetRenderSettings", "slave_outputlog", "use_slave_output_log"),
-    ("NetRenderSettings", "slave_thumb", "use_slave_thumb"),
-    ("PoseTemplateSettings", "generate_def_rig", "use_generate_deform_rig"),
     ("Armature", "drawtype", "draw_type"),
     ("Armature", "layer_protection", "layers_protected"),
     ("Armature", "auto_ik", "use_auto_ik"),
@@ -685,7 +669,6 @@
     ("TextureNodeMixRGB", "alpha", "use_alpha"),
     ("TextureSlot", "negate", "invert"),
     ("TextureSlot", "size", "scale"),
-    ("VertexPaint", "normals", "use_normal"),
     ("SoftBodySettings", "damp", "damping"),
     ("SequenceCrop", "right", "max_x"),
     ("SequenceCrop", "top", "max_y"),

Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-08-22 05:45:04 UTC (rev 31509)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-08-22 06:31:26 UTC (rev 31510)
@@ -1117,7 +1117,7 @@
 
         col = layout.column()
         col.prop(wpaint, "use_all_faces")
-        col.prop(wpaint, "normals")
+        col.prop(wpaint, "use_normal")
         col.prop(wpaint, "use_spray")
 
         obj = context.weight_paint_object

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2010-08-22 05:45:04 UTC (rev 31509)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2010-08-22 06:31:26 UTC (rev 31510)
@@ -95,7 +95,7 @@
 {
 	Object *ob = CTX_data_active_object(C);
 
-	return ob && ob->mode == OB_MODE_VERTEX_PAINT;
+	return ob && ob->mode == OB_MODE_VERTEX_PAINT && ((Mesh *)ob->data)->totface;
 }
 
 int vertex_paint_poll(bContext *C)
@@ -107,8 +107,8 @@
 			ARegion *ar= CTX_wm_region(C);
 			if(ar->regiontype==RGN_TYPE_WINDOW)
 				return 1;
+			}
 		}
-	}
 	return 0;
 }
 
@@ -116,7 +116,7 @@
 {
 	Object *ob = CTX_data_active_object(C);
 
-	return ob && ob->mode == OB_MODE_WEIGHT_PAINT;
+	return ob && ob->mode == OB_MODE_WEIGHT_PAINT && ((Mesh *)ob->data)->totface;
 }
 
 int weight_paint_poll(bContext *C)





More information about the Bf-blender-cvs mailing list