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-08-30 13:41:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-30 13:50:06 +0300
commit41d1af9a1151331171f25c3c799254b70a28d371 (patch)
tree72b9116c527db2d910174e4800f361bee8e124b8 /source/blender/editors/gpencil/gpencil_armature.c
parent5e66791b86757f1e8f3e27134406ca1284d78e0e (diff)
UI: check prop-separate before adding black decorator
This caused the blank icon to be added to menus (ndof menu for eg).
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_armature.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index 88118f8fe31..b55239deadc 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -262,8 +262,7 @@ static float get_weight(float dist, float decay_rad, float dif_rad)
/* This functions implements the automatic computation of vertex group weights */
static void gpencil_add_verts_to_dgroups(
- const bContext *C,
- Object *ob, Object *ob_arm, const float ratio, const float decay)
+ const bContext *C, Object *ob, Object *ob_arm, const float ratio, const float decay)
{
bArmature *arm = ob_arm->data;
Bone **bonelist, *bone;
@@ -518,10 +517,7 @@ bool ED_gpencil_add_armature_weights(
}
/* add weights */
- gpencil_object_vgroup_calc_from_armature(
- C,
- ob, ob_arm, mode,
- DEFAULT_RATIO, DEFAULT_DECAY);
+ gpencil_object_vgroup_calc_from_armature(C, ob, ob_arm, mode, DEFAULT_RATIO, DEFAULT_DECAY);
return true;
}
@@ -594,9 +590,7 @@ static int gpencil_generate_weights_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- gpencil_object_vgroup_calc_from_armature(
- C,
- ob, ob_arm, mode, ratio, decay);
+ gpencil_object_vgroup_calc_from_armature(C, ob, ob_arm, mode, ratio, decay);
/* notifiers */
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
@@ -644,9 +638,9 @@ static const EnumPropertyItem *gpencil_armatures_enum_itemf(
void GPENCIL_OT_generate_weights(wmOperatorType *ot)
{
static const EnumPropertyItem mode_type[] = {
- {GP_ARMATURE_NAME, "NAME", 0, "Empty Groups", ""},
- {GP_ARMATURE_AUTO, "AUTO", 0, "Automatic Weights", ""},
- {0, NULL, 0, NULL, NULL}
+ {GP_ARMATURE_NAME, "NAME", 0, "Empty Groups", ""},
+ {GP_ARMATURE_AUTO, "AUTO", 0, "Automatic Weights", ""},
+ {0, NULL, 0, NULL, NULL}
};
PropertyRNA *prop;
@@ -667,9 +661,11 @@ void GPENCIL_OT_generate_weights(wmOperatorType *ot)
prop = RNA_def_enum(ot->srna, "armature", DummyRNA_DEFAULT_items, 0, "Armature", "Armature to use");
RNA_def_enum_funcs(prop, gpencil_armatures_enum_itemf);
- RNA_def_float(ot->srna, "ratio", DEFAULT_RATIO, 0.0f, 2.0f, "Ratio",
- "Ratio between bone length and influence radius", 0.001f, 1.0f);
+ RNA_def_float(
+ ot->srna, "ratio", DEFAULT_RATIO, 0.0f, 2.0f, "Ratio",
+ "Ratio between bone length and influence radius", 0.001f, 1.0f);
- RNA_def_float(ot->srna, "decay", DEFAULT_DECAY, 0.0f, 1.0f, "Decay",
- "Factor to reduce influence depending of distance to bone axis", 0.0f, 1.0f);
+ RNA_def_float(
+ ot->srna, "decay", DEFAULT_DECAY, 0.0f, 1.0f, "Decay",
+ "Factor to reduce influence depending of distance to bone axis", 0.0f, 1.0f);
}