Blender  V2.93
ED_object.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "BLI_compiler_attrs.h"
27 #include "DNA_object_enums.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct Base;
34 struct Depsgraph;
35 struct EnumPropertyItem;
36 struct ID;
37 struct Main;
38 struct ModifierData;
39 struct Object;
40 struct PointerRNA;
41 struct PropertyRNA;
42 struct ReportList;
43 struct Scene;
44 struct ShaderFxData;
45 struct View3D;
46 struct ViewLayer;
47 struct XFormObjectData;
48 struct bConstraint;
49 struct bContext;
50 struct bFaceMap;
51 struct bPoseChannel;
52 struct uiLayout;
53 struct wmKeyConfig;
54 struct wmOperator;
55 struct wmOperatorType;
56 
57 /* object_edit.c */
58 /* context.object */
59 struct Object *ED_object_context(const struct bContext *C);
60 /* context.object or context.active_object */
61 struct Object *ED_object_active_context(const struct bContext *C);
62 void ED_collection_hide_menu_draw(const struct bContext *C, struct uiLayout *layout);
63 
65  bool (*filter_fn)(struct Object *ob, void *user_data),
66  void *filter_user_data,
67  uint *r_objects_len);
68 
69 /* object_utils.c */
71  const bool select_only,
72  float r_center[3]);
74  const bool select_only,
75  float r_center[3]);
76 bool ED_object_calc_active_center(struct Object *ob, const bool select_only, float r_center[3]);
77 
78 /* Object Data Container helper API. */
83  struct Main *bmain,
84  struct Depsgraph *depsgraph);
86  struct Object *ob);
87 
88 /* Object Skip-Child Container helper API. */
89 enum {
106 };
110  struct XFormObjectSkipChild_Container *xcs,
111  struct ViewLayer *view_layer,
112  struct Object **objects,
113  uint objects_len);
116  struct Main *bmain,
117  struct Depsgraph *depsgraph);
119  struct Object *ob,
120  struct Object *ob_parent_recurse,
121  int mode);
122 
123 /* object_ops.c */
124 void ED_operatortypes_object(void);
125 void ED_operatormacros_object(void);
126 void ED_keymap_object(struct wmKeyConfig *keyconf);
127 
128 /* object_relations.c */
129 typedef enum eParentType {
144 
145 typedef enum eObjectSelect_Mode {
150 
151 typedef enum eObClearParentTypes {
156 
157 #ifdef __RNA_TYPES_H__
160 #endif
161 
162 /* Set the object's parent, return true if successful. */
163 bool ED_object_parent_set(struct ReportList *reports,
164  const struct bContext *C,
165  struct Scene *scene,
166  struct Object *const ob,
167  struct Object *const par,
168  int partype,
169  const bool xmirror,
170  const bool keep_transform,
171  const int vert_par[3]);
172 void ED_object_parent_clear(struct Object *ob, const int type);
173 
174 void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode);
175 void ED_object_base_activate(struct bContext *C, struct Base *base);
177 void ED_object_base_active_refresh(struct Main *bmain,
178  struct Scene *scene,
179  struct ViewLayer *view_layer);
180 void ED_object_base_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Object *ob);
182  struct Scene *scene,
183  struct Object *ob);
184 bool ED_object_base_deselect_all_ex(struct ViewLayer *view_layer,
185  struct View3D *v3d,
186  int action,
187  bool *r_any_visible);
188 bool ED_object_base_deselect_all(struct ViewLayer *view_layer, struct View3D *v3d, int action);
189 
190 /* single object duplicate, if (dupflag == 0), fully linked, else it uses the flags given */
191 struct Base *ED_object_add_duplicate(struct Main *bmain,
192  struct Scene *scene,
193  struct ViewLayer *view_layer,
194  struct Base *base,
195  const eDupli_ID_Flags dupflag);
196 
197 void ED_object_parent(struct Object *ob,
198  struct Object *parent,
199  const int type,
200  const char *substr);
201 
202 /* bitflags for enter/exit editmode */
203 enum {
204  EM_FREEDATA = (1 << 0),
205  EM_NO_CONTEXT = (1 << 1),
206 };
207 bool ED_object_editmode_exit_ex(struct Main *bmain,
208  struct Scene *scene,
209  struct Object *obedit,
210  int flag);
211 bool ED_object_editmode_exit(struct bContext *C, int flag);
212 
213 bool ED_object_editmode_free_ex(struct Main *bmain, struct Object *obedit);
214 
215 bool ED_object_editmode_exit_multi_ex(struct Main *bmain,
216  struct Scene *scene,
217  struct ViewLayer *view_layer,
218  int flag);
219 bool ED_object_editmode_exit_multi(struct bContext *C, int flag);
220 
221 bool ED_object_editmode_enter_ex(struct Main *bmain,
222  struct Scene *scene,
223  struct Object *ob,
224  int flag);
225 bool ED_object_editmode_enter(struct bContext *C, int flag);
226 bool ED_object_editmode_load(struct Main *bmain, struct Object *obedit);
227 
228 void ED_object_vpaintmode_enter_ex(struct Main *bmain,
229  struct Depsgraph *depsgraph,
230  struct Scene *scene,
231  struct Object *ob);
233 void ED_object_wpaintmode_enter_ex(struct Main *bmain,
234  struct Depsgraph *depsgraph,
235  struct Scene *scene,
236  struct Object *ob);
238 
239 void ED_object_vpaintmode_exit_ex(struct Object *ob);
240 void ED_object_vpaintmode_exit(struct bContext *C);
241 void ED_object_wpaintmode_exit_ex(struct Object *ob);
242 void ED_object_wpaintmode_exit(struct bContext *C);
243 
244 void ED_object_texture_paint_mode_enter_ex(struct Main *bmain, struct Scene *scene, Object *ob);
246 
247 void ED_object_texture_paint_mode_exit_ex(struct Main *bmain, struct Scene *scene, Object *ob);
249 
252  struct Scene *scene,
253  Object *ob);
255 
258 
259 void ED_object_sculptmode_enter_ex(struct Main *bmain,
260  struct Depsgraph *depsgraph,
261  struct Scene *scene,
262  struct Object *ob,
263  const bool force_dyntopo,
264  struct ReportList *reports);
266  struct Depsgraph *depsgraph,
267  struct ReportList *reports);
268 void ED_object_sculptmode_exit_ex(struct Main *bmain,
269  struct Depsgraph *depsgraph,
270  struct Scene *scene,
271  struct Object *ob);
273 
274 void ED_object_location_from_view(struct bContext *C, float loc[3]);
275 void ED_object_rotation_from_quat(float rot[3], const float quat[4], const char align_axis);
276 void ED_object_rotation_from_view(struct bContext *C, float rot[3], const char align_axis);
277 void ED_object_base_init_transform_on_add(struct Object *object,
278  const float loc[3],
279  const float rot[3]);
281  struct Object *obedit,
282  const float loc[3],
283  const float rot[3],
284  float primmat[4][4]);
285 
286 /* Avoid allowing too much insane values even by typing
287  * (typos can hang/crash Blender otherwise). */
288 #define OBJECT_ADD_SIZE_MAXF 1.0e12f
289 
291 void ED_object_add_unit_props_radius_ex(struct wmOperatorType *ot, float default_value);
293 void ED_object_add_generic_props(struct wmOperatorType *ot, bool do_editmode);
296  struct wmOperator *op,
297  const char view_align_axis,
298  float loc[3],
299  float rot[3],
300  float scale[3],
301  bool *enter_editmode,
302  unsigned short *local_view_bits,
303  bool *is_view_aligned);
304 
306  const int type,
307  const char *name,
308  const float loc[3],
309  const float rot[3],
310  const bool enter_editmode,
311  const ushort local_view_bits,
312  struct ID *obdata);
313 struct Object *ED_object_add_type(struct bContext *C,
314  const int type,
315  const char *name,
316  const float loc[3],
317  const float rot[3],
318  const bool enter_editmode,
319  const unsigned short local_view_bits)
321 
322 void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob);
323 
324 /* object motion paths */
325 void ED_objects_clear_paths(struct bContext *C, bool only_selected);
326 
327 /* Corresponds to eAnimvizCalcRange. */
328 typedef enum eObjectPathCalcRange {
333 
335  struct Scene *scene,
336  eObjectPathCalcRange range);
337 
338 /* constraints */
342  struct bConstraint *con,
343  struct bPoseChannel **r_pchan);
345 
346 void object_test_constraints(struct Main *bmain, struct Object *ob);
347 
348 void ED_object_constraint_active_set(struct Object *ob, struct bConstraint *con);
349 void ED_object_constraint_update(struct Main *bmain, struct Object *ob);
350 void ED_object_constraint_dependency_update(struct Main *bmain, struct Object *ob);
351 
352 void ED_object_constraint_tag_update(struct Main *bmain,
353  struct Object *ob,
354  struct bConstraint *con);
356  struct Object *ob,
357  struct bConstraint *con);
358 
360  struct bConstraint *con,
361  const int index);
362 void ED_object_constraint_link(struct Main *bmain,
363  struct Object *ob_dst,
364  struct ListBase *dst,
365  struct ListBase *src);
366 void ED_object_constraint_copy_for_object(struct Main *bmain,
367  struct Object *ob_dst,
368  struct bConstraint *con);
369 void ED_object_constraint_copy_for_pose(struct Main *bmain,
370  struct Object *ob_dst,
371  struct bPoseChannel *pchan,
372  struct bConstraint *con);
373 
374 /* object_modes.c */
375 bool ED_object_mode_compat_test(const struct Object *ob, eObjectMode mode);
377  struct Object *ob,
378  eObjectMode mode,
379  struct ReportList *reports);
380 bool ED_object_mode_set_ex(struct bContext *C,
381  eObjectMode mode,
382  bool use_undo,
383  struct ReportList *reports);
384 bool ED_object_mode_set(struct bContext *C, eObjectMode mode);
385 
386 void ED_object_mode_generic_exit(struct Main *bmain,
387  struct Depsgraph *depsgraph,
388  struct Scene *scene,
389  struct Object *ob);
391 
393  struct Main *bmain,
394  struct Object *ob,
395  const bool is_mode_set);
396 
397 /* object_modifier.c */
398 enum {
401 };
402 
403 struct ModifierData *ED_object_modifier_add(struct ReportList *reports,
404  struct Main *bmain,
405  struct Scene *scene,
406  struct Object *ob,
407  const char *name,
408  int type);
409 bool ED_object_modifier_remove(struct ReportList *reports,
410  struct Main *bmain,
411  struct Scene *scene,
412  struct Object *ob,
413  struct ModifierData *md);
414 void ED_object_modifier_clear(struct Main *bmain, struct Scene *scene, struct Object *ob);
415 bool ED_object_modifier_move_down(struct ReportList *reports,
416  struct Object *ob,
417  struct ModifierData *md);
418 bool ED_object_modifier_move_up(struct ReportList *reports,
419  struct Object *ob,
420  struct ModifierData *md);
421 bool ED_object_modifier_move_to_index(struct ReportList *reports,
422  struct Object *ob,
423  struct ModifierData *md,
424  const int index);
425 
427  struct Main *bmain,
428  struct Depsgraph *depsgraph,
429  struct ViewLayer *view_layer,
430  struct Object *ob,
431  struct ModifierData *md);
432 bool ED_object_modifier_apply(struct Main *bmain,
433  struct ReportList *reports,
434  struct Depsgraph *depsgraph,
435  struct Scene *scene,
436  struct Object *ob,
437  struct ModifierData *md,
438  int mode,
439  bool keep_modifier);
440 bool ED_object_modifier_copy(struct ReportList *reports,
441  struct Main *bmain,
442  struct Scene *scene,
443  struct Object *ob,
444  struct ModifierData *md);
445 void ED_object_modifier_link(struct bContext *C, struct Object *ob_dst, struct Object *ob_src);
447  struct Object *ob_dst,
448  struct Object *ob_src,
449  struct ModifierData *md);
450 
451 bool ED_object_iter_other(struct Main *bmain,
452  struct Object *orig_ob,
453  const bool include_orig,
454  bool (*callback)(struct Object *ob, void *callback_data),
455  void *callback_data);
456 
457 bool ED_object_multires_update_totlevels_cb(struct Object *ob, void *totlevel_v);
458 
459 /* object_greasepencil_modifier.c */
461  struct Main *bmain,
462  struct Scene *scene,
463  struct Object *ob,
464  const char *name,
465  int type);
466 bool ED_object_gpencil_modifier_remove(struct ReportList *reports,
467  struct Main *bmain,
468  struct Object *ob,
469  struct GpencilModifierData *md);
470 void ED_object_gpencil_modifier_clear(struct Main *bmain, struct Object *ob);
472  struct Object *ob,
473  struct GpencilModifierData *md);
475  struct Object *ob,
476  struct GpencilModifierData *md);
478  struct Object *ob,
479  struct GpencilModifierData *md,
480  const int index);
482  struct ReportList *reports,
483  struct Depsgraph *depsgraph,
484  struct Object *ob,
485  struct GpencilModifierData *md,
486  int mode);
487 bool ED_object_gpencil_modifier_copy(struct ReportList *reports,
488  struct Object *ob,
489  struct GpencilModifierData *md);
491  struct GpencilModifierData *md);
492 
493 /* object_shader_fx.c */
495  struct Main *bmain,
496  struct Scene *scene,
497  struct Object *ob,
498  const char *name,
499  int type);
500 bool ED_object_shaderfx_remove(struct ReportList *reports,
501  struct Main *bmain,
502  struct Object *ob,
503  struct ShaderFxData *fx);
504 void ED_object_shaderfx_clear(struct Main *bmain, struct Object *ob);
506  struct Object *ob,
507  struct ShaderFxData *fx);
509  struct Object *ob,
510  struct ShaderFxData *fx);
511 bool ED_object_shaderfx_move_to_index(struct ReportList *reports,
512  struct Object *ob,
513  struct ShaderFxData *fx,
514  const int index);
515 void ED_object_shaderfx_link(struct Object *dst, struct Object *src);
516 void ED_object_shaderfx_copy(struct Object *dst, struct ShaderFxData *fx);
517 
518 /* object_select.c */
519 void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
520 
522  const struct bContext *C,
523  struct PointerRNA *ptr,
524  struct PropertyRNA *prop,
525  bool *r_free,
526  const unsigned int selection_mask);
527 
528 void ED_object_check_force_modifiers(struct Main *bmain,
529  struct Scene *scene,
530  struct Object *object);
531 
532 struct Base *ED_object_find_first_by_data_id(struct ViewLayer *view_layer, struct ID *id);
533 
534 bool ED_object_jump_to_object(struct bContext *C, struct Object *ob, const bool reveal_hidden);
535 bool ED_object_jump_to_bone(struct bContext *C,
536  struct Object *ob,
537  const char *bone_name,
538  const bool reveal_hidden);
539 
540 /* object_facemap_ops.c */
541 void ED_object_facemap_face_add(struct Object *ob, struct bFaceMap *fmap, int facenum);
542 void ED_object_facemap_face_remove(struct Object *ob, struct bFaceMap *fmap, int facenum);
543 
544 /* object_data_transform.c */
548 
549 void ED_object_data_xform_destroy(struct XFormObjectData *xod_base);
550 
551 void ED_object_data_xform_by_mat4(struct XFormObjectData *xod, const float mat[4][4]);
552 
555 
556 #ifdef __cplusplus
557 }
558 #endif
struct Object ATTR_RETURNS_NONNULL
Definition: BKE_object.h:138
#define ATTR_NONNULL(...)
unsigned int uint
Definition: BLI_sys_types.h:83
unsigned short ushort
Definition: BLI_sys_types.h:84
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
eObjectMode
eDupli_ID_Flags
void ED_object_xform_skip_child_container_item_ensure_from_array(struct XFormObjectSkipChild_Container *xcs, struct ViewLayer *view_layer, struct Object **objects, uint objects_len)
Definition: object_utils.c:183
bool ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md)
bool ED_object_particle_edit_mode_supported(const Object *ob)
struct Object * ED_object_add_type_with_obdata(struct bContext *C, const int type, const char *name, const float loc[3], const float rot[3], const bool enter_editmode, const ushort local_view_bits, struct ID *obdata)
Definition: object_add.c:596
bool ED_object_calc_active_center(struct Object *ob, const bool select_only, float r_center[3])
Definition: object_utils.c:125
void ED_object_shaderfx_clear(struct Main *bmain, struct Object *ob)
struct ModifierData * ED_object_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name, int type)
void ED_objects_recalculate_paths(struct bContext *C, struct Scene *scene, eObjectPathCalcRange range)
Definition: object_edit.c:1135
void ED_operatortypes_object(void)
Definition: object_ops.c:44
float ED_object_new_primitive_matrix(struct bContext *C, struct Object *obedit, const float loc[3], const float rot[3], float primmat[4][4])
Definition: object_add.c:334
void ED_object_check_force_modifiers(struct Main *bmain, struct Scene *scene, struct Object *object)
Definition: object_edit.c:1050
bool ED_object_calc_active_center_for_posemode(struct Object *ob, const bool select_only, float r_center[3])
Definition: object_utils.c:113
void ED_object_vpaintmode_exit_ex(struct Object *ob)
void ED_object_particle_edit_mode_exit(struct bContext *C)
struct GpencilModifierData * ED_object_gpencil_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name, int type)
void ED_object_add_unit_props_size(struct wmOperatorType *ot)
Definition: object_add.c:380
void ED_object_vpaintmode_exit(struct bContext *C)
void ED_object_xform_skip_child_container_update_all(struct XFormObjectSkipChild_Container *xcs, struct Main *bmain, struct Depsgraph *depsgraph)
Definition: object_utils.c:270
bool ED_object_gpencil_modifier_copy(struct ReportList *reports, struct Object *ob, struct GpencilModifierData *md)
bool ED_object_shaderfx_remove(struct ReportList *reports, struct Main *bmain, struct Object *ob, struct ShaderFxData *fx)
struct Object * ED_object_context(const struct bContext *C)
bool ED_object_mode_set_ex(struct bContext *C, eObjectMode mode, bool use_undo, struct ReportList *reports)
Definition: object_modes.c:195
bool ED_object_parent_set(struct ReportList *reports, const struct bContext *C, struct Scene *scene, struct Object *const ob, struct Object *const par, int partype, const bool xmirror, const bool keep_transform, const int vert_par[3])
bool ED_object_multires_update_totlevels_cb(struct Object *ob, void *totlevel_v)
const struct EnumPropertyItem * ED_object_vgroup_selection_itemf_helper(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free, const unsigned int selection_mask)
void ED_object_xform_skip_child_container_destroy(struct XFormObjectSkipChild_Container *xcs)
Definition: object_utils.c:243
int ED_object_shaderfx_move_up(struct ReportList *reports, struct Object *ob, struct ShaderFxData *fx)
void ED_object_modifier_link(struct bContext *C, struct Object *ob_dst, struct Object *ob_src)
void ED_object_base_activate_with_mode_exit_if_needed(struct bContext *C, struct Base *base)
eObClearParentTypes
Definition: ED_object.h:151
@ CLEAR_PARENT_ALL
Definition: ED_object.h:152
@ CLEAR_PARENT_KEEP_TRANSFORM
Definition: ED_object.h:153
@ CLEAR_PARENT_INVERSE
Definition: ED_object.h:154
void ED_object_shaderfx_link(struct Object *dst, struct Object *src)
bool ED_object_gpencil_modifier_move_to_index(struct ReportList *reports, struct Object *ob, struct GpencilModifierData *md, const int index)
bool ED_object_mode_compat_test(const struct Object *ob, eObjectMode mode)
void ED_object_facemap_face_add(struct Object *ob, struct bFaceMap *fmap, int facenum)
void ED_object_parent_clear(struct Object *ob, const int type)
void ED_object_texture_paint_mode_enter(struct bContext *C)
Definition: paint_image.c:1182
eParentType
Definition: ED_object.h:129
@ PAR_OBJECT
Definition: ED_object.h:130
@ PAR_BONE
Definition: ED_object.h:135
@ PAR_BONE_RELATIVE
Definition: ED_object.h:136
@ PAR_ARMATURE_ENVELOPE
Definition: ED_object.h:133
@ PAR_CURVE
Definition: ED_object.h:137
@ PAR_ARMATURE_AUTO
Definition: ED_object.h:134
@ PAR_VERTEX
Definition: ED_object.h:141
@ PAR_LATTICE
Definition: ED_object.h:140
@ PAR_VERTEX_TRI
Definition: ED_object.h:142
@ PAR_ARMATURE_NAME
Definition: ED_object.h:132
@ PAR_ARMATURE
Definition: ED_object.h:131
@ PAR_FOLLOW
Definition: ED_object.h:138
@ PAR_PATH_CONST
Definition: ED_object.h:139
void ED_object_mode_generic_exit(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: object_modes.c:391
bool ED_object_modifier_convert(struct ReportList *reports, struct Main *bmain, struct Depsgraph *depsgraph, struct ViewLayer *view_layer, struct Object *ob, struct ModifierData *md)
void ED_object_modifier_copy_to_object(struct bContext *C, struct Object *ob_dst, struct Object *ob_src, struct ModifierData *md)
struct bConstraint * ED_object_constraint_active_get(struct Object *ob)
void ED_object_wpaintmode_exit_ex(struct Object *ob)
void ED_object_constraint_active_set(struct Object *ob, struct bConstraint *con)
bool ED_object_jump_to_object(struct bContext *C, struct Object *ob, const bool reveal_hidden)
struct ListBase * ED_object_constraint_list_from_constraint(struct Object *ob, struct bConstraint *con, struct bPoseChannel **r_pchan)
void ED_object_modifier_clear(struct Main *bmain, struct Scene *scene, struct Object *ob)
bool ED_object_gpencil_modifier_move_up(struct ReportList *reports, struct Object *ob, struct GpencilModifierData *md)
bool ED_object_modifier_copy(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md)
void ED_object_vpaintmode_enter(struct bContext *C, struct Depsgraph *depsgraph)
void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode)
Definition: object_select.c:98
void ED_object_base_active_refresh(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
struct XFormObjectSkipChild_Container * ED_object_xform_skip_child_container_create(void)
Definition: object_utils.c:174
void ED_object_data_xform_restore(struct XFormObjectData *xod)
bool ED_object_editmode_exit_multi_ex(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, int flag)
Definition: object_edit.c:736
bool ED_object_gpencil_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Object *ob, struct GpencilModifierData *md)
void ED_object_sculptmode_exit(struct bContext *C, struct Depsgraph *depsgraph)
Definition: sculpt.c:8531
@ EM_NO_CONTEXT
Definition: ED_object.h:205
@ EM_FREEDATA
Definition: ED_object.h:204
void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob)
void ED_object_texture_paint_mode_enter_ex(struct Main *bmain, struct Scene *scene, Object *ob)
Definition: paint_image.c:1122
bool ED_object_editmode_exit_ex(struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag)
Definition: object_edit.c:676
void ED_object_texture_paint_mode_exit_ex(struct Main *bmain, struct Scene *scene, Object *ob)
Definition: paint_image.c:1190
void ED_object_base_init_transform_on_add(struct Object *object, const float loc[3], const float rot[3])
Definition: object_add.c:319
struct Base * ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, const eDupli_ID_Flags dupflag)
Definition: object_add.c:3313
void ED_object_constraint_copy_for_pose(struct Main *bmain, struct Object *ob_dst, struct bPoseChannel *pchan, struct bConstraint *con)
bool ED_object_gpencil_modifier_apply(struct Main *bmain, struct ReportList *reports, struct Depsgraph *depsgraph, struct Object *ob, struct GpencilModifierData *md, int mode)
bool ED_object_editmode_enter_ex(struct Main *bmain, struct Scene *scene, struct Object *ob, int flag)
Definition: object_edit.c:762
void ED_object_constraint_tag_update(struct Main *bmain, struct Object *ob, struct bConstraint *con)
struct XFormObjectData * ED_object_data_xform_create_ex(struct ID *id, bool is_edit_mode)
void ED_object_constraint_update(struct Main *bmain, struct Object *ob)
void ED_object_shaderfx_copy(struct Object *dst, struct ShaderFxData *fx)
void ED_object_location_from_view(struct bContext *C, float loc[3])
Definition: object_add.c:272
struct Object * ED_object_active_context(const struct bContext *C)
void ED_object_particle_edit_mode_enter_ex(struct Depsgraph *depsgraph, struct Scene *scene, Object *ob)
void ED_object_add_unit_props_radius_ex(struct wmOperatorType *ot, float default_value)
Definition: object_add.c:386
void ED_object_data_xform_container_destroy(struct XFormObjectData_Container *xds)
Definition: object_utils.c:426
struct ListBase * ED_object_constraint_active_list(struct Object *ob)
bool ED_object_editmode_free_ex(struct Main *bmain, struct Object *obedit)
Definition: object_edit.c:731
bool ED_object_jump_to_bone(struct bContext *C, struct Object *ob, const char *bone_name, const bool reveal_hidden)
void ED_object_rotation_from_quat(float rot[3], const float quat[4], const char align_axis)
Definition: object_add.c:278
bool ED_object_gpencil_modifier_move_down(struct ReportList *reports, struct Object *ob, struct GpencilModifierData *md)
bool ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md)
void ED_object_particle_edit_mode_exit_ex(struct Scene *scene, Object *ob)
bool ED_object_shaderfx_move_to_index(struct ReportList *reports, struct Object *ob, struct ShaderFxData *fx, const int index)
bool ED_object_iter_other(struct Main *bmain, struct Object *orig_ob, const bool include_orig, bool(*callback)(struct Object *ob, void *callback_data), void *callback_data)
@ XFORM_OB_SKIP_CHILD_PARENT_APPLY
Definition: ED_object.h:105
@ XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM_INDIRECT
Definition: ED_object.h:98
@ XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM
Definition: ED_object.h:93
bool ED_object_editmode_enter(struct bContext *C, int flag)
Definition: object_edit.c:859
void ED_object_xform_skip_child_container_item_ensure(struct XFormObjectSkipChild_Container *xcs, struct Object *ob, struct Object *ob_parent_recurse, int mode)
Definition: object_utils.c:249
struct XFormObjectData * ED_object_data_xform_create_from_edit_mode(ID *id)
void ED_object_base_activate(struct bContext *C, struct Base *base)
void ED_object_wpaintmode_enter(struct bContext *C, struct Depsgraph *depsgraph)
bool ED_object_mode_set(struct bContext *C, eObjectMode mode)
Definition: object_modes.c:235
void ED_object_parent(struct Object *ob, struct Object *parent, const int type, const char *substr)
bool ED_object_editmode_load(struct Main *bmain, struct Object *obedit)
Definition: object_edit.c:667
struct Object * ED_object_add_type(struct bContext *C, const int type, const char *name, const float loc[3], const float rot[3], const bool enter_editmode, const unsigned short local_view_bits) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL
Definition: object_add.c:659
struct Base * ED_object_find_first_by_data_id(struct ViewLayer *view_layer, struct ID *id)
void ED_object_texture_paint_mode_exit(struct bContext *C)
Definition: paint_image.c:1206
void ED_objects_clear_paths(struct bContext *C, bool only_selected)
Definition: object_edit.c:1346
void ED_collection_hide_menu_draw(const struct bContext *C, struct uiLayout *layout)
bool ED_object_base_deselect_all_ex(struct ViewLayer *view_layer, struct View3D *v3d, int action, bool *r_any_visible)
bool ED_object_editmode_exit(struct bContext *C, int flag)
Definition: object_edit.c:718
void ED_object_data_xform_destroy(struct XFormObjectData *xod_base)
struct ListBase * ED_object_pose_constraint_list(const struct bContext *C)
void ED_object_select_linked_by_id(struct bContext *C, struct ID *id)
void ED_object_base_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Object *ob)
Definition: object_add.c:1958
void ED_object_gpencil_modifier_clear(struct Main *bmain, struct Object *ob)
void ED_object_constraint_link(struct Main *bmain, struct Object *ob_dst, struct ListBase *dst, struct ListBase *src)
Object ** ED_object_array_in_mode_or_selected(struct bContext *C, bool(*filter_fn)(struct Object *ob, void *user_data), void *filter_user_data, uint *r_objects_len)
void ED_object_data_xform_container_item_ensure(struct XFormObjectData_Container *xds, struct Object *ob)
Definition: object_utils.c:354
eObjectPathCalcRange
Definition: ED_object.h:328
@ OBJECT_PATH_CALC_RANGE_CHANGED
Definition: ED_object.h:330
@ OBJECT_PATH_CALC_RANGE_CURRENT_FRAME
Definition: ED_object.h:329
@ OBJECT_PATH_CALC_RANGE_FULL
Definition: ED_object.h:331
bool ED_object_modifier_apply(struct Main *bmain, struct ReportList *reports, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ModifierData *md, int mode, bool keep_modifier)
void ED_object_data_xform_by_mat4(struct XFormObjectData *xod, const float mat[4][4])
bool ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, struct ModifierData *md)
void ED_object_data_xform_tag_update(struct XFormObjectData *xod)
void ED_object_constraint_dependency_update(struct Main *bmain, struct Object *ob)
void ED_object_data_xform_container_update_all(struct XFormObjectData_Container *xds, struct Main *bmain, struct Depsgraph *depsgraph)
Definition: object_utils.c:375
void ED_object_vpaintmode_enter_ex(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
bool ED_object_modifier_move_to_index(struct ReportList *reports, struct Object *ob, struct ModifierData *md, const int index)
void ED_object_posemode_set_for_weight_paint(struct bContext *C, struct Main *bmain, struct Object *ob, const bool is_mode_set)
Definition: object_modes.c:361
void ED_operatormacros_object(void)
Definition: object_ops.c:283
eObjectSelect_Mode
Definition: ED_object.h:145
@ BA_DESELECT
Definition: ED_object.h:146
@ BA_INVERT
Definition: ED_object.h:148
@ BA_SELECT
Definition: ED_object.h:147
void ED_object_particle_edit_mode_enter(struct bContext *C)
bool ED_object_constraint_move_to_index(struct Object *ob, struct bConstraint *con, const int index)
void ED_object_gpencil_modifier_copy_to_object(struct Object *ob_dst, struct GpencilModifierData *md)
void ED_keymap_object(struct wmKeyConfig *keyconf)
Definition: object_ops.c:317
void ED_object_add_generic_props(struct wmOperatorType *ot, bool do_editmode)
Definition: object_add.c:397
bool ED_object_editmode_exit_multi(struct bContext *C, int flag)
Definition: object_edit.c:754
struct XFormObjectData_Container * ED_object_data_xform_container_create(void)
Definition: object_utils.c:419
void ED_object_constraint_copy_for_object(struct Main *bmain, struct Object *ob_dst, struct bConstraint *con)
@ MODIFIER_APPLY_DATA
Definition: ED_object.h:399
@ MODIFIER_APPLY_SHAPE
Definition: ED_object.h:400
void ED_object_wpaintmode_exit(struct bContext *C)
bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, struct Object *ob)
Definition: object_modes.c:399
void ED_object_base_free_and_unlink_no_indirect_check(struct Main *bmain, struct Scene *scene, struct Object *ob)
Definition: object_add.c:1979
void ED_object_constraint_dependency_tag_update(struct Main *bmain, struct Object *ob, struct bConstraint *con)
bool ED_object_calc_active_center_for_editmode(struct Object *obedit, const bool select_only, float r_center[3])
Definition: object_utils.c:54
void object_test_constraints(struct Main *bmain, struct Object *ob)
void ED_object_rotation_from_view(struct bContext *C, float rot[3], const char align_axis)
Definition: object_add.c:304
struct ShaderFxData * ED_object_shaderfx_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name, int type)
struct XFormObjectData * ED_object_data_xform_create(struct ID *id)
bool ED_object_base_deselect_all(struct ViewLayer *view_layer, struct View3D *v3d, int action)
bool ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, const char view_align_axis, float loc[3], float rot[3], float scale[3], bool *enter_editmode, unsigned short *local_view_bits, bool *is_view_aligned)
Definition: object_add.c:455
void ED_object_sculptmode_exit_ex(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: sculpt.c:8488
bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, eObjectMode mode, struct ReportList *reports)
Definition: object_modes.c:165
int ED_object_shaderfx_move_down(struct ReportList *reports, struct Object *ob, struct ShaderFxData *fx)
void ED_object_add_mesh_props(struct wmOperatorType *ot)
Definition: object_add.c:450
void ED_object_facemap_face_remove(struct Object *ob, struct bFaceMap *fmap, int facenum)
void ED_object_sculptmode_enter_ex(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const bool force_dyntopo, struct ReportList *reports)
Definition: sculpt.c:8391
void ED_object_wpaintmode_enter_ex(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
void ED_object_sculptmode_enter(struct bContext *C, struct Depsgraph *depsgraph, struct ReportList *reports)
Definition: sculpt.c:8479
void ED_object_add_unit_props_radius(struct wmOperatorType *ot)
Definition: object_add.c:392
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
#define C
Definition: RandGen.cpp:39
Scene scene
const Depsgraph * depsgraph
void * user_data
DEGForeachIDComponentCallback callback
#define rot(x, k)
EnumPropertyItem prop_clear_parent_types[]
EnumPropertyItem prop_make_parent_types[]
short flag
unsigned short local_view_bits
Definition: DNA_ID.h:273
Definition: BKE_main.h:116
ustring name
Definition: node.h:174
float loc[3]
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156