41 const float normal_factor,
44 bool use_normal = (normal_factor != 0.0f);
85 const int ob_mode = ob_active->
mode;
92 bool changed_multi =
false;
97 Object *ob_iter = objects[ob_index];
104 if (normal_factor != 0.0f) {
118 int seed_iter = seed;
130 changed_multi =
true;
140 ot->
name =
"Randomize";
142 ot->
idname =
"TRANSFORM_OT_vertex_random";
153 ot->
srna,
"offset", 0.0f, -
FLT_MAX,
FLT_MAX,
"Amount",
"Distance to offset", -10.0f, 10.0f);
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);
Object is a sort of wrapper for general info.
IndexRange index_range() const
bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)
static wmOperatorStatus 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)
MINLINE void negate_v3_v3(float r[3], const float a[3])
void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit)
MINLINE void copy_v3_v3(float r[3], const float a[3])
bool ED_transverts_poll(bContext *C)
int RNA_int_get(PointerRNA *ptr, const char *name)
ViewLayer * CTX_data_view_layer(const bContext *C)
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)
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
void ED_transverts_create_from_obedit(TransVertStore *tvs, const Object *obedit, int mode)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
Object * CTX_data_edit_object(const bContext *C)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
Vector< Object * > BKE_view_layer_array_from_objects_in_mode_unique_data(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d, eObjectMode mode)
void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], float t)
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)
Main * CTX_data_main(const bContext *C)
MINLINE float max_ff(float a, float b)
void ED_transverts_free(TransVertStore *tvs)
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)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
Scene * CTX_data_scene(const bContext *C)
void WM_operator_type_modal_from_exec_for_object_edit_coords(wmOperatorType *ot)
VecBase< float, 3 > float3
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
float RNA_float_get(PointerRNA *ptr, const char *name)
View3D * CTX_wm_view3d(const bContext *C)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports