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:
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index 1608d7a2d4c..83c65e2d3a2 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -359,69 +359,67 @@ static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk,
foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
}
-static void panel_draw(const bContext *C, Panel *panel)
+static void panel_draw(const bContext *UNUSED(C), Panel *panel)
{
uiLayout *sub, *row, *col;
uiLayout *layout = panel->layout;
- PointerRNA ptr;
PointerRNA ob_ptr;
- gpencil_modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr);
+ PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, &ob_ptr);
- PointerRNA hook_object_ptr = RNA_pointer_get(&ptr, "object");
- bool has_vertex_group = RNA_string_length(&ptr, "vertex_group") != 0;
+ PointerRNA hook_object_ptr = RNA_pointer_get(ptr, "object");
+ bool has_vertex_group = RNA_string_length(ptr, "vertex_group") != 0;
uiLayoutSetPropSep(layout, true);
col = uiLayoutColumn(layout, false);
- uiItemR(col, &ptr, "object", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "object", 0, NULL, ICON_NONE);
if (!RNA_pointer_is_null(&hook_object_ptr) &&
RNA_enum_get(&hook_object_ptr, "type") == OB_ARMATURE) {
PointerRNA hook_object_data_ptr = RNA_pointer_get(&hook_object_ptr, "data");
uiItemPointerR(
- col, &ptr, "subtarget", &hook_object_data_ptr, "bones", IFACE_("Bone"), ICON_NONE);
+ col, ptr, "subtarget", &hook_object_data_ptr, "bones", IFACE_("Bone"), ICON_NONE);
}
row = uiLayoutRow(layout, true);
- uiItemPointerR(row, &ptr, "vertex_group", &ob_ptr, "vertex_groups", NULL, ICON_NONE);
+ uiItemPointerR(row, ptr, "vertex_group", &ob_ptr, "vertex_groups", NULL, ICON_NONE);
sub = uiLayoutRow(row, true);
uiLayoutSetActive(sub, has_vertex_group);
uiLayoutSetPropSep(sub, false);
- uiItemR(sub, &ptr, "invert_vertex", 0, "", ICON_ARROW_LEFTRIGHT);
+ uiItemR(sub, ptr, "invert_vertex", 0, "", ICON_ARROW_LEFTRIGHT);
- uiItemR(layout, &ptr, "strength", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "strength", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- gpencil_modifier_panel_end(layout, &ptr);
+ gpencil_modifier_panel_end(layout, ptr);
}
-static void falloff_panel_draw(const bContext *C, Panel *panel)
+static void falloff_panel_draw(const bContext *UNUSED(C), Panel *panel)
{
uiLayout *row;
uiLayout *layout = panel->layout;
- PointerRNA ptr;
- gpencil_modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
+ PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL);
- bool use_falloff = RNA_enum_get(&ptr, "falloff_type") != eWarp_Falloff_None;
+ bool use_falloff = RNA_enum_get(ptr, "falloff_type") != eWarp_Falloff_None;
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "falloff_type", 0, IFACE_("Type"), ICON_NONE);
+ uiItemR(layout, ptr, "falloff_type", 0, IFACE_("Type"), ICON_NONE);
row = uiLayoutRow(layout, false);
uiLayoutSetActive(row, use_falloff);
- uiItemR(row, &ptr, "falloff_radius", 0, NULL, ICON_NONE);
+ uiItemR(row, ptr, "falloff_radius", 0, NULL, ICON_NONE);
- uiItemR(layout, &ptr, "use_falloff_uniform", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "use_falloff_uniform", 0, NULL, ICON_NONE);
- if (RNA_enum_get(&ptr, "falloff_type") == eWarp_Falloff_Curve) {
- uiTemplateCurveMapping(layout, &ptr, "falloff_curve", 0, false, false, false, false);
+ if (RNA_enum_get(ptr, "falloff_type") == eWarp_Falloff_Curve) {
+ uiTemplateCurveMapping(layout, ptr, "falloff_curve", 0, false, false, false, false);
}
}
-static void mask_panel_draw(const bContext *C, Panel *panel)
+static void mask_panel_draw(const bContext *UNUSED(C), Panel *panel)
{
- gpencil_modifier_masking_panel_draw(C, panel, true, false);
+ gpencil_modifier_masking_panel_draw(panel, true, false);
}
static void panelRegister(ARegionType *region_type)