Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-02 13:03:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-02 13:03:56 +0300
commitb076b3853c99d947806e05fe2dec29ca5fa944fa (patch)
tree3d975903096066e33f8cfdcff60e118685deacf8 /source/blender/editors/object
parentad5a20efcef8114b589ff66d09166eabdc8e67ad (diff)
parentb88e51dd55c62bdc160f33f9b2ae1727a892560a (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c6
-rw-r--r--source/blender/editors/object/object_constraint.c6
-rw-r--r--source/blender/editors/object/object_data_transfer.c4
-rw-r--r--source/blender/editors/object/object_edit.c12
-rw-r--r--source/blender/editors/object/object_facemap_ops.c4
-rw-r--r--source/blender/editors/object/object_hook.c2
-rw-r--r--source/blender/editors/object/object_intern.h4
-rw-r--r--source/blender/editors/object/object_modifier.c22
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/object/object_shapekey.c8
-rw-r--r--source/blender/editors/object/object_vgroup.c24
13 files changed, 50 insertions, 50 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 73e7271abf7..a8c3c905dd4 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1661,7 +1661,7 @@ static void curvetomesh(Main *bmain, Depsgraph *depsgraph, Scene *scene, Object
}
}
-static int convert_poll(bContext *C)
+static bool convert_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
Base *base_act = CTX_data_active_base(C);
@@ -2476,7 +2476,7 @@ void OBJECT_OT_add_named(wmOperatorType *ot)
/**************************** Join *************************/
-static int join_poll(bContext *C)
+static bool join_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -2528,7 +2528,7 @@ void OBJECT_OT_join(wmOperatorType *ot)
/**************************** Join as Shape Key*************************/
-static int join_shapes_poll(bContext *C)
+static bool join_shapes_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 2ede8caf7de..d7bef459b82 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -578,7 +578,7 @@ static const EnumPropertyItem constraint_owner_items[] = {
{0, NULL, 0, NULL, NULL}};
-static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
+static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", rna_type);
Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
@@ -606,7 +606,7 @@ static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
return 1;
}
-static int edit_constraint_poll(bContext *C)
+static bool edit_constraint_poll(bContext *C)
{
return edit_constraint_poll_generic(C, &RNA_Constraint);
}
@@ -1265,7 +1265,7 @@ void ED_object_constraint_dependency_tag_update(Main *bmain, Object *ob, bConstr
DEG_relations_tag_update(bmain);
}
-static int constraint_poll(bContext *C)
+static bool constraint_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
return (ptr.id.data && ptr.data);
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index 788f0826848..f56fd560946 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -442,7 +442,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
/* Used by both OBJECT_OT_data_transfer and OBJECT_OT_datalayout_transfer */
/* Note this context poll is only really partial, it cannot check for all possible invalid cases. */
-static int data_transfer_poll(bContext *C)
+static bool data_transfer_poll(bContext *C)
{
Object *ob = ED_object_active_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -610,7 +610,7 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot)
* or as a DataTransfer modifier tool.
*/
-static int datalayout_transfer_poll(bContext *C)
+static bool datalayout_transfer_poll(bContext *C)
{
return (edit_modifier_poll_generic(C, &RNA_DataTransferModifier, (1 << OB_MESH)) || data_transfer_poll(C));
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index e14842c0daa..0ca797e43b6 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -148,7 +148,7 @@ Object *ED_object_active_context(bContext *C)
/* ********************** object hiding *************************** */
-static int object_hide_poll(bContext *C)
+static bool object_hide_poll(bContext *C)
{
if (CTX_wm_space_outliner(C) != NULL) {
return ED_outliner_collections_editor_poll(C);
@@ -714,7 +714,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int editmode_toggle_poll(bContext *C)
+static bool editmode_toggle_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -1325,7 +1325,7 @@ void OBJECT_OT_paths_calculate(wmOperatorType *ot)
/* --------- */
-static int object_update_paths_poll(bContext *C)
+static bool object_update_paths_poll(bContext *C)
{
if (ED_operator_object_active_editable(C)) {
Object *ob = ED_object_active_context(C);
@@ -1494,7 +1494,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
return (done) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-static int shade_poll(bContext *C)
+static bool shade_poll(bContext *C)
{
return (CTX_data_edit_object(C) == NULL);
}
@@ -1581,7 +1581,7 @@ static const EnumPropertyItem *object_mode_set_itemsf(
return item;
}
-static int object_mode_set_poll(bContext *C)
+static bool object_mode_set_poll(bContext *C)
{
/* Since Grease Pencil editmode is also handled here,
* we have a special exception for allowing this operator
@@ -1779,7 +1779,7 @@ bool ED_object_editmode_calc_active_center(Object *obedit, const bool select_onl
return false;
}
-static int move_to_collection_poll(bContext *C)
+static bool move_to_collection_poll(bContext *C)
{
if (CTX_wm_space_outliner(C) != NULL) {
return ED_outliner_collections_editor_poll(C);
diff --git a/source/blender/editors/object/object_facemap_ops.c b/source/blender/editors/object/object_facemap_ops.c
index c5882560083..a561556bba0 100644
--- a/source/blender/editors/object/object_facemap_ops.c
+++ b/source/blender/editors/object/object_facemap_ops.c
@@ -163,14 +163,14 @@ static void object_facemap_swap(Object *ob, int num1, int num2)
object_fmap_swap_object_mode(ob, num1, num2);
}
-static int face_map_supported_poll(bContext *C)
+static bool face_map_supported_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
return (ob && !ob->id.lib && ob->type == OB_MESH && data && !data->lib);
}
-static int face_map_supported_edit_mode_poll(bContext *C)
+static bool face_map_supported_edit_mode_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index de2c413c690..392fde4ceec 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -434,7 +434,7 @@ static void object_hook_select(Object *ob, HookModifierData *hmd)
/* special poll operators for hook operators */
/* TODO: check for properties window modifier context too as alternative? */
-static int hook_op_edit_poll(bContext *C)
+static bool hook_op_edit_poll(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index ce3d6eff7b4..b1ea6d72346 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -145,8 +145,8 @@ void COLLECTION_OT_objects_add_active(struct wmOperatorType *ot);
void COLLECTION_OT_objects_remove_active(struct wmOperatorType *ot);
/* object_modifier.c */
-int edit_modifier_poll_generic(struct bContext *C, struct StructRNA *rna_type, int obtype_flag);
-int edit_modifier_poll(struct bContext *C);
+bool edit_modifier_poll_generic(struct bContext *C, struct StructRNA *rna_type, int obtype_flag);
+bool edit_modifier_poll(struct bContext *C);
void edit_modifier_properties(struct wmOperatorType *ot);
int edit_modifier_invoke_properties(struct bContext *C, struct wmOperator *op);
struct ModifierData *edit_modifier_property_get(struct wmOperator *op, struct Object *ob, int type);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index d24cc936ec1..2889f798dd8 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -816,7 +816,7 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
/************************ generic functions for operators using mod names and data context *********************/
-int edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
+bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", rna_type);
Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
@@ -838,7 +838,7 @@ int edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag
return 1;
}
-int edit_modifier_poll(bContext *C)
+bool edit_modifier_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_Modifier, 0);
}
@@ -1143,7 +1143,7 @@ void OBJECT_OT_modifier_copy(wmOperatorType *ot)
/************* multires delete higher levels operator ****************/
-static int multires_poll(bContext *C)
+static bool multires_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_MultiresModifier, (1 << OB_MESH));
}
@@ -1472,13 +1472,13 @@ static void modifier_skin_customdata_delete(Object *ob)
CustomData_free_layer_active(&me->vdata, CD_MVERT_SKIN, me->totvert);
}
-static int skin_poll(bContext *C)
+static bool skin_poll(bContext *C)
{
return (!CTX_data_edit_object(C) &&
edit_modifier_poll_generic(C, &RNA_SkinModifier, (1 << OB_MESH)));
}
-static int skin_edit_poll(bContext *C)
+static bool skin_edit_poll(bContext *C)
{
return (CTX_data_edit_object(C) &&
edit_modifier_poll_generic(C, &RNA_SkinModifier, (1 << OB_MESH)));
@@ -1846,7 +1846,7 @@ void OBJECT_OT_skin_armature_create(wmOperatorType *ot)
}
/************************ delta mush bind operator *********************/
-static int correctivesmooth_poll(bContext *C)
+static bool correctivesmooth_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_CorrectiveSmoothModifier, 0);
}
@@ -1914,7 +1914,7 @@ void OBJECT_OT_correctivesmooth_bind(wmOperatorType *ot)
/************************ mdef bind operator *********************/
-static int meshdeform_poll(bContext *C)
+static bool meshdeform_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_MeshDeformModifier, 0);
}
@@ -2010,7 +2010,7 @@ void OBJECT_OT_meshdeform_bind(wmOperatorType *ot)
/****************** explode refresh operator *********************/
-static int explode_poll(bContext *C)
+static bool explode_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_ExplodeModifier, 0);
}
@@ -2058,7 +2058,7 @@ void OBJECT_OT_explode_refresh(wmOperatorType *ot)
/****************** ocean bake operator *********************/
-static int ocean_bake_poll(bContext *C)
+static bool ocean_bake_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_OceanModifier, 0);
}
@@ -2276,7 +2276,7 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot)
/************************ LaplacianDeform bind operator *********************/
-static int laplaciandeform_poll(bContext *C)
+static bool laplaciandeform_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_LaplacianDeformModifier, 0);
}
@@ -2352,7 +2352,7 @@ void OBJECT_OT_laplaciandeform_bind(wmOperatorType *ot)
/************************ sdef bind operator *********************/
-static int surfacedeform_bind_poll(bContext *C)
+static bool surfacedeform_bind_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_SurfaceDeformModifier, 0);
}
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 0dafa8905c8..47ecdf029cb 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -278,7 +278,7 @@ void ED_operatormacros_object(void)
}
-static int object_mode_poll(bContext *C)
+static bool object_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
return (!ob || ob->mode == OB_MODE_OBJECT);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 8db58b17520..324b6eca34a 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -118,7 +118,7 @@
/*********************** Make Vertex Parent Operator ************************/
-static int vertex_parent_set_poll(bContext *C)
+static bool vertex_parent_set_poll(bContext *C)
{
return ED_operator_editmesh(C) || ED_operator_editsurfcurve(C) || ED_operator_editlattice(C);
}
@@ -2387,7 +2387,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op)
return success ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-static int make_override_static_poll(bContext *C)
+static bool make_override_static_poll(bContext *C)
{
Object *obact = CTX_data_active_object(C);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 7d7871c0326..b1dee812f45 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -134,7 +134,7 @@ void ED_object_base_activate(bContext *C, Base *base)
/********************** Selection Operators **********************/
-static int objects_selectable_poll(bContext *C)
+static bool objects_selectable_poll(bContext *C)
{
/* we don't check for linked scenes here, selection is
* still allowed then for inspection of scene */
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index f2cdb0d124f..5e66dc00fd2 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -224,14 +224,14 @@ static bool object_shape_key_mirror(bContext *C, Object *ob,
/********************** shape key operators *********************/
-static int shape_key_mode_poll(bContext *C)
+static bool shape_key_mode_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && ob->mode != OB_MODE_EDIT);
}
-static int shape_key_mode_exists_poll(bContext *C)
+static bool shape_key_mode_exists_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -242,7 +242,7 @@ static int shape_key_mode_exists_poll(bContext *C)
(BKE_keyblock_from_object(ob) != NULL);
}
-static int shape_key_move_poll(bContext *C)
+static bool shape_key_move_poll(bContext *C)
{
/* Same as shape_key_mode_exists_poll above, but ensure we have at least two shapes! */
Object *ob = ED_object_context(C);
@@ -253,7 +253,7 @@ static int shape_key_move_poll(bContext *C)
ob->mode != OB_MODE_EDIT && key && key->totkey > 1);
}
-static int shape_key_poll(bContext *C)
+static bool shape_key_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 1c1c67c9da4..ca5c000819d 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -2466,7 +2466,7 @@ static void vgroup_assign_verts(Object *ob, const float weight)
/********************** vertex group operators *********************/
-static int vertex_group_poll(bContext *C)
+static bool vertex_group_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2477,7 +2477,7 @@ static int vertex_group_poll(bContext *C)
ob->defbase.first);
}
-static int vertex_group_supported_poll(bContext *C)
+static bool vertex_group_supported_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2485,7 +2485,7 @@ static int vertex_group_supported_poll(bContext *C)
data && !ID_IS_LINKED(data));
}
-static int vertex_group_mesh_poll(bContext *C)
+static bool vertex_group_mesh_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2496,7 +2496,7 @@ static int vertex_group_mesh_poll(bContext *C)
ob->defbase.first);
}
-static int UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
+static bool UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2504,7 +2504,7 @@ static int UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
}
-static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
+static bool UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2516,7 +2516,7 @@ static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
}
/* editmode _or_ weight paint vertex sel */
-static int vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const short ob_type_flag)
+static bool vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const short ob_type_flag)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2551,25 +2551,25 @@ static int vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const
}
#if 0
-static int vertex_group_vert_poll(bContext *C)
+static bool vertex_group_vert_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, false, 0);
}
#endif
-static int vertex_group_mesh_vert_poll(bContext *C)
+static bool vertex_group_mesh_vert_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, false, (1 << OB_MESH));
}
-static int vertex_group_vert_select_poll(bContext *C)
+static bool vertex_group_vert_select_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, true, 0);
}
#if 0
-static int vertex_group_mesh_vert_select_poll(bContext *C)
+static bool vertex_group_mesh_vert_select_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, true, (1 << OB_MESH));
}
@@ -2577,7 +2577,7 @@ static int vertex_group_mesh_vert_select_poll(bContext *C)
/* editmode _or_ weight paint vertex sel and active group unlocked */
-static int vertex_group_vert_select_unlocked_poll(bContext *C)
+static bool vertex_group_vert_select_unlocked_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2600,7 +2600,7 @@ static int vertex_group_vert_select_unlocked_poll(bContext *C)
return 1;
}
-static int vertex_group_vert_select_mesh_poll(bContext *C)
+static bool vertex_group_vert_select_mesh_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;