Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_meshdeform.c
| Show First 20 Lines • Show All 567 Lines • ▼ Show 20 Lines | void BKE_modifier_mdef_compact_influences(ModifierData *md) | ||||
| mmd->bindoffsets[b] = totinfluence; | mmd->bindoffsets[b] = totinfluence; | ||||
| /* free */ | /* free */ | ||||
| MEM_freeN(mmd->bindweights); | MEM_freeN(mmd->bindweights); | ||||
| mmd->bindweights = NULL; | mmd->bindweights = NULL; | ||||
| } | } | ||||
| static void panel_draw(const bContext *C, Panel *panel) | static void panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *col; | uiLayout *col; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA ptr; | |||||
| PointerRNA ob_ptr; | PointerRNA ob_ptr; | ||||
| modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr); | PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr); | ||||
| bool is_bound = RNA_boolean_get(&ptr, "is_bound"); | bool is_bound = RNA_boolean_get(ptr, "is_bound"); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| col = uiLayoutColumn(layout, true); | col = uiLayoutColumn(layout, true); | ||||
| uiLayoutSetEnabled(col, !is_bound); | uiLayoutSetEnabled(col, !is_bound); | ||||
| uiItemR(col, &ptr, "object", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "object", 0, NULL, ICON_NONE); | ||||
| modifier_vgroup_ui(layout, &ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); | modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); | ||||
| col = uiLayoutColumn(layout, false); | col = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetEnabled(col, !is_bound); | uiLayoutSetEnabled(col, !is_bound); | ||||
| uiItemR(col, &ptr, "precision", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "precision", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, &ptr, "use_dynamic_bind", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "use_dynamic_bind", 0, NULL, ICON_NONE); | ||||
| uiItemO(layout, | uiItemO(layout, | ||||
| is_bound ? IFACE_("Unbind") : IFACE_("Bind"), | is_bound ? IFACE_("Unbind") : IFACE_("Bind"), | ||||
| ICON_NONE, | ICON_NONE, | ||||
| "OBJECT_OT_meshdeform_bind"); | "OBJECT_OT_meshdeform_bind"); | ||||
| modifier_panel_end(layout, &ptr); | modifier_panel_end(layout, ptr); | ||||
| } | } | ||||
| static void panelRegister(ARegionType *region_type) | static void panelRegister(ARegionType *region_type) | ||||
| { | { | ||||
| modifier_panel_register(region_type, eModifierType_MeshDeform, panel_draw); | modifier_panel_register(region_type, eModifierType_MeshDeform, panel_draw); | ||||
| } | } | ||||
| static void blendWrite(BlendWriter *writer, const ModifierData *md) | static void blendWrite(BlendWriter *writer, const ModifierData *md) | ||||
| ▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines | |||||