40 const float normal_factor,
43 bool use_normal = (normal_factor != 0.0f);
87 const int ob_mode = ob_active->
mode;
94 bool changed_multi =
false;
97 for (
const int ob_index : objects.index_range()) {
98 Object *ob_iter = objects[ob_index];
105 if (normal_factor != 0.0f) {
118 int seed_iter =
seed;
130 changed_multi =
true;
142 ot->
idname =
"TRANSFORM_OT_vertex_random";
160 "Increase for uniform offset distance",
169 "Align offset direction to normals",
173 ot->
srna,
"seed", 0, 0, 10000,
"Random Seed",
"Seed for the random number generator", 0, 50);
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, eObjectMode mode)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
MINLINE float max_ff(float a, float b)
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], float t)
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
struct RNG * BLI_rng_new(unsigned int seed)
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_rng_get_float_unit_v3(struct RNG *rng, float v[3]) ATTR_NONNULL(1
Object is a sort of wrapper for general info.
bool ED_transverts_poll(bContext *C)
void ED_transverts_create_from_obedit(TransVertStore *tvs, const Object *obedit, int mode)
void ED_transverts_free(TransVertStore *tvs)
void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit)
Read Guarded memory(de)allocation.
static unsigned long seed
bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)
static int object_rand_verts_exec(bContext *C, wmOperator *op)
static bool object_rand_transverts(TransVertStore *tvs, const float offset, const float uniform, const float normal_factor, const uint seed)
void TRANSFORM_OT_vertex_random(wmOperatorType *ot)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_operator_type_modal_from_exec_for_object_edit_coords(wmOperatorType *ot)