[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57991] branches/soc-2013-rigid_body_sim: svn merge -r57985:57990 ^/trunk/blender

Sergej Reich sergej.reich at googlemail.com
Thu Jul 4 12:16:23 CEST 2013


Revision: 57991
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57991
Author:   sergof
Date:     2013-07-04 10:16:22 +0000 (Thu, 04 Jul 2013)
Log Message:
-----------
svn merge -r57985:57990 ^/trunk/blender

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57985

Modified Paths:
--------------
    branches/soc-2013-rigid_body_sim/source/blender/blenkernel/intern/rigidbody.c
    branches/soc-2013-rigid_body_sim/source/blender/editors/object/object_vgroup.c

Property Changed:
----------------
    branches/soc-2013-rigid_body_sim/


Property changes on: branches/soc-2013-rigid_body_sim
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-57521,57525-57642,57644-57984
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-57521,57525-57642,57644-57984,57986-57990

Modified: branches/soc-2013-rigid_body_sim/source/blender/blenkernel/intern/rigidbody.c
===================================================================
--- branches/soc-2013-rigid_body_sim/source/blender/blenkernel/intern/rigidbody.c	2013-07-04 09:31:33 UTC (rev 57990)
+++ branches/soc-2013-rigid_body_sim/source/blender/blenkernel/intern/rigidbody.c	2013-07-04 10:16:22 UTC (rev 57991)
@@ -926,12 +926,10 @@
 				if (obt && obt->rigidbody_constraint) {
 					rbc = obt->rigidbody_constraint;
 					if (rbc->ob1 == ob) {
-						rbc->ob1 = NULL;
-						rbc->flag |= RBC_FLAG_NEEDS_VALIDATE;
+						BKE_rigidbody_remove_constraint(scene, obt);
 					}
 					if (rbc->ob2 == ob) {
-						rbc->ob2 = NULL;
-						rbc->flag |= RBC_FLAG_NEEDS_VALIDATE;
+						BKE_rigidbody_remove_constraint(scene, obt);
 					}
 				}
 			}
@@ -950,10 +948,9 @@
 	RigidBodyWorld *rbw = scene->rigidbody_world;
 	RigidBodyCon *rbc = ob->rigidbody_constraint;
 
-	if (rbw) {
-		/* remove from rigidbody world, free object won't do this */
-		if (rbw && rbw->physics_world && rbc->physics_constraint)
-			RB_dworld_remove_constraint(rbw->physics_world, rbc->physics_constraint);
+	/* remove from rigidbody world, free object won't do this */
+	if (rbw && rbw->physics_world && rbc->physics_constraint) {
+		RB_dworld_remove_constraint(rbw->physics_world, rbc->physics_constraint);
 	}
 	/* remove object's settings */
 	BKE_rigidbody_free_constraint(ob);

Modified: branches/soc-2013-rigid_body_sim/source/blender/editors/object/object_vgroup.c
===================================================================
--- branches/soc-2013-rigid_body_sim/source/blender/editors/object/object_vgroup.c	2013-07-04 09:31:33 UTC (rev 57990)
+++ branches/soc-2013-rigid_body_sim/source/blender/editors/object/object_vgroup.c	2013-07-04 10:16:22 UTC (rev 57991)
@@ -2909,6 +2909,17 @@
 {
 	Object *ob = ED_object_context(C);
 	ID *data = (ob) ? ob->data : NULL;
+
+	return (ob && !ob->id.lib &&
+	        data && !data->lib &&
+	        OB_TYPE_SUPPORT_VGROUP(ob->type) &&
+	        ob->defbase.first);
+}
+
+static int vertex_group_supported_poll(bContext *C)
+{
+	Object *ob = ED_object_context(C);
+	ID *data = (ob) ? ob->data : NULL;
 	return (ob && !ob->id.lib && OB_TYPE_SUPPORT_VGROUP(ob->type) && data && !data->lib);
 }
 
@@ -2916,9 +2927,21 @@
 {
 	Object *ob = ED_object_context(C);
 	ID *data = (ob) ? ob->data : NULL;
+
+	return (ob && !ob->id.lib &&
+	        data && !data->lib &&
+	        ob->type == OB_MESH &&
+	        ob->defbase.first);
+}
+
+static int vertex_group_mesh_supported_poll(bContext *C)
+{
+	Object *ob = ED_object_context(C);
+	ID *data = (ob) ? ob->data : NULL;
 	return (ob && !ob->id.lib && ob->type == OB_MESH && data && !data->lib);
 }
 
+
 static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
 {
 	Object *ob = ED_object_context(C);
@@ -3003,7 +3026,7 @@
 	ot->description = "Add a new vertex group to the active object";
 	
 	/* api callbacks */
-	ot->poll = vertex_group_poll;
+	ot->poll = vertex_group_supported_poll;
 	ot->exec = vertex_group_add_exec;
 
 	/* flags */
@@ -3820,7 +3843,7 @@
 	ot->description = "Transfer weight paint to active from selected mesh";
 
 	/* API callbacks.*/
-	ot->poll = vertex_group_mesh_poll;
+	ot->poll = vertex_group_mesh_supported_poll;
 	ot->exec = vertex_group_transfer_weight_exec;
 
 	/* Flags.*/




More information about the Bf-blender-cvs mailing list