Page MenuHome

Generic randomize vertices
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Mar 28 2014, 2:13 AM.

Details

Diff Detail

Event Timeline

release/scripts/startup/bl_ui/space_view3d_toolbar.py
468

should we make a wrapper operator for the curves (and bones, surfaces ... ) (ie curve.point_rand) now ?

Looks good, minor suggestions.

  • object_rand_verts_poll could be a generic poll function, apart of ED_transverts.h api. Just a wrapper for ED_transverts_check_obedit
  • Maybe its a good time to have a BLI_frand_v3() function, this is a common operation.
Walid Shouman (walid) updated this revision to Unknown Object (????).Mar 28 2014, 2:56 AM
  • A generic poll function for ED_transverts objects
  • Generating random vectors
  • Support sub_v*_fl functions similar to add_v*_fl functions
source/blender/editors/object/object_rand.c
104

QT complains about it for not being used!
/home/walid3/Programmes/blender_git/master/source/blender/editors/object/object_rand.c:104: warning: variable 'prop' set but not used [-Wunused-but-set-variable]

PropertyRNA *prop;
             ^

is there a missing thing in this usage?

source/blender/editors/object/object_rand.c
104

Just remove it theres no reason to have it.

Walid Shouman (walid) updated this revision to Unknown Object (????).Mar 28 2014, 6:41 PM
  • Remove unused variable

In general ok, but dont think sub_v3_fl(vec, 0.5); is needed, just do add_v3_fl(vec, -0.5);

Walid Shouman (walid) updated this revision to Unknown Object (????).Mar 29 2014, 12:21 AM
  • Remove sub_v*_fl(vec, fl) as add_v*_fl(vec, -ve_fl) would replace it

Think this is generally good, Id like to apply the patch and do some final checks though before its committed to master.