Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_meshsequencecache.c
| Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | ||||
| if (mcmd->cache_file != NULL) { | if (mcmd->cache_file != NULL) { | ||||
| DEG_add_object_cache_relation( | DEG_add_object_cache_relation( | ||||
| ctx->node, mcmd->cache_file, DEG_OB_COMP_CACHE, "Mesh Cache File"); | ctx->node, mcmd->cache_file, DEG_OB_COMP_CACHE, "Mesh Cache File"); | ||||
| } | } | ||||
| } | } | ||||
| static void panel_draw(const bContext *C, Panel *panel) | static void panel_draw(const bContext *C, Panel *panel) | ||||
| { | { | ||||
| uiLayout *box; | |||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| PointerRNA ob_ptr; | PointerRNA ob_ptr; | ||||
| modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr); | modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr); | ||||
| PointerRNA cache_file_ptr = RNA_pointer_get(&ptr, "cache_file"); | PointerRNA cache_file_ptr = RNA_pointer_get(&ptr, "cache_file"); | ||||
| bool has_cache_file = !RNA_pointer_is_null(&cache_file_ptr); | bool has_cache_file = !RNA_pointer_is_null(&cache_file_ptr); | ||||
| box = uiLayoutBox(layout); | |||||
| uiTemplateCacheFile(box, C, &ptr, "cache_file"); | |||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiTemplateCacheFile(layout, C, &ptr, "cache_file"); | |||||
| if (has_cache_file) { | if (has_cache_file) { | ||||
| uiItemPointerR(layout, &ptr, "object_path", &cache_file_ptr, "object_paths", NULL, ICON_NONE); | uiItemPointerR(layout, &ptr, "object_path", &cache_file_ptr, "object_paths", NULL, ICON_NONE); | ||||
| } | } | ||||
| if (RNA_enum_get(&ob_ptr, "type") == OB_MESH) { | if (RNA_enum_get(&ob_ptr, "type") == OB_MESH) { | ||||
| uiItemR(layout, &ptr, "read_data", UI_ITEM_R_EXPAND, NULL, ICON_NONE); | uiItemR(layout, &ptr, "read_data", UI_ITEM_R_EXPAND, NULL, ICON_NONE); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||