diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-22 11:26:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-22 11:26:09 +0400 |
commit | 4c3bb77012024a3f14181eafe850b4d68bca1191 (patch) | |
tree | 0b90fefff48b03ad117c5e16d65f6e653ff5f57b /source/blender/editors/sculpt_paint | |
parent | 675628d24deba0afdc3da5b7a5bc802b13506251 (diff) |
style cleanup: spaces aroudn operators for operator definitions.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 94 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 50 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 108 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 100 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 36 |
5 files changed, 194 insertions, 194 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 956251d7bb9..a19d00b4926 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5113,18 +5113,18 @@ static int paint_cancel(bContext *C, wmOperator *op) void PAINT_OT_image_paint(wmOperatorType *ot) { /* identifiers */ - ot->name= "Image Paint"; - ot->idname= "PAINT_OT_image_paint"; + ot->name = "Image Paint"; + ot->idname = "PAINT_OT_image_paint"; /* api callbacks */ - ot->exec= paint_exec; - ot->invoke= paint_invoke; - ot->modal= paint_modal; - ot->cancel= paint_cancel; - ot->poll= image_paint_poll; + ot->exec = paint_exec; + ot->invoke = paint_invoke; + ot->modal = paint_modal; + ot->cancel = paint_cancel; + ot->poll = image_paint_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); @@ -5340,18 +5340,18 @@ static int grab_clone_cancel(bContext *UNUSED(C), wmOperator *op) void PAINT_OT_grab_clone(wmOperatorType *ot) { /* identifiers */ - ot->name= "Grab Clone"; - ot->idname= "PAINT_OT_grab_clone"; + ot->name = "Grab Clone"; + ot->idname = "PAINT_OT_grab_clone"; /* api callbacks */ - ot->exec= grab_clone_exec; - ot->invoke= grab_clone_invoke; - ot->modal= grab_clone_modal; - ot->cancel= grab_clone_cancel; - ot->poll= image_paint_2d_clone_poll; + ot->exec = grab_clone_exec; + ot->invoke = grab_clone_invoke; + ot->modal = grab_clone_modal; + ot->cancel = grab_clone_cancel; + ot->poll = image_paint_2d_clone_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates", -1.0f, 1.0f); @@ -5422,17 +5422,17 @@ static int image_paint_sample_color_poll(bContext *C) void PAINT_OT_sample_color(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sample Color"; - ot->idname= "PAINT_OT_sample_color"; + ot->name = "Sample Color"; + ot->idname = "PAINT_OT_sample_color"; /* api callbacks */ - ot->exec= sample_color_exec; - ot->invoke= sample_color_invoke; - ot->modal= sample_color_modal; - ot->poll= image_paint_sample_color_poll; + ot->exec = sample_color_exec; + ot->invoke = sample_color_invoke; + ot->modal = sample_color_modal; + ot->poll = image_paint_sample_color_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates", 0, 16384); @@ -5473,16 +5473,16 @@ static int set_clone_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) void PAINT_OT_clone_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Clone Cursor"; - ot->idname= "PAINT_OT_clone_cursor_set"; + ot->name = "Set Clone Cursor"; + ot->idname = "PAINT_OT_clone_cursor_set"; /* api callbacks */ - ot->exec= set_clone_cursor_exec; - ot->invoke= set_clone_cursor_invoke; - ot->poll= image_paint_3d_poll; + ot->exec = set_clone_cursor_exec; + ot->invoke = set_clone_cursor_invoke; + ot->poll = image_paint_3d_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates", -10000.0f, 10000.0f); @@ -5555,15 +5555,15 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) void PAINT_OT_texture_paint_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Texture Paint Toggle"; - ot->idname= "PAINT_OT_texture_paint_toggle"; + ot->name = "Texture Paint Toggle"; + ot->idname = "PAINT_OT_texture_paint_toggle"; /* api callbacks */ - ot->exec= texture_paint_toggle_exec; - ot->poll= texture_paint_toggle_poll; + ot->exec = texture_paint_toggle_exec; + ot->poll = texture_paint_toggle_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } static int texture_paint_poll(bContext *C) @@ -5705,20 +5705,20 @@ void PAINT_OT_project_image(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Project Image"; - ot->idname= "PAINT_OT_project_image"; - ot->description= "Project an edited render from the active camera back onto the object"; + ot->name = "Project Image"; + ot->idname = "PAINT_OT_project_image"; + ot->description = "Project an edited render from the active camera back onto the object"; /* api callbacks */ - ot->invoke= WM_enum_search_invoke; - ot->exec= texture_paint_camera_project_exec; + ot->invoke = WM_enum_search_invoke; + ot->exec = texture_paint_camera_project_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; prop= RNA_def_enum(ot->srna, "image", DummyRNA_NULL_items, 0, "Image", ""); RNA_def_enum_funcs(prop, RNA_image_itemf); - ot->prop= prop; + ot->prop = prop; } static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) @@ -5784,16 +5784,16 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) void PAINT_OT_image_from_view(wmOperatorType *ot) { /* identifiers */ - ot->name= "Image from View"; - ot->idname= "PAINT_OT_image_from_view"; - ot->description= "Make an image from the current 3D view for re-projection"; + ot->name = "Image from View"; + ot->idname = "PAINT_OT_image_from_view"; + ot->description = "Make an image from the current 3D view for re-projection"; /* api callbacks */ - ot->exec= texture_paint_image_from_view_exec; - ot->poll= ED_operator_region_view3d_active; + ot->exec = texture_paint_image_from_view_exec; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER; + ot->flag = OPTYPE_REGISTER; RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, "File Path", "Name of the file"); } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 7880fafca9e..bb1833b4d5e 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -75,15 +75,15 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op)) static void BRUSH_OT_add(wmOperatorType *ot) { /* identifiers */ - ot->name= "Add Brush"; - ot->description= "Add brush by mode type"; - ot->idname= "BRUSH_OT_add"; + ot->name = "Add Brush"; + ot->description = "Add brush by mode type"; + ot->idname = "BRUSH_OT_add"; /* api callbacks */ - ot->exec= brush_add_exec; + ot->exec = brush_add_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } @@ -131,15 +131,15 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) static void BRUSH_OT_scale_size(wmOperatorType *ot) { /* identifiers */ - ot->name= "Scale Sculpt/Paint Brush Size"; - ot->description= "Change brush size by a scalar"; - ot->idname= "BRUSH_OT_scale_size"; + ot->name = "Scale Sculpt/Paint Brush Size"; + ot->description = "Change brush size by a scalar"; + ot->idname = "BRUSH_OT_scale_size"; /* api callbacks */ - ot->exec= brush_scale_size_exec; + ot->exec = brush_scale_size_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_float(ot->srna, "scalar", 1, 0, 2, "Scalar", "Factor to scale brush size by", 0, 2); } @@ -158,15 +158,15 @@ static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op)) static void PAINT_OT_vertex_color_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Vertex Colors"; - ot->idname= "PAINT_OT_vertex_color_set"; + ot->name = "Set Vertex Colors"; + ot->idname = "PAINT_OT_vertex_color_set"; /* api callbacks */ - ot->exec= vertex_color_set_exec; - ot->poll= vertex_paint_mode_poll; + ot->exec = vertex_color_set_exec; + ot->poll = vertex_paint_mode_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) @@ -187,15 +187,15 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) static void BRUSH_OT_reset(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset Brush"; - ot->description= "Return brush to defaults based on current tool"; - ot->idname= "BRUSH_OT_reset"; + ot->name = "Reset Brush"; + ot->description = "Return brush to defaults based on current tool"; + ot->idname = "BRUSH_OT_reset"; /* api callbacks */ - ot->exec= brush_reset_exec; + ot->exec = brush_reset_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } static int brush_tool(const Brush *brush, size_t tool_offset) @@ -302,15 +302,15 @@ static void PAINT_OT_brush_select(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Brush Select"; - ot->description= "Select a paint mode's brush by tool type"; - ot->idname= "PAINT_OT_brush_select"; + ot->name = "Brush Select"; + ot->description = "Select a paint mode's brush by tool type"; + ot->idname = "PAINT_OT_brush_select"; /* api callbacks */ - ot->exec= brush_select_exec; + ot->exec = brush_select_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ RNA_def_enum(ot->srna, "paint_mode", paint_mode_items, OB_MODE_ACTIVE, "Paint Mode", ""); diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index dcd7554b7b8..3cd963c11df 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -380,14 +380,14 @@ void BRUSH_OT_curve_preset(wmOperatorType *ot) {CURVE_PRESET_ROOT, "ROOT", 0, "Root", ""}, {0, NULL, 0, NULL, NULL}}; - ot->name= "Preset"; - ot->description= "Set brush shape"; - ot->idname= "BRUSH_OT_curve_preset"; + ot->name = "Preset"; + ot->description = "Set brush shape"; + ot->idname = "BRUSH_OT_curve_preset"; - ot->exec= brush_curve_preset_exec; - ot->poll= brush_curve_preset_poll; + ot->exec = brush_curve_preset_exec; + ot->poll = brush_curve_preset_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", ""); } @@ -403,14 +403,14 @@ static int paint_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_face_select_linked(wmOperatorType *ot) { - ot->name= "Select Linked"; - ot->description= "Select linked faces"; - ot->idname= "PAINT_OT_face_select_linked"; + ot->name = "Select Linked"; + ot->description = "Select linked faces"; + ot->idname = "PAINT_OT_face_select_linked"; - ot->exec= paint_select_linked_exec; - ot->poll= facemask_paint_poll; + ot->exec = paint_select_linked_exec; + ot->poll = facemask_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -423,14 +423,14 @@ static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) { - ot->name= "Select Linked Pick"; - ot->description= "Select linked faces"; - ot->idname= "PAINT_OT_face_select_linked_pick"; + ot->name = "Select Linked Pick"; + ot->description = "Select linked faces"; + ot->idname = "PAINT_OT_face_select_linked_pick"; - ot->invoke= paint_select_linked_pick_invoke; - ot->poll= facemask_paint_poll; + ot->invoke = paint_select_linked_pick_invoke; + ot->poll = facemask_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); } @@ -447,14 +447,14 @@ static int face_select_all_exec(bContext *C, wmOperator *op) void PAINT_OT_face_select_all(wmOperatorType *ot) { - ot->name= "Face Selection"; - ot->description= "Change selection for all faces"; - ot->idname= "PAINT_OT_face_select_all"; + ot->name = "Face Selection"; + ot->description = "Change selection for all faces"; + ot->idname = "PAINT_OT_face_select_all"; - ot->exec= face_select_all_exec; - ot->poll= facemask_paint_poll; + ot->exec = face_select_all_exec; + ot->poll = facemask_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; WM_operator_properties_select_all(ot); } @@ -471,14 +471,14 @@ static int vert_select_all_exec(bContext *C, wmOperator *op) void PAINT_OT_vert_select_all(wmOperatorType *ot) { - ot->name= "Vertex Selection"; - ot->description= "Change selection for all vertices"; - ot->idname= "PAINT_OT_vert_select_all"; + ot->name = "Vertex Selection"; + ot->description = "Change selection for all vertices"; + ot->idname = "PAINT_OT_vert_select_all"; - ot->exec= vert_select_all_exec; - ot->poll= vert_paint_poll; + ot->exec = vert_select_all_exec; + ot->poll = vert_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; WM_operator_properties_select_all(ot); } @@ -493,14 +493,14 @@ static int vert_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_vert_select_inverse(wmOperatorType *ot) { - ot->name= "Vertex Select Invert"; - ot->description= "Invert selection of vertices"; - ot->idname= "PAINT_OT_vert_select_inverse"; + ot->name = "Vertex Select Invert"; + ot->description = "Invert selection of vertices"; + ot->idname = "PAINT_OT_vert_select_inverse"; - ot->exec= vert_select_inverse_exec; - ot->poll= vert_paint_poll; + ot->exec = vert_select_inverse_exec; + ot->poll = vert_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { @@ -513,14 +513,14 @@ static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_face_select_inverse(wmOperatorType *ot) { - ot->name= "Face Select Invert"; - ot->description= "Invert selection of faces"; - ot->idname= "PAINT_OT_face_select_inverse"; + ot->name = "Face Select Invert"; + ot->description = "Invert selection of faces"; + ot->idname = "PAINT_OT_face_select_inverse"; - ot->exec= face_select_inverse_exec; - ot->poll= facemask_paint_poll; + ot->exec = face_select_inverse_exec; + ot->poll = facemask_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } static int face_select_hide_exec(bContext *C, wmOperator *op) @@ -534,14 +534,14 @@ static int face_select_hide_exec(bContext *C, wmOperator *op) void PAINT_OT_face_select_hide(wmOperatorType *ot) { - ot->name= "Face Select Hide"; - ot->description= "Hide selected faces"; - ot->idname= "PAINT_OT_face_select_hide"; + ot->name = "Face Select Hide"; + ot->description = "Hide selected faces"; + ot->idname = "PAINT_OT_face_select_hide"; - ot->exec= face_select_hide_exec; - ot->poll= facemask_paint_poll; + ot->exec = face_select_hide_exec; + ot->poll = facemask_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects"); } @@ -556,14 +556,14 @@ static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_face_select_reveal(wmOperatorType *ot) { - ot->name= "Face Select Reveal"; - ot->description= "Reveal hidden faces"; - ot->idname= "PAINT_OT_face_select_reveal"; + ot->name = "Face Select Reveal"; + ot->description = "Reveal hidden faces"; + ot->idname = "PAINT_OT_face_select_reveal"; - ot->exec= face_select_reveal_exec; - ot->poll= facemask_paint_poll; + ot->exec = face_select_reveal_exec; + ot->poll = facemask_paint_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects"); } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index bf3a7268e11..cb920e3f048 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1077,15 +1077,15 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) void PAINT_OT_weight_sample(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint Sample Weight"; - ot->idname= "PAINT_OT_weight_sample"; + ot->name = "Weight Paint Sample Weight"; + ot->idname = "PAINT_OT_weight_sample"; /* api callbacks */ - ot->invoke= weight_sample_invoke; - ot->poll= weight_paint_mode_poll; + ot->invoke = weight_sample_invoke; + ot->poll = weight_paint_mode_poll; /* flags */ - ot->flag= OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; } /* samples cursor location, and gives menu with vertex groups to activate */ @@ -1178,21 +1178,21 @@ void PAINT_OT_weight_sample_group(wmOperatorType *ot) PropertyRNA *prop= NULL; /* identifiers */ - ot->name= "Weight Paint Sample Group"; - ot->idname= "PAINT_OT_weight_sample_group"; + ot->name = "Weight Paint Sample Group"; + ot->idname = "PAINT_OT_weight_sample_group"; /* api callbacks */ - ot->exec= weight_sample_group_exec; - ot->invoke= WM_menu_invoke; - ot->poll= weight_paint_mode_poll; + ot->exec = weight_sample_group_exec; + ot->invoke = WM_menu_invoke; + ot->poll = weight_paint_mode_poll; /* flags */ - ot->flag= OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ prop= RNA_def_enum(ot->srna, "group", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use"); RNA_def_enum_funcs(prop, weight_paint_sample_enum_itemf); - ot->prop= prop; + ot->prop = prop; } static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_tot, const char *vgroup_validmap) @@ -2039,15 +2039,15 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint Mode"; - ot->idname= "PAINT_OT_weight_paint_toggle"; + ot->name = "Weight Paint Mode"; + ot->idname = "PAINT_OT_weight_paint_toggle"; /* api callbacks */ - ot->exec= set_wpaint; - ot->poll= paint_poll_test; + ot->exec = set_wpaint; + ot->poll = paint_poll_test; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } @@ -2491,18 +2491,18 @@ void PAINT_OT_weight_paint(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weight Paint"; - ot->idname= "PAINT_OT_weight_paint"; + ot->name = "Weight Paint"; + ot->idname = "PAINT_OT_weight_paint"; /* api callbacks */ - ot->invoke= wpaint_invoke; - ot->modal= paint_stroke_modal; - /* ot->exec= vpaint_exec; <-- needs stroke property */ - ot->poll= weight_paint_poll; - ot->cancel= wpaint_cancel; + ot->invoke = wpaint_invoke; + ot->modal = paint_stroke_modal; + /* ot->exec = vpaint_exec; <-- needs stroke property */ + ot->poll = weight_paint_poll; + ot->cancel = wpaint_cancel; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } @@ -2520,15 +2520,15 @@ static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op)) void PAINT_OT_weight_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Weight"; - ot->idname= "PAINT_OT_weight_set"; + ot->name = "Set Weight"; + ot->idname = "PAINT_OT_weight_set"; /* api callbacks */ - ot->exec= weight_paint_set_exec; - ot->poll= mask_paint_poll; /* it was facemask_paint_poll */ + ot->exec = weight_paint_set_exec; + ot->poll = mask_paint_poll; /* it was facemask_paint_poll */ /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* ************ set / clear vertex paint mode ********** */ @@ -2582,15 +2582,15 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Paint Mode"; - ot->idname= "PAINT_OT_vertex_paint_toggle"; + ot->name = "Vertex Paint Mode"; + ot->idname = "PAINT_OT_vertex_paint_toggle"; /* api callbacks */ - ot->exec= set_vpaint; - ot->poll= paint_poll_test; + ot->exec = set_vpaint; + ot->poll = paint_poll_test; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } @@ -2992,18 +2992,18 @@ static int vpaint_cancel(bContext *C, wmOperator *op) void PAINT_OT_vertex_paint(wmOperatorType *ot) { /* identifiers */ - ot->name= "Vertex Paint"; - ot->idname= "PAINT_OT_vertex_paint"; + ot->name = "Vertex Paint"; + ot->idname = "PAINT_OT_vertex_paint"; /* api callbacks */ - ot->invoke= vpaint_invoke; - ot->modal= paint_stroke_modal; - /* ot->exec= vpaint_exec; <-- needs stroke property */ - ot->poll= vertex_paint_poll; - ot->cancel= vpaint_cancel; + ot->invoke = vpaint_invoke; + ot->modal = paint_stroke_modal; + /* ot->exec = vpaint_exec; <-- needs stroke property */ + ot->poll = vertex_paint_poll; + ot->cancel = vpaint_cancel; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } @@ -3041,17 +3041,17 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Weight from Bones"; - ot->idname= "PAINT_OT_weight_from_bones"; + ot->name = "Weight from Bones"; + ot->idname = "PAINT_OT_weight_from_bones"; /* api callbacks */ - ot->exec= weight_from_bones_exec; - ot->invoke= WM_menu_invoke; - ot->poll= weight_from_bones_poll; + ot->exec = weight_from_bones_exec; + ot->invoke = WM_menu_invoke; + ot->poll = weight_from_bones_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights"); + ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights"); } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 968116924f4..6c665533fcb 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3563,18 +3563,18 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot) }; /* identifiers */ - ot->name= "Sculpt Mode"; - ot->idname= "SCULPT_OT_brush_stroke"; + ot->name = "Sculpt Mode"; + ot->idname = "SCULPT_OT_brush_stroke"; /* api callbacks */ - ot->invoke= sculpt_brush_stroke_invoke; - ot->modal= paint_stroke_modal; - ot->exec= sculpt_brush_stroke_exec; - ot->poll= sculpt_poll; - ot->cancel= sculpt_brush_stroke_cancel; + ot->invoke = sculpt_brush_stroke_invoke; + ot->modal = paint_stroke_modal; + ot->exec = sculpt_brush_stroke_exec; + ot->poll = sculpt_poll; + ot->cancel = sculpt_brush_stroke_cancel; /* flags (sculpt does own undo? (ton) */ - ot->flag= OPTYPE_BLOCKING; + ot->flag = OPTYPE_BLOCKING; /* properties */ @@ -3608,14 +3608,14 @@ static int sculpt_set_persistent_base(bContext *C, wmOperator *UNUSED(op)) static void SCULPT_OT_set_persistent_base(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Persistent Base"; - ot->idname= "SCULPT_OT_set_persistent_base"; + ot->name = "Set Persistent Base"; + ot->idname = "SCULPT_OT_set_persistent_base"; /* api callbacks */ - ot->exec= sculpt_set_persistent_base; - ot->poll= sculpt_mode_poll; + ot->exec = sculpt_set_persistent_base; + ot->poll = sculpt_mode_poll; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /**** Toggle operator for turning sculpt mode on or off ****/ @@ -3686,14 +3686,14 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op)) static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sculpt Mode"; - ot->idname= "SCULPT_OT_sculptmode_toggle"; + ot->name = "Sculpt Mode"; + ot->idname = "SCULPT_OT_sculptmode_toggle"; /* api callbacks */ - ot->exec= sculpt_toggle_mode; - ot->poll= ED_operator_object_active_editable_mesh; + ot->exec = sculpt_toggle_mode; + ot->poll = ED_operator_object_active_editable_mesh; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } void ED_operatortypes_sculpt(void) |