26
24
* ***** END GPL LICENSE BLOCK *****
31
#ifndef __ED_OBJECT_H__
32
#define __ED_OBJECT_H__
38
39
struct bConstraint;
39
41
struct bPoseChannel;
43
struct EnumPropertyItem;
46
57
struct wmOperatorType;
50
59
/* object_edit.c */
51
struct Object *ED_object_active_context(struct bContext *C);
60
struct Object *ED_object_context(struct bContext *C); /* context.object */
61
struct Object *ED_object_active_context(struct bContext *C); /* context.object or context.active_object */
54
64
void ED_operatortypes_object(void);
55
65
void ED_operatormacros_object(void);
56
66
void ED_keymap_object(struct wmKeyConfig *keyconf);
58
/* generic editmode keys like pet */
68
/* object_relations.c */
69
typedef enum eParentType {
73
PAR_ARMATURE_ENVELOPE,
84
extern struct EnumPropertyItem prop_clear_parent_types[];
85
extern struct EnumPropertyItem prop_make_parent_types[];
87
int ED_object_parent_set(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct Object *par, int partype);
88
void ED_object_parent_clear(struct bContext *C, int type);
91
/* generic editmode keys like pet
96
* 3: Edit with connected
59
98
void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet);
61
100
/* send your own notifier for select! */
63
102
/* includes notifier */
64
103
void ED_base_object_activate(struct bContext *C, struct Base *base);
66
void ED_base_object_free_and_unlink(struct Scene *scene, struct Base *base);
105
void ED_base_object_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Base *base);
68
107
/* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */
69
struct Base *ED_object_add_duplicate(struct Scene *scene, struct Base *base, int dupflag);
108
struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct Base *base, int dupflag);
71
110
void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr);
89
128
void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode);
90
129
int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
91
int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, float *loc, float *rot, int *enter_editmode, unsigned int *layer);
92
struct Object *ED_object_add_type(struct bContext *C, int type, float *loc, float *rot, int enter_editmode, unsigned int layer);
94
void ED_object_single_users(struct Scene *scene, int full);
97
int object_is_libdata(struct Object *ob);
98
int object_data_is_libdata(struct Object *ob);
130
int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op,
131
float *loc, float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned);
133
struct Object *ED_object_add_type(struct bContext *C, int type, float *loc,
134
float *rot, int enter_editmode, unsigned int layer);
136
void ED_object_single_users(struct Main *bmain, struct Scene *scene, int full);
137
void ED_object_single_user(struct Scene *scene, struct Object *ob);
100
139
/* object motion paths */
101
void ED_objects_clear_paths(struct bContext *C, struct Scene *scene);
140
void ED_objects_clear_paths(struct bContext *C);
102
141
void ED_objects_recalculate_paths(struct bContext *C, struct Scene *scene);
104
143
/* constraints */
111
150
void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con);
112
151
void ED_object_constraint_update(struct Object *ob);
113
void ED_object_constraint_dependency_update(struct Scene *scene, struct Object *ob);
152
void ED_object_constraint_dependency_update(struct Main *bmain, struct Scene *scene, struct Object *ob);
115
154
/* object_lattice.c */
116
int mouse_lattice(struct bContext *C, short mval[2], int extend);
117
void undo_push_lattice(struct bContext *C, char *name);
155
int mouse_lattice(struct bContext *C, const int mval[2], int extend);
156
void undo_push_lattice(struct bContext *C, const char *name);
119
158
/* object_lattice.c */
123
162
/* object_modifier.c */
125
164
MODIFIER_APPLY_DATA=1,
126
MODIFIER_APPLY_SHAPE,
127
} eModifier_Apply_Mode;
129
struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Scene *scene, struct Object *ob, char *name, int type);
130
int ED_object_modifier_remove(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md);
168
struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name, int type);
169
int ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md);
170
void ED_object_modifier_clear(struct Main *bmain, struct Scene *scene, struct Object *ob);
131
171
int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
132
172
int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
133
int ED_object_modifier_convert(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md);
173
int ED_object_modifier_convert(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md);
134
174
int ED_object_modifier_apply(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md, int mode);
135
175
int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
137
#endif /* ED_OBJECT_H */
181
#endif /* __ED_OBJECT_H__ */