Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/image.cc
| Show First 20 Lines • Show All 5,422 Lines • ▼ Show 20 Lines | |||||
| RenderSlot *BKE_image_add_renderslot(Image *ima, const char *name) | RenderSlot *BKE_image_add_renderslot(Image *ima, const char *name) | ||||
| { | { | ||||
| RenderSlot *slot = MEM_cnew<RenderSlot>("Image new Render Slot"); | RenderSlot *slot = MEM_cnew<RenderSlot>("Image new Render Slot"); | ||||
| if (name && name[0]) { | if (name && name[0]) { | ||||
| BLI_strncpy(slot->name, name, sizeof(slot->name)); | BLI_strncpy(slot->name, name, sizeof(slot->name)); | ||||
| } | } | ||||
| else { | else { | ||||
| int n = BLI_listbase_count(&ima->renderslots) + 1; | int n = BLI_listbase_count(&ima->renderslots) + 1; | ||||
| BLI_snprintf(slot->name, sizeof(slot->name), "Slot %d", n); | BLI_snprintf(slot->name, sizeof(slot->name), DATA_("Slot %d"), n); | ||||
| } | } | ||||
| BLI_addtail(&ima->renderslots, slot); | BLI_addtail(&ima->renderslots, slot); | ||||
| return slot; | return slot; | ||||
| } | } | ||||
| bool BKE_image_remove_renderslot(Image *ima, ImageUser *iuser, int slot) | bool BKE_image_remove_renderslot(Image *ima, ImageUser *iuser, int slot) | ||||
| { | { | ||||
| if (slot == ima->last_render_slot) { | if (slot == ima->last_render_slot) { | ||||
| ▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines | |||||