Page Menu
Home
Search
Configure Global Search
Log In
Files
F17175
softbody-lattice.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Arno Mayrhofer (azrael3000)
Nov 13 2013, 3:25 PM
Size
1 KB
Subscribers
None
softbody-lattice.patch
View Options
Index: source/blender/blenkernel/intern/softbody.c
===================================================================
--- source/blender/blenkernel/intern/softbody.c (revision 47053)
+++ source/blender/blenkernel/intern/softbody.c (working copy)
@@ -3514,7 +3514,9 @@
{
Lattice *lt= ob->data;
SoftBody *sb;
- int totvert, totspring = 0;
+ int totvert, totspring = 0, a;
+ BodyPoint *bp;
+ BPoint *bpnt= lt->def;
totvert= lt->pntsu*lt->pntsv*lt->pntsw;
@@ -3531,19 +3533,16 @@
/* renew ends with ob->soft with points and edges, also checks & makes ob->soft */
renew_softbody(scene, ob, totvert, totspring);
sb= ob->soft; /* can be created in renew_softbody() */
+ bp= sb->bpoint;
- /* weights from bpoints, same code used as for mesh vertices */
- /* if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) { 2.4x one*/
- /* new! take the weights from lattice vertex anyhow */
- if (ob->softflag & OB_SB_GOAL) {
- BodyPoint *bp= sb->bpoint;
- BPoint *bpnt= lt->def;
- /* jow_go_for2_5 */
- int a;
-
- for (a=0; a<totvert; a++, bp++, bpnt++) {
- bp->goal= bpnt->weight;
+ /* same code used as for mesh vertices */
+ for (a=0; a<totvert; a++, bp++, bpnt++) {
+ if (ob->softflag & OB_SB_GOAL && sb->vertgroup) {
+ get_scalar_from_vertexgroup(ob, a, (short) (sb->vertgroup-1), &bp->goal);
}
+ else {
+ if (ob->softflag & OB_SB_GOAL) {bp->goal = sb->defgoal;}
+ }
}
/* create some helper edges to enable SB lattice to be useful at all */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3d/ab/ce239add691b0ff05058b2bb3b0d
Event Timeline
Log In to Comment