* Proportional edit mode 'random' falloff

This is another proportional edit falloff that slightly randomises the
influence. It's not strictly random, it's blended with linear falloff so that
it's a bit smoother. The nice thing is that it works with all transforms, axis
locking etc, including the special ones like to sphere, shrink/fatten/etc. It
can be used for all sorts of things like roughening surfaces. I most recently
used it to add a bit of randomness to the folds of some cloth. I
made a short demo video here: http://mke3.net/blender/etc/prop_random-h264.mov

Also included nicer icons for the falloff types.
This commit is contained in:
2006-09-25 05:15:19 +00:00
parent 7fce181d11
commit 2e7aa1dbf5
6 changed files with 1839 additions and 1965 deletions

View File

@@ -88,6 +88,7 @@
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_rand.h"
#include "blendef.h"
@@ -888,6 +889,10 @@ void calculatePropRatio(TransInfo *t)
case PROP_SPHERE:
td->factor = (float)sqrt(2*dist - dist * dist);
break;
case PROP_RANDOM:
BLI_srand( BLI_rand() ); /* random seed */
td->factor = BLI_frand()*dist;
break;
default:
td->factor = 1;
}
@@ -912,6 +917,9 @@ void calculatePropRatio(TransInfo *t)
case PROP_SPHERE:
strcpy(t->proptext, "(Sphere)");
break;
case PROP_RANDOM:
strcpy(t->proptext, "(Random)");
break;
default:
strcpy(t->proptext, "");
}