Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/lattice/editlattice_select.c
| Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Select Random Operator | /** \name Select Random Operator | ||||
| * \{ */ | * \{ */ | ||||
| static int lattice_select_random_exec(bContext *C, wmOperator *op) | static int lattice_select_random_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| const float randfac = RNA_float_get(op->ptr, "percent") / 100.0f; | const float randfac = RNA_float_get(op->ptr, "ratio"); | ||||
| const int seed = WM_operator_properties_select_random_seed_increment_get(op); | const int seed = WM_operator_properties_select_random_seed_increment_get(op); | ||||
| const bool select = (RNA_enum_get(op->ptr, "action") == SEL_SELECT); | const bool select = (RNA_enum_get(op->ptr, "action") == SEL_SELECT); | ||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| uint objects_len = 0; | uint objects_len = 0; | ||||
| Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( | Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( | ||||
| view_layer, CTX_wm_view3d(C), &objects_len); | view_layer, CTX_wm_view3d(C), &objects_len); | ||||
| for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | ||||
| ▲ Show 20 Lines • Show All 577 Lines • Show Last 20 Lines | |||||