Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_ui_common.c
| Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | PointerRNA *modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr) | ||||
| if (r_ob_ptr != NULL) { | if (r_ob_ptr != NULL) { | ||||
| RNA_pointer_create(ptr->owner_id, &RNA_Object, ptr->owner_id, r_ob_ptr); | RNA_pointer_create(ptr->owner_id, &RNA_Object, ptr->owner_id, r_ob_ptr); | ||||
| } | } | ||||
| uiBlock *block = uiLayoutGetBlock(panel->layout); | uiBlock *block = uiLayoutGetBlock(panel->layout); | ||||
| UI_block_lock_set(block, ID_IS_LINKED((Object *)ptr->owner_id), ERROR_LIBDATA_MESSAGE); | UI_block_lock_set(block, ID_IS_LINKED((Object *)ptr->owner_id), ERROR_LIBDATA_MESSAGE); | ||||
| uiLayoutSetContextPointer(panel->layout, "modifier", ptr); | UI_panel_context_pointer_set(panel, "modifier", ptr); | ||||
| return ptr; | return ptr; | ||||
| } | } | ||||
| /** | /** | ||||
| * Helper function for modifier layouts to draw vertex group settings. | * Helper function for modifier layouts to draw vertex group settings. | ||||
| */ | */ | ||||
| void modifier_vgroup_ui(uiLayout *layout, | void modifier_vgroup_ui(uiLayout *layout, | ||||
| ▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | static void modifier_panel_header(const bContext *C, Panel *panel) | ||||
| uiLayout *row, *sub, *name_row; | uiLayout *row, *sub, *name_row; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| /* Don't use #modifier_panel_get_property_pointers, we don't want to lock the header. */ | /* Don't use #modifier_panel_get_property_pointers, we don't want to lock the header. */ | ||||
| PointerRNA *ptr = UI_panel_custom_data_get(panel); | PointerRNA *ptr = UI_panel_custom_data_get(panel); | ||||
| ModifierData *md = (ModifierData *)ptr->data; | ModifierData *md = (ModifierData *)ptr->data; | ||||
| Object *ob = (Object *)ptr->owner_id; | Object *ob = (Object *)ptr->owner_id; | ||||
| uiLayoutSetContextPointer(panel->layout, "modifier", ptr); | UI_panel_context_pointer_set(panel, "modifier", ptr); | ||||
| const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type); | const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| int index = BLI_findindex(&ob->modifiers, md); | int index = BLI_findindex(&ob->modifiers, md); | ||||
| /* Modifier Icon. */ | /* Modifier Icon. */ | ||||
| sub = uiLayoutRow(layout, true); | sub = uiLayoutRow(layout, true); | ||||
| uiLayoutSetEmboss(sub, UI_EMBOSS_NONE); | uiLayoutSetEmboss(sub, UI_EMBOSS_NONE); | ||||
| ▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines | |||||