48 const bool check_editable,
49 const bool check_edit_mode)
60 if (check_edit_mode) {
102 return has_anything_selected(*pointcloud);
131 ot->name =
"(De)select All";
132 ot->idname =
"POINTCLOUD_OT_select_all";
133 ot->description =
"(De)select all point cloud";
150 const IndexMask inv_random_elements = random_mask(
157 if (!was_anything_selected) {
182 ot->name =
"Select Random";
183 ot->idname = __func__;
184 ot->description =
"Randomizes existing selection or create new random selection";
198 "Source of randomness",
207 "Chance of every point being included in the selection",
231 ot->idname = __func__;
232 ot->description =
"Remove selected points";
257 "Make copies of selected elements and move them",
#define CTX_DATA_BEGIN(C, Type, instance, member)
Object * CTX_data_active_object(const bContext *C)
Main * CTX_data_main(const bContext *C)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
void DEG_id_tag_update(ID *id, unsigned int flags)
bool ED_operator_object_active_editable_ex(bContext *C, const Object *ob)
BMesh const char void * data
static unsigned long seed
constexpr const T * end() const
constexpr const T * begin() const
void add_new(const Key &key)
IndexMask complement(const IndexMask &universe, IndexMaskMemory &memory) const
static wmOperatorStatus delete_exec(bContext *C, wmOperator *)
static wmOperatorStatus select_all_exec(bContext *C, wmOperator *op)
bool editable_pointcloud_in_edit_mode_poll(bContext *C)
static wmOperatorStatus select_random_exec(bContext *C, wmOperator *op)
static void POINTCLOUD_OT_delete(wmOperatorType *ot)
void operatortypes_pointcloud()
static void POINTCLOUD_OT_select_random(wmOperatorType *ot)
void fill_selection_true(GMutableSpan span)
static bool editable_pointcloud_poll(bContext *C)
bool remove_selection(PointCloud &pointcloud)
static void select_random_ui(bContext *, wmOperator *op)
void POINTCLOUD_OT_duplicate(wmOperatorType *ot)
void operatormacros_pointcloud()
static bool pointcloud_poll_impl(bContext *C, const bool check_editable, const bool check_edit_mode)
void POINTCLOUD_OT_attribute_set(wmOperatorType *ot)
void keymap_pointcloud(wmKeyConfig *keyconf)
bke::GSpanAttributeWriter ensure_selection_attribute(PointCloud &pointcloud, bke::AttrType create_type)
void fill_selection_false(GMutableSpan selection, const IndexMask &mask)
static bool object_has_editable_pointcloud(const Main &bmain, const Object &object)
bool has_anything_selected(const PointCloud &pointcloud)
void select_all(PointCloud &pointcloud, int action)
VectorSet< PointCloud * > get_unique_editable_pointclouds(const bContext &C)
static void POINTCLOUD_OT_select_all(wmOperatorType *ot)
void POINTCLOUD_OT_separate(wmOperatorType *ot)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(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)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
bool(* poll)(struct bContext *)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void WM_operator_properties_select_all(wmOperatorType *ot)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)