diff options
Diffstat (limited to 'source/blender/editors/include/ED_object.h')
-rw-r--r-- | source/blender/editors/include/ED_object.h | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index a8536e6f71c..29f7edaebf0 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -35,14 +35,17 @@ extern "C" { #endif +struct bFaceMap; struct Base; struct EnumPropertyItem; struct ID; struct Main; +struct Menu; struct ModifierData; struct Object; struct ReportList; struct Scene; +struct ViewLayer; struct bConstraint; struct bContext; struct bPoseChannel; @@ -50,15 +53,20 @@ struct wmKeyConfig; struct wmKeyMap; struct wmOperator; struct wmOperatorType; +struct wmWindow; +struct wmWindowManager; struct PointerRNA; struct PropertyRNA; struct EnumPropertyItem; +struct Depsgraph; +struct uiLayout; #include "DNA_object_enums.h" /* object_edit.c */ struct Object *ED_object_context(struct bContext *C); /* context.object */ struct Object *ED_object_active_context(struct bContext *C); /* context.object or context.active_object */ +void ED_hide_collections_menu_draw(const struct bContext *C, struct uiLayout *layout); /* object_ops.c */ void ED_operatortypes_object(void); @@ -82,16 +90,21 @@ typedef enum eParentType { PAR_VERTEX_TRI, } eParentType; +typedef enum eObjectSelect_Mode { + BA_DESELECT = 0, + BA_SELECT = 1, + BA_INVERT = 2, +} eObjectSelect_Mode; + #ifdef __RNA_TYPES_H__ extern struct EnumPropertyItem prop_clear_parent_types[]; extern struct EnumPropertyItem prop_make_parent_types[]; #endif -bool ED_object_parent_set(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, +bool ED_object_parent_set(struct ReportList *reports, const struct bContext *C, struct Scene *scene, struct Object *ob, struct Object *par, int partype, const bool xmirror, const bool keep_transform, const int vert_par[3]); void ED_object_parent_clear(struct Object *ob, const int type); -struct Base *ED_object_scene_link(struct Scene *scene, struct Object *ob); void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap); @@ -99,15 +112,12 @@ void ED_keymap_proportional_maskmode(struct wmKeyConfig *keyconf, struct wmKeyMa void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, const bool do_connected); -/* send your own notifier for select! */ -void ED_base_object_select(struct Base *base, short mode); -/* includes notifier */ -void ED_base_object_activate(struct bContext *C, struct Base *base); - -void ED_base_object_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Base *base); +void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode); +void ED_object_base_activate(struct bContext *C, struct Base *base); +void ED_object_base_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Object *ob); /* single object duplicate, if (dupflag == 0), fully linked, else it uses the flags given */ -struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct Base *base, int dupflag); +struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, int dupflag); void ED_object_parent(struct Object *ob, struct Object *parent, const int type, const char *substr); @@ -116,9 +126,13 @@ enum { EM_FREEDATA = (1 << 0), EM_WAITCURSOR = (1 << 1), EM_IGNORE_LAYER = (1 << 3), + EM_NO_CONTEXT = (1 << 4), }; -bool ED_object_editmode_exit_ex(struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag); +bool ED_object_editmode_exit_ex( + struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag); bool ED_object_editmode_exit(struct bContext *C, int flag); + +bool ED_object_editmode_enter_ex(struct Main *bmain, struct Scene *scene, struct Object *ob, int flag); bool ED_object_editmode_enter(struct bContext *C, int flag); bool ED_object_editmode_load(struct Main *bmain, struct Object *obedit); @@ -126,11 +140,11 @@ bool ED_object_editmode_calc_active_center(struct Object *obedit, const bool sel void ED_object_vpaintmode_enter_ex( - struct Main *bmain, struct wmWindowManager *wm, + struct Main *bmain, struct Depsgraph *depsgraph, struct wmWindowManager *wm, struct Scene *scene, struct Object *ob); void ED_object_vpaintmode_enter(struct bContext *C); void ED_object_wpaintmode_enter_ex( - struct Main *bmain, struct wmWindowManager *wm, + struct Main *bmain, struct Depsgraph *depsgraph, struct wmWindowManager *wm, struct Scene *scene, struct Object *ob); void ED_object_wpaintmode_enter(struct bContext *C); @@ -140,10 +154,12 @@ void ED_object_wpaintmode_exit_ex(struct Object *ob); void ED_object_wpaintmode_exit(struct bContext *C); void ED_object_sculptmode_enter_ex( - struct Main *bmain, struct Scene *scene, struct Object *ob, + struct Main *bmain, struct Depsgraph *depsgraph, + struct Scene *scene, struct Object *ob, struct ReportList *reports); void ED_object_sculptmode_enter(struct bContext *C, struct ReportList *reports); void ED_object_sculptmode_exit_ex( + struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob); void ED_object_sculptmode_exit(struct bContext *C); @@ -199,6 +215,21 @@ bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, eObjectMod void ED_object_mode_toggle(struct bContext *C, eObjectMode mode); void ED_object_mode_set(struct bContext *C, eObjectMode mode); +bool ED_object_mode_generic_enter( + struct bContext *C, + eObjectMode object_mode); +void ED_object_mode_generic_exit( + struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, struct Object *ob); +bool ED_object_mode_generic_has_data( + struct Depsgraph *depsgraph, + struct Object *ob); + +bool ED_object_mode_generic_exists( + struct wmWindowManager *wm, struct Object *ob, + eObjectMode object_mode); + /* object_modifier.c */ enum { MODIFIER_APPLY_DATA = 1, @@ -215,9 +246,10 @@ int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md); int ED_object_modifier_convert( struct ReportList *reports, struct Main *bmain, struct Scene *scene, - struct Object *ob, struct ModifierData *md); -int ED_object_modifier_apply(struct Main *bmain, struct ReportList *reports, struct Scene *scene, - struct Object *ob, struct ModifierData *md, int mode); + struct ViewLayer *view_layer, struct Object *ob, struct ModifierData *md); +int ED_object_modifier_apply( + struct Main *bmain, struct ReportList *reports, struct Depsgraph *depsgraph, struct Scene *scene, + struct Object *ob, struct ModifierData *md, int mode); int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md); bool ED_object_iter_other( @@ -240,6 +272,10 @@ const struct EnumPropertyItem *ED_object_vgroup_selection_itemf_helper( void ED_object_check_force_modifiers( struct Main *bmain, struct Scene *scene, struct Object *object); +/* object_facemap_ops.c */ +void ED_object_facemap_face_add(struct Object *ob, struct bFaceMap *fmap, int facenum); +void ED_object_facemap_face_remove(struct Object *ob, struct bFaceMap *fmap, int facenum); + #ifdef __cplusplus } #endif |