2.5
***** small commit, ported make dupli real
This commit is contained in:
@@ -2293,6 +2293,44 @@ void OBJECT_OT_make_track(wmOperatorType *ot)
|
||||
prop = RNA_def_property(ot->srna, "type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, prop_make_track_types);
|
||||
}
|
||||
|
||||
/* ************* Make Dupli Real ********* */
|
||||
|
||||
static int object_make_dupli_real_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
ScrArea *sa= CTX_wm_area(C);
|
||||
View3D *v3d= sa->spacedata.first;
|
||||
|
||||
clear_id_newpoins();
|
||||
|
||||
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
|
||||
make_object_duplilist_real(scene, v3d, base);
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
DAG_scene_sort(CTX_data_scene(C));
|
||||
ED_anim_dag_flush_update(C);
|
||||
WM_event_add_notifier(C, NC_SCENE, CTX_data_scene(C));
|
||||
|
||||
ED_undo_push(C,"Make duplicates real");
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void OBJECT_OT_make_dupli_real(wmOperatorType *ot)
|
||||
{
|
||||
|
||||
/* identifiers */
|
||||
ot->name= "Make Dupli Real";
|
||||
ot->idname= "OBJECT_OT_make_dupli_real";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_operator_confirm;
|
||||
ot->exec= object_make_dupli_real_exec;
|
||||
|
||||
ot->poll= ED_operator_scene_editable;
|
||||
}
|
||||
/* ******************* Set Object Center ********************** */
|
||||
|
||||
static EnumPropertyItem prop_set_center_types[] = {
|
||||
|
||||
@@ -62,6 +62,7 @@ void OBJECT_OT_set_restrictview(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_set_slowparent(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_clear_slowparent(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_set_center(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_make_dupli_real(struct wmOperatorType *ot);
|
||||
|
||||
|
||||
/* editlattice.c */
|
||||
|
||||
@@ -83,6 +83,7 @@ void ED_operatortypes_object(void)
|
||||
WM_operatortype_append(OBJECT_OT_set_slowparent);
|
||||
WM_operatortype_append(OBJECT_OT_clear_slowparent);
|
||||
WM_operatortype_append(OBJECT_OT_set_center);
|
||||
WM_operatortype_append(OBJECT_OT_make_dupli_real);
|
||||
}
|
||||
|
||||
void ED_keymap_object(wmWindowManager *wm)
|
||||
|
||||
Reference in New Issue
Block a user