Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
| Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | PointerRNA *gpencil_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_clear(block); | UI_block_lock_clear(block); | ||||
| 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; | ||||
| } | } | ||||
| static void gpencil_modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v) | static void gpencil_modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v) | ||||
| { | { | ||||
| PointerRNA op_ptr; | PointerRNA op_ptr; | ||||
| uiLayout *row; | uiLayout *row; | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
| static void gpencil_modifier_panel_header(const bContext *UNUSED(C), Panel *panel) | static void gpencil_modifier_panel_header(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *row, *sub; | uiLayout *row, *sub; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA *ptr = UI_panel_custom_data_get(panel); | PointerRNA *ptr = UI_panel_custom_data_get(panel); | ||||
| GpencilModifierData *md = (GpencilModifierData *)ptr->data; | GpencilModifierData *md = (GpencilModifierData *)ptr->data; | ||||
| uiLayoutSetContextPointer(panel->layout, "modifier", ptr); | UI_panel_context_pointer_set(panel, "modifier", ptr); | ||||
| const GpencilModifierTypeInfo *mti = BKE_gpencil_modifier_get_info(md->type); | const GpencilModifierTypeInfo *mti = BKE_gpencil_modifier_get_info(md->type); | ||||
| bool narrow_panel = (panel->sizex < UI_UNIT_X * 9 && panel->sizex != 0); | bool narrow_panel = (panel->sizex < UI_UNIT_X * 9 && panel->sizex != 0); | ||||
| /* Modifier Icon. */ | /* Modifier Icon. */ | ||||
| row = uiLayoutRow(layout, false); | row = uiLayoutRow(layout, false); | ||||
| if (mti->isDisabled && mti->isDisabled(md, 0)) { | if (mti->isDisabled && mti->isDisabled(md, 0)) { | ||||
| uiLayoutSetRedAlert(row, true); | uiLayoutSetRedAlert(row, true); | ||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | |||||