[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15873] trunk/blender/source/blender/src: Copy Attributes now has option to copy all physical attributes.

Mal Duffin malachyduffin at gmail.com
Tue Jul 29 23:50:00 CEST 2008


Revision: 15873
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15873
Author:   mal_cando
Date:     2008-07-29 23:49:59 +0200 (Tue, 29 Jul 2008)

Log Message:
-----------
Copy Attributes now has option to copy all physical attributes.

There existed two options to copy only the mass, and only the damping, but no option to copy all of the physical attributes.

This patch adds in this option, right under the Mass and Damping listings.

Modified Paths:
--------------
    trunk/blender/source/blender/src/editobject.c
    trunk/blender/source/blender/src/header_view3d.c

Modified: trunk/blender/source/blender/src/editobject.c
===================================================================
--- trunk/blender/source/blender/src/editobject.c	2008-07-29 20:28:11 UTC (rev 15872)
+++ trunk/blender/source/blender/src/editobject.c	2008-07-29 21:49:59 UTC (rev 15873)
@@ -3506,6 +3506,17 @@
 					base->object->damping= ob->damping;
 					base->object->rdamping= ob->rdamping;
 				}
+				else if(event==11) {	/* all physical attributes */
+					base->object->gameflag = ob->gameflag;
+					base->object->inertia = ob->inertia;
+					base->object->formfactor = ob->formfactor;
+					base->object->damping= ob->damping;
+					base->object->rdamping= ob->rdamping;
+					base->object->mass= ob->mass;
+					if (ob->gameflag & OB_BOUNDS) {
+						base->object->boundtype = ob->boundtype;
+					}
+				}
 				else if(event==17) {	/* tex space */
 					copy_texture_space(base->object, ob);
 				}
@@ -3692,7 +3703,7 @@
 	 * view3d_edit_object_copyattrmenu() and in toolbox.c
 	 */
 	
-	strcpy(str, "Copy Attributes %t|Location%x1|Rotation%x2|Size%x3|Draw Options%x4|Time Offset%x5|Dupli%x6|%l|Mass%x7|Damping%x8|Properties%x9|Logic Bricks%x10|Protected Transform%x29|%l");
+	strcpy(str, "Copy Attributes %t|Location%x1|Rotation%x2|Size%x3|Draw Options%x4|Time Offset%x5|Dupli%x6|%l|Mass%x7|Damping%x8|All Physical Attributes%x11|Properties%x9|Logic Bricks%x10|Protected Transform%x29|%l");
 	
 	strcat (str, "|Object Constraints%x22");
 	strcat (str, "|NLA Strips%x26");

Modified: trunk/blender/source/blender/src/header_view3d.c
===================================================================
--- trunk/blender/source/blender/src/header_view3d.c	2008-07-29 20:28:11 UTC (rev 15872)
+++ trunk/blender/source/blender/src/header_view3d.c	2008-07-29 21:49:59 UTC (rev 15873)
@@ -2196,6 +2196,7 @@
 	
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mass|Ctrl C, 7",			0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Damping|Ctrl C, 8",			0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
+	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "All Physical Attributes|Ctrl C, 11",			0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Properties|Ctrl C, 9",			0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Logic Bricks|Ctrl C, 10",			0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Protected Transform |Ctrl C",			0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 29, "");





More information about the Bf-blender-cvs mailing list