""" The ice coolers: four big machines on the floe that keep it frozen. The user, 2026-10-14: "In order to maintain the ice there are 4 big machines spread over on the Ice to cool it so ice never melts use the asset from fab library called "star citizen workflow to sketchfab - decals 6" without the human. (there will be robots in the facility inside or outside where they are maintaining the whole facility to run later on.)" add(b) brings the cooler's model into the open file (once) and stands the four coolers on the floe, in place drop_cloth() takes the camouflage cloth off the model already in the open file, in place (2026-10-21) The model is that Fab asset (Gerardo Justel), made ready by build/fab_cooler_prepare.py into source_fab/scifiEngine_005/scifiEngine_005_ice_cooler.blend: the stepped platform with its railings, the engine with its screen and the decals, as the author made them; without the two figures, the showroom floor, the engine's second copy and, since 2026-10-21, the camouflage cloth that lay over it (the user: "remove that camo textile on top of the generators"). It is 10.1 x 13.1 m on its platform, 6.6 m to the engine's top. It is appended once, into a collection of its own that the view layer leaves out (like the KIT collection), and the four coolers are instances of that collection: one copy of the geometry. They stand at the floe's quarter points (ice.COOLERS), each on its level pad (ice.FLAT), the engine's screen to the south, towards the station. Of the robots that maintain them (2026-10-21, build/furnish.py), one works at the south-west cooler's screen and one walks to it. """ import os import bpy import ice from bl_kit import ROOT, exclude_collection, get_collection SOURCE = os.path.join(ROOT, "source_fab", "scifiEngine_005", "scifiEngine_005_ice_cooler.blend") MODEL = "ICE COOLER | scifiEngine_005 (Fab: Star Citizen Workflow to Sketchfab - Decals 6)" COLLECTION = "12 ICE COOLERS" MODULE = "ice coolers (Fab: Star Citizen Workflow to Sketchfab - Decals 6)" NAMES = ("south-west", "south-east", "north-west", "north-east") # the order of ice.COOLERS def model(): """The cooler's collection in the open file: appended from SOURCE the first time.""" col = bpy.data.collections.get(MODEL) if col is None: with bpy.data.libraries.load(SOURCE, link=False, relative=True) as (src, dst): if MODEL not in src.collections: raise RuntimeError("no collection %r in %s" % (MODEL, SOURCE)) dst.collections = [MODEL] col = dst.collections[0] if col.name not in bpy.context.scene.collection.children: bpy.context.scene.collection.children.link(col) exclude_collection(col.name, True) return col def drop_cloth(report=print): """The cloth out of the cooler's model in the open file (all four coolers are instances of it).""" col = bpy.data.collections.get(MODEL) if col is None: report("[anchorage] coolers: no model in this file") return 0 gone = [] for ob in list(col.all_objects): if ob.type == "MESH" and (ob.name.startswith("COOLER Cloth") or any( m is not None and m.name.startswith("COOLER ClothCamo") for m in ob.data.materials)): mats = [m for m in ob.data.materials if m is not None] me = ob.data gone.append(ob.name) bpy.data.objects.remove(ob) if me.users == 0: bpy.data.meshes.remove(me) for m in mats: if m.users == 0: imgs = [n.image for n in (m.node_tree.nodes if m.node_tree else []) if getattr(n, "image", None)] bpy.data.materials.remove(m) for im in imgs: if im.users == 0: bpy.data.images.remove(im) report("[anchorage] coolers: cloth taken off the model (%s)" % (", ".join(gone) or "none was there")) return len(gone) def add(b=None, report=print): station = bpy.data.collections["ANCHORAGE STATION"] out = get_collection(COLLECTION, station) for ob in list(out.objects): bpy.data.objects.remove(ob) src = model() placed = [] for name, (x, y) in zip(NAMES, ice.COOLERS): ob = bpy.data.objects.new("ICE COOLER | %s" % name, None) ob.instance_type = "COLLECTION" ob.instance_collection = src ob.empty_display_type = "PLAIN_AXES" ob.empty_display_size = 3.0 ob.location = (x, y, ice.ICE_TOP) out.objects.link(ob) ob["anchorage_zone"] = COLLECTION ob["anchorage_module"] = MODULE ob["anchorage_surroundings"] = True ob["fab_prop"] = "scifiEngine_005" ob["fab_title"] = src.get("fab_title", "") ob["fab_seller"] = src.get("fab_seller", "") ob["fab_uid"] = src.get("fab_uid", "") ob["anchorage_note"] = "keeps the floe frozen (the lore of 2026-10-14); one of four" placed.append("%s (%.0f, %.0f)" % (name, x, y)) missing = sorted({im.name for im in bpy.data.images if im.name.startswith("COOLER ") and im.source == "FILE" and not os.path.isfile(bpy.path.abspath(im.filepath))}) report("[anchorage] coolers: %d stood on the floe: %s; the model is the collection '%s' (%d objects, kept out of " "the view layer)%s" % (len(placed), ", ".join(placed), src.name, len(src.all_objects), "" if not missing else "; MISSING TEXTURES: %s" % ", ".join(missing[:5]))) return out