Blender  V2.93
mball_ops.c
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 #include "DNA_scene_types.h"
25 
26 #include "RNA_access.h"
27 
28 #include "WM_api.h"
29 #include "WM_types.h"
30 
31 #include "ED_mball.h"
32 #include "ED_screen.h"
33 
34 #include "mball_intern.h"
35 
37 {
40 
43 
47 }
48 
50 {
52  wmOperatorTypeMacro *otmacro;
53 
54  ot = WM_operatortype_append_macro("MBALL_OT_duplicate_move",
55  "Duplicate",
56  "Make copies of the selected metaball elements and move them",
58  WM_operatortype_macro_define(ot, "MBALL_OT_duplicate_metaelems");
59  otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
60  RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
61 }
62 
64 {
65  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Metaball", 0, 0);
66  keymap->poll = ED_operator_editmball;
67 }
bool ED_operator_editmball(struct bContext *C)
Definition: screen_ops.c:607
@ OPTYPE_UNDO
Definition: WM_types.h:155
@ OPTYPE_REGISTER
Definition: WM_types.h:153
void MBALL_OT_select_all(wmOperatorType *ot)
Definition: mball_edit.c:204
void MBALL_OT_hide_metaelems(wmOperatorType *ot)
Definition: mball_edit.c:691
void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
Definition: mball_edit.c:587
void MBALL_OT_select_similar(wmOperatorType *ot)
Definition: mball_edit.c:456
void MBALL_OT_delete_metaelems(wmOperatorType *ot)
Definition: mball_edit.c:646
void MBALL_OT_reveal_metaelems(wmOperatorType *ot)
Definition: mball_edit.c:738
void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
Definition: mball_edit.c:528
void ED_operatortypes_metaball(void)
Definition: mball_ops.c:36
void ED_operatormacros_metaball(void)
Definition: mball_ops.c:49
void ED_keymap_metaball(wmKeyConfig *keyconf)
Definition: mball_ops.c:63
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
Definition: rna_access.c:6272
bool(* poll)(struct bContext *)
wmOperatorType * ot
Definition: wm_files.c:3156
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))