Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_group.c
| Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | void GROUP_OT_objects_add_active(wmOperatorType *ot) | ||||
| RNA_def_enum_funcs(prop, group_object_active_itemf); | RNA_def_enum_funcs(prop, group_object_active_itemf); | ||||
| RNA_def_property_flag(prop, PROP_ENUM_NO_TRANSLATE); | RNA_def_property_flag(prop, PROP_ENUM_NO_TRANSLATE); | ||||
| ot->prop = prop; | ot->prop = prop; | ||||
| } | } | ||||
| static int objects_remove_active_exec(bContext *C, wmOperator *op) | static int objects_remove_active_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| SceneLayer *sl = CTX_data_scene_layer(C); | ViewLayer *sl = CTX_data_view_layer(C); | ||||
| Object *ob = OBACT(sl); | Object *ob = OBACT(sl); | ||||
| int single_group_index = RNA_enum_get(op->ptr, "group"); | int single_group_index = RNA_enum_get(op->ptr, "group"); | ||||
| Group *single_group = group_object_active_find_index(ob, single_group_index); | Group *single_group = group_object_active_find_index(ob, single_group_index); | ||||
| Group *group; | Group *group; | ||||
| bool ok = false; | bool ok = false; | ||||
| if (ob == NULL) | if (ob == NULL) | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| ▲ Show 20 Lines • Show All 371 Lines • Show Last 20 Lines | |||||