forked from bartvdbraak/blender
use '_exec' suffix for operator execute callbacks, also picky change to sizeof() use in BLI_array.h
This commit is contained in:
parent
b8e06518c9
commit
fc4a777511
@ -40,11 +40,11 @@
|
||||
#define _bli_array_totalsize_dynamic(arr) ( \
|
||||
((arr) == NULL) ? \
|
||||
0 : \
|
||||
MEM_allocN_len(arr) / sizeof(*arr) \
|
||||
MEM_allocN_len(arr) / sizeof(*(arr)) \
|
||||
)
|
||||
|
||||
#define _bli_array_totalsize_static(arr) \
|
||||
(sizeof(_##arr##_static) / sizeof(*arr))
|
||||
(sizeof(_##arr##_static) / sizeof(*(arr)))
|
||||
|
||||
#define _bli_array_totalsize(arr) ( \
|
||||
(size_t) \
|
||||
@ -66,9 +66,9 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* public defines */
|
||||
|
||||
/* use sizeof(*arr) to ensure the array exists and is an array */
|
||||
/* use sizeof(*(arr)) to ensure the array exists and is an array */
|
||||
#define BLI_array_declare(arr) \
|
||||
int _##arr##_count = ((void)(sizeof(*arr)), 0); \
|
||||
int _##arr##_count = ((void)(sizeof(*(arr))), 0); \
|
||||
void *_##arr##_static = NULL
|
||||
|
||||
/* this will use stack space, up to maxstatic array elements, before
|
||||
@ -96,7 +96,7 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
|
||||
(LIKELY(_bli_array_totalsize(arr) >= _##arr##_count + num) ? \
|
||||
(void)0 /* do nothing */ : \
|
||||
_bli_array_grow_func((void **)&(arr), _##arr##_static, \
|
||||
sizeof(*arr), _##arr##_count, num, \
|
||||
sizeof(*(arr)), _##arr##_count, num, \
|
||||
"BLI_array." #arr), \
|
||||
(void)0) /* msvc2008 needs this */ \
|
||||
), \
|
||||
|
@ -553,7 +553,7 @@ static int ed_markers_opwrap_invoke(bContext *C, wmOperator *op, const wmEvent *
|
||||
/* ************************** add markers *************************** */
|
||||
|
||||
/* add TimeMarker at curent frame */
|
||||
static int ed_marker_add(bContext *C, wmOperator *UNUSED(op))
|
||||
static int ed_marker_add_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ListBase *markers = ED_context_get_markers(C);
|
||||
TimeMarker *marker;
|
||||
@ -593,7 +593,7 @@ static void MARKER_OT_add(wmOperatorType *ot)
|
||||
ot->idname = "MARKER_OT_add";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = ed_marker_add;
|
||||
ot->exec = ed_marker_add_exec;
|
||||
ot->invoke = ed_markers_opwrap_invoke;
|
||||
ot->poll = ED_operator_animview_active;
|
||||
|
||||
|
@ -244,7 +244,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
|
||||
ot->description = "Select bones related to selected ones by parent/child relationships";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = NULL;
|
||||
/* leave 'exec' unset */
|
||||
ot->invoke = armature_select_linked_invoke;
|
||||
ot->poll = armature_select_linked_poll;
|
||||
|
||||
|
@ -271,7 +271,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
|
||||
ot->description = "Select bones related to selected ones by parent/child relationships";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = NULL;
|
||||
/* leave 'exec' unset */
|
||||
ot->invoke = pose_select_connected_invoke;
|
||||
ot->poll = pose_select_linked_poll;
|
||||
|
||||
|
@ -635,7 +635,7 @@ void MESH_OT_edge_face_add(wmOperatorType *ot)
|
||||
|
||||
/* ************************* SEAMS AND EDGES **************** */
|
||||
|
||||
static int edbm_mark_seam(bContext *C, wmOperator *op)
|
||||
static int edbm_mark_seam_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
@ -681,7 +681,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot)
|
||||
ot->description = "(Un)mark selected edges as a seam";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = edbm_mark_seam;
|
||||
ot->exec = edbm_mark_seam_exec;
|
||||
ot->poll = ED_operator_editmesh;
|
||||
|
||||
/* flags */
|
||||
@ -690,7 +690,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot)
|
||||
RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
|
||||
}
|
||||
|
||||
static int edbm_mark_sharp(bContext *C, wmOperator *op)
|
||||
static int edbm_mark_sharp_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Mesh *me = ((Mesh *)obedit->data);
|
||||
@ -735,7 +735,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot)
|
||||
ot->description = "(Un)mark selected edges as sharp";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = edbm_mark_sharp;
|
||||
ot->exec = edbm_mark_sharp_exec;
|
||||
ot->poll = ED_operator_editmesh;
|
||||
|
||||
/* flags */
|
||||
@ -745,7 +745,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot)
|
||||
}
|
||||
|
||||
|
||||
static int edbm_vert_connect(bContext *C, wmOperator *op)
|
||||
static int edbm_vert_connect_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
@ -795,7 +795,7 @@ void MESH_OT_vert_connect(wmOperatorType *ot)
|
||||
ot->description = "Connect 2 vertices of a face by an edge, splitting the face in two";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = edbm_vert_connect;
|
||||
ot->exec = edbm_vert_connect_exec;
|
||||
ot->poll = ED_operator_editmesh;
|
||||
|
||||
/* flags */
|
||||
@ -4437,7 +4437,7 @@ void MESH_OT_symmetry_snap(struct wmOperatorType *ot)
|
||||
|
||||
#ifdef WITH_FREESTYLE
|
||||
|
||||
static int edbm_mark_freestyle_edge(bContext *C, wmOperator *op)
|
||||
static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Mesh *me = (Mesh *)obedit->data;
|
||||
@ -4490,7 +4490,7 @@ void MESH_OT_mark_freestyle_edge(wmOperatorType *ot)
|
||||
ot->idname = "MESH_OT_mark_freestyle_edge";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = edbm_mark_freestyle_edge;
|
||||
ot->exec = edbm_mark_freestyle_edge_exec;
|
||||
ot->poll = ED_operator_editmesh;
|
||||
|
||||
/* flags */
|
||||
|
@ -1610,7 +1610,7 @@ void ED_object_toggle_modes(bContext *C, int mode)
|
||||
|
||||
/************************ Game Properties ***********************/
|
||||
|
||||
static int game_property_new(bContext *C, wmOperator *op)
|
||||
static int game_property_new_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
bProperty *prop;
|
||||
@ -1640,7 +1640,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
|
||||
ot->idname = "OBJECT_OT_game_property_new";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = game_property_new;
|
||||
ot->exec = game_property_new_exec;
|
||||
ot->poll = ED_operator_object_active_editable;
|
||||
|
||||
/* flags */
|
||||
@ -1650,7 +1650,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
|
||||
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the game property to add");
|
||||
}
|
||||
|
||||
static int game_property_remove(bContext *C, wmOperator *op)
|
||||
static int game_property_remove_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
bProperty *prop;
|
||||
@ -1681,7 +1681,7 @@ void OBJECT_OT_game_property_remove(wmOperatorType *ot)
|
||||
ot->idname = "OBJECT_OT_game_property_remove";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = game_property_remove;
|
||||
ot->exec = game_property_remove_exec;
|
||||
ot->poll = ED_operator_object_active_editable;
|
||||
|
||||
/* flags */
|
||||
|
@ -1214,7 +1214,7 @@ void SCENE_OT_freestyle_modifier_move(wmOperatorType *ot)
|
||||
|
||||
#endif /* WITH_FREESTYLE */
|
||||
|
||||
static int texture_slot_move(bContext *C, wmOperator *op)
|
||||
static int texture_slot_move_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
|
||||
|
||||
@ -1292,7 +1292,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot)
|
||||
ot->description = "Move texture slots up and down";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = texture_slot_move;
|
||||
ot->exec = texture_slot_move_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
@ -2564,7 +2564,7 @@ static void SCREEN_OT_area_options(wmOperatorType *ot)
|
||||
/* ******************************* */
|
||||
|
||||
|
||||
static int spacedata_cleanup(bContext *C, wmOperator *op)
|
||||
static int spacedata_cleanup_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
bScreen *screen;
|
||||
@ -2596,7 +2596,7 @@ static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot)
|
||||
ot->idname = "SCREEN_OT_spacedata_cleanup";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = spacedata_cleanup;
|
||||
ot->exec = spacedata_cleanup_exec;
|
||||
ot->poll = WM_operator_winactive;
|
||||
|
||||
}
|
||||
@ -3369,7 +3369,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
|
||||
* poll() has to be filled in by user for context
|
||||
*/
|
||||
#if 0
|
||||
static int border_select_do(bContext *C, wmOperator *op)
|
||||
static int border_select_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
int event_type = RNA_int_get(op->ptr, "event_type");
|
||||
|
||||
@ -3390,7 +3390,7 @@ static void SCREEN_OT_border_select(wmOperatorType *ot)
|
||||
ot->idname = "SCREEN_OT_border_select";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = border_select_do;
|
||||
ot->exec = border_select_exec;
|
||||
ot->invoke = WM_border_select_invoke;
|
||||
ot->modal = WM_border_select_modal;
|
||||
ot->cancel = WM_border_select_cancel;
|
||||
|
@ -847,7 +847,7 @@ static void BRUSH_OT_stencil_fit_image_aspect(wmOperatorType *ot)
|
||||
}
|
||||
|
||||
|
||||
static int stencil_reset_transform(bContext *C, wmOperator *op)
|
||||
static int stencil_reset_transform_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Paint *paint = BKE_paint_get_active_from_context(C);
|
||||
Brush *br = BKE_paint_brush(paint);
|
||||
@ -889,7 +889,7 @@ static void BRUSH_OT_stencil_reset_transform(wmOperatorType *ot)
|
||||
ot->idname = "BRUSH_OT_stencil_reset_transform";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = stencil_reset_transform;
|
||||
ot->exec = stencil_reset_transform_exec;
|
||||
ot->poll = stencil_control_poll;
|
||||
|
||||
/* flags */
|
||||
|
@ -2025,7 +2025,7 @@ static void do_weight_paint_vertex(
|
||||
|
||||
/* *************** set wpaint operator ****************** */
|
||||
|
||||
static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
|
||||
static int wpaint_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op)) /* toggle */
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
@ -2096,7 +2096,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
|
||||
ot->description = "Toggle weight paint mode in 3D view";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = set_wpaint;
|
||||
ot->exec = wpaint_mode_toggle_exec;
|
||||
ot->poll = paint_poll_test;
|
||||
|
||||
/* flags */
|
||||
@ -2642,7 +2642,7 @@ void PAINT_OT_weight_set(wmOperatorType *ot)
|
||||
/* ************ set / clear vertex paint mode ********** */
|
||||
|
||||
|
||||
static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
|
||||
static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) /* toggle */
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
@ -2673,7 +2673,7 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
|
||||
ob->mode |= OB_MODE_VERTEX_PAINT;
|
||||
/* Turn off weight painting */
|
||||
if (ob->mode & OB_MODE_WEIGHT_PAINT)
|
||||
set_wpaint(C, op);
|
||||
wpaint_mode_toggle_exec(C, op);
|
||||
|
||||
if (vp == NULL)
|
||||
vp = scene->toolsettings->vpaint = new_vpaint(0);
|
||||
@ -2700,7 +2700,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
|
||||
ot->description = "Toggle the vertex paint mode in 3D view";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = set_vpaint;
|
||||
ot->exec = vpaint_mode_toggle_exec;
|
||||
ot->poll = paint_poll_test;
|
||||
|
||||
/* flags */
|
||||
|
@ -4523,7 +4523,7 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot)
|
||||
|
||||
/**** Reset the copy of the mesh that is being sculpted on (currently just for the layer brush) ****/
|
||||
|
||||
static int sculpt_set_persistent_base(bContext *C, wmOperator *UNUSED(op))
|
||||
static int sculpt_set_persistent_base_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
SculptSession *ss = CTX_data_active_object(C)->sculpt;
|
||||
|
||||
@ -4544,7 +4544,7 @@ static void SCULPT_OT_set_persistent_base(wmOperatorType *ot)
|
||||
ot->description = "Reset the copy of the mesh that is being sculpted on";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = sculpt_set_persistent_base;
|
||||
ot->exec = sculpt_set_persistent_base_exec;
|
||||
ot->poll = sculpt_mode_poll;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
@ -4893,7 +4893,7 @@ int ED_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op))
|
||||
static int sculpt_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *ts = CTX_data_tool_settings(C);
|
||||
@ -4981,7 +4981,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
|
||||
ot->description = "Toggle sculpt mode in 3D view";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = sculpt_toggle_mode;
|
||||
ot->exec = sculpt_mode_toggle_exec;
|
||||
ot->poll = ED_operator_object_active_editable_mesh;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
@ -828,7 +828,7 @@ void graph_buttons_register(ARegionType *art)
|
||||
BLI_addtail(&art->paneltypes, pt);
|
||||
}
|
||||
|
||||
static int graph_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int graph_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = graph_has_buttons_region(sa);
|
||||
@ -845,7 +845,7 @@ void GRAPH_OT_properties(wmOperatorType *ot)
|
||||
ot->idname = "GRAPH_OT_properties";
|
||||
ot->description = "Toggle display properties panel";
|
||||
|
||||
ot->exec = graph_properties;
|
||||
ot->exec = graph_properties_toggle_exec;
|
||||
ot->poll = ED_operator_graphedit_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -886,7 +886,7 @@ void image_buttons_register(ARegionType *art)
|
||||
BLI_addtail(&art->paneltypes, pt);
|
||||
}
|
||||
|
||||
static int image_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int image_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = image_has_buttons_region(sa);
|
||||
@ -903,14 +903,14 @@ void IMAGE_OT_properties(wmOperatorType *ot)
|
||||
ot->idname = "IMAGE_OT_properties";
|
||||
ot->description = "Toggle display properties panel";
|
||||
|
||||
ot->exec = image_properties;
|
||||
ot->exec = image_properties_toggle_exec;
|
||||
ot->poll = ED_operator_image_active;
|
||||
|
||||
/* flags */
|
||||
ot->flag = 0;
|
||||
}
|
||||
|
||||
static int image_scopes(bContext *C, wmOperator *UNUSED(op))
|
||||
static int image_scopes_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = image_has_scope_region(sa);
|
||||
@ -927,7 +927,7 @@ void IMAGE_OT_scopes(wmOperatorType *ot)
|
||||
ot->idname = "IMAGE_OT_scopes";
|
||||
ot->description = "Toggle display scopes panel";
|
||||
|
||||
ot->exec = image_scopes;
|
||||
ot->exec = image_scopes_toggle_exec;
|
||||
ot->poll = ED_operator_image_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "interface_intern.h"
|
||||
#include "logic_intern.h"
|
||||
|
||||
static int logic_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int logic_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = logic_has_buttons_region(sa);
|
||||
@ -67,7 +67,7 @@ void LOGIC_OT_properties(wmOperatorType *ot)
|
||||
ot->description = "Toggle display properties panel";
|
||||
ot->idname = "LOGIC_OT_properties";
|
||||
|
||||
ot->exec = logic_properties;
|
||||
ot->exec = logic_properties_toggle_exec;
|
||||
ot->poll = ED_operator_logic_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -552,7 +552,7 @@ void nla_buttons_register(ARegionType *art)
|
||||
BLI_addtail(&art->paneltypes, pt);
|
||||
}
|
||||
|
||||
static int nla_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int nla_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = nla_has_buttons_region(sa);
|
||||
@ -569,7 +569,7 @@ void NLA_OT_properties(wmOperatorType *ot)
|
||||
ot->idname = "NLA_OT_properties";
|
||||
ot->description = "Toggle display properties panel";
|
||||
|
||||
ot->exec = nla_properties;
|
||||
ot->exec = nla_properties_toggle_exec;
|
||||
ot->poll = ED_operator_nla_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -206,7 +206,7 @@ void node_buttons_register(ARegionType *art)
|
||||
BLI_addtail(&art->paneltypes, pt);
|
||||
}
|
||||
|
||||
static int node_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int node_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = node_has_buttons_region(sa);
|
||||
@ -230,7 +230,7 @@ void NODE_OT_properties(wmOperatorType *ot)
|
||||
ot->description = "Toggles the properties panel display";
|
||||
ot->idname = "NODE_OT_properties";
|
||||
|
||||
ot->exec = node_properties;
|
||||
ot->exec = node_properties_toggle_exec;
|
||||
ot->poll = node_properties_poll;
|
||||
|
||||
/* flags */
|
||||
|
@ -356,7 +356,7 @@ static int node_link_viewer(const bContext *C, bNode *tonode)
|
||||
}
|
||||
|
||||
|
||||
static int node_active_link_viewer(bContext *C, wmOperator *UNUSED(op))
|
||||
static int node_active_link_viewer_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
bNode *node;
|
||||
@ -385,7 +385,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot)
|
||||
ot->idname = "NODE_OT_link_viewer";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = node_active_link_viewer;
|
||||
ot->exec = node_active_link_viewer_exec;
|
||||
ot->poll = composite_node_editable;
|
||||
|
||||
/* flags */
|
||||
|
@ -60,7 +60,7 @@ void node_toolbar_register(ARegionType *UNUSED(art))
|
||||
|
||||
/* ********** operator to open/close toolshelf region */
|
||||
|
||||
static int node_toolbar(bContext *C, wmOperator *UNUSED(op))
|
||||
static int node_toolbar_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = node_has_tools_region(sa);
|
||||
@ -84,7 +84,7 @@ void NODE_OT_toolbar(wmOperatorType *ot)
|
||||
ot->description = "Toggles tool shelf display";
|
||||
ot->idname = "NODE_OT_toolbar";
|
||||
|
||||
ot->exec = node_toolbar;
|
||||
ot->exec = node_toolbar_toggle_exec;
|
||||
ot->poll = node_toolbar_poll;
|
||||
|
||||
/* flags */
|
||||
|
@ -295,7 +295,7 @@ void NODE_OT_backimage_move(wmOperatorType *ot)
|
||||
ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER;
|
||||
}
|
||||
|
||||
static int backimage_zoom(bContext *C, wmOperator *op)
|
||||
static int backimage_zoom_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
@ -317,7 +317,7 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
|
||||
ot->description = "Zoom in/out the background image";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = backimage_zoom;
|
||||
ot->exec = backimage_zoom_exec;
|
||||
ot->poll = composite_node_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -76,7 +76,7 @@ void sequencer_buttons_register(ARegionType *art)
|
||||
|
||||
/* **************** operator to open/close properties view ************* */
|
||||
|
||||
static int sequencer_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int sequencer_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = sequencer_has_buttons_region(sa);
|
||||
@ -93,7 +93,7 @@ void SEQUENCER_OT_properties(wmOperatorType *ot)
|
||||
ot->idname = "SEQUENCER_OT_properties";
|
||||
ot->description = "Open sequencer properties panel";
|
||||
|
||||
ot->exec = sequencer_properties;
|
||||
ot->exec = sequencer_properties_toggle_exec;
|
||||
ot->poll = ED_operator_sequencer_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -1171,7 +1171,7 @@ void view3d_buttons_register(ARegionType *art)
|
||||
BLI_addtail(&art->paneltypes, pt);
|
||||
}
|
||||
|
||||
static int view3d_properties(bContext *C, wmOperator *UNUSED(op))
|
||||
static int view3d_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = view3d_has_buttons_region(sa);
|
||||
@ -1188,7 +1188,7 @@ void VIEW3D_OT_properties(wmOperatorType *ot)
|
||||
ot->description = "Toggles the properties panel display";
|
||||
ot->idname = "VIEW3D_OT_properties";
|
||||
|
||||
ot->exec = view3d_properties;
|
||||
ot->exec = view3d_properties_toggle_exec;
|
||||
ot->poll = ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -532,7 +532,7 @@ static void make_trans_verts(Object *obedit, float min[3], float max[3], int mod
|
||||
|
||||
/* *********************** operators ******************** */
|
||||
|
||||
static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
|
||||
static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
@ -664,7 +664,7 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
|
||||
ot->idname = "VIEW3D_OT_snap_selected_to_grid";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = snap_sel_to_grid;
|
||||
ot->exec = snap_sel_to_grid_exec;
|
||||
ot->poll = ED_operator_region_view3d_active;
|
||||
|
||||
/* flags */
|
||||
@ -673,7 +673,7 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
static int snap_sel_to_curs(bContext *C, wmOperator *op)
|
||||
static int snap_sel_to_curs_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
@ -832,7 +832,7 @@ void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)
|
||||
ot->idname = "VIEW3D_OT_snap_selected_to_cursor";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = snap_sel_to_curs;
|
||||
ot->exec = snap_sel_to_curs_exec;
|
||||
ot->poll = ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
@ -844,7 +844,7 @@ void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
static int snap_curs_to_grid(bContext *C, wmOperator *UNUSED(op))
|
||||
static int snap_curs_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
RegionView3D *rv3d = CTX_wm_region_data(C);
|
||||
@ -871,7 +871,7 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
|
||||
ot->idname = "VIEW3D_OT_snap_cursor_to_grid";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = snap_curs_to_grid;
|
||||
ot->exec = snap_curs_to_grid_exec;
|
||||
ot->poll = ED_operator_region_view3d_active;
|
||||
|
||||
/* flags */
|
||||
@ -1029,7 +1029,7 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
|
||||
return true;
|
||||
}
|
||||
|
||||
static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
|
||||
static int snap_curs_to_sel_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
@ -1055,7 +1055,7 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
|
||||
ot->idname = "VIEW3D_OT_snap_cursor_to_selected";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = snap_curs_to_sel;
|
||||
ot->exec = snap_curs_to_sel_exec;
|
||||
ot->poll = ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
@ -1064,7 +1064,7 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
|
||||
|
||||
/* ********************************************** */
|
||||
|
||||
static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
|
||||
static int snap_curs_to_active_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Object *obact = CTX_data_active_object(C);
|
||||
@ -1113,7 +1113,7 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
|
||||
ot->idname = "VIEW3D_OT_snap_cursor_to_active";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = snap_curs_to_active;
|
||||
ot->exec = snap_curs_to_active_exec;
|
||||
ot->poll = ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
@ -1122,7 +1122,7 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
|
||||
|
||||
/* **************************************************** */
|
||||
/*New Code - Snap Cursor to Center -*/
|
||||
static int snap_curs_to_center(bContext *C, wmOperator *UNUSED(op))
|
||||
static int snap_curs_to_center_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
@ -1144,7 +1144,7 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot)
|
||||
ot->idname = "VIEW3D_OT_snap_cursor_to_center";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = snap_curs_to_center;
|
||||
ot->exec = snap_curs_to_center_exec;
|
||||
ot->poll = ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -258,7 +258,7 @@ void view3d_tool_props_register(ARegionType *art)
|
||||
|
||||
/* ********** operator to open/close toolshelf region */
|
||||
|
||||
static int view3d_toolshelf(bContext *C, wmOperator *UNUSED(op))
|
||||
static int view3d_toolshelf_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
ARegion *ar = view3d_has_tools_region(sa);
|
||||
@ -275,7 +275,7 @@ void VIEW3D_OT_toolshelf(wmOperatorType *ot)
|
||||
ot->description = "Toggles tool shelf display";
|
||||
ot->idname = "VIEW3D_OT_toolshelf";
|
||||
|
||||
ot->exec = view3d_toolshelf;
|
||||
ot->exec = view3d_toolshelf_toggle_exec;
|
||||
ot->poll = ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
|
@ -768,7 +768,7 @@ int get_qtcodec_settings(RenderData *rd, ReportList *reports)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int request_qtcodec_settings(bContext *C, wmOperator *op)
|
||||
static int request_qtcodec_settings_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
OSErr err = noErr;
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
@ -893,11 +893,11 @@ static int ED_operator_setqtcodec(bContext *C)
|
||||
#if defined(__APPLE__) && defined(GHOST_COCOA)
|
||||
/* Need to set up a Cocoa NSAutoReleasePool to avoid memory leak
|
||||
* And it must be done in an objC file, so use a GHOST_SystemCocoa.mm function for that */
|
||||
extern int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op);
|
||||
extern int cocoa_request_qtcodec_settings_exec(bContext *C, wmOperator *op);
|
||||
|
||||
int fromcocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
|
||||
{
|
||||
return request_qtcodec_settings(C, op);
|
||||
return request_qtcodec_settings_exec(C, op);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -911,9 +911,9 @@ void SCENE_OT_render_data_set_quicktime_codec(wmOperatorType *ot)
|
||||
|
||||
/* api callbacks */
|
||||
#if defined(__APPLE__) && defined(GHOST_COCOA)
|
||||
ot->exec = cocoa_request_qtcodec_settings;
|
||||
ot->exec = cocoa_request_qtcodec_settings_exec;
|
||||
#else
|
||||
ot->exec = request_qtcodec_settings;
|
||||
ot->exec = request_qtcodec_settings_exec;
|
||||
#endif
|
||||
ot->poll = ED_operator_setqtcodec;
|
||||
|
||||
|
@ -2614,7 +2614,7 @@ static void WM_OT_window_fullscreen_toggle(wmOperatorType *ot)
|
||||
ot->poll = WM_operator_winactive;
|
||||
}
|
||||
|
||||
static int wm_exit_blender_op(bContext *C, wmOperator *op)
|
||||
static int wm_exit_blender_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
WM_operator_free(op);
|
||||
|
||||
@ -2630,7 +2630,7 @@ static void WM_OT_quit_blender(wmOperatorType *ot)
|
||||
ot->description = "Quit Blender";
|
||||
|
||||
ot->invoke = WM_operator_confirm;
|
||||
ot->exec = wm_exit_blender_op;
|
||||
ot->exec = wm_exit_blender_exec;
|
||||
ot->poll = WM_operator_winactive;
|
||||
}
|
||||
|
||||
@ -2638,7 +2638,7 @@ static void WM_OT_quit_blender(wmOperatorType *ot)
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
static int wm_console_toggle_op(bContext *UNUSED(C), wmOperator *UNUSED(op))
|
||||
static int wm_console_toggle_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
|
||||
{
|
||||
GHOST_toggleConsole(2);
|
||||
return OPERATOR_FINISHED;
|
||||
@ -2651,7 +2651,7 @@ static void WM_OT_console_toggle(wmOperatorType *ot)
|
||||
ot->idname = "WM_OT_console_toggle";
|
||||
ot->description = N_("Toggle System Console");
|
||||
|
||||
ot->exec = wm_console_toggle_op;
|
||||
ot->exec = wm_console_toggle_exec;
|
||||
ot->poll = WM_operator_winactive;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user