# Ep.6 — Smart Switch (Safe Replace Without Toggling Namespace)

https://youtu.be/gb1WCwMDe1I?si=oxGpoEYPqy6vy5o8

> **Summary**: Even artists who must work with Namespace **Off** due to studio pipeline constraints can perform **safe Replace operations in the background** — without catastrophic accidents like other character nodes being deleted — thanks to this auto-magic feature.

---

## 1. The Lethal Threat Lurking in Namespace Off Workflows

The ideal and safest Fast-Ref workflow is to always work with Namespace (`CharacterName:BoneName` structure) enabled.
However, many studios are forced to work with **Namespace completely Off and Unpack enabled** due to restrictions imposed by their company's specialised engine exporter scripts.

In this state, with multiple characters simultaneously in the scene, all bone names are identical because there are no Namespace prefixes (`root`, `L_Thigh`, etc.). What happens when you try to Replace just one character's rig?
- The Max engine mistakenly targets the same-named node of a different character.
- During the replacement, **the completely innocent neighbouring character nodes get entirely wiped out or tangled — a catastrophic merge disaster.**

For this reason, older versions simply blocked Replace entirely if any Namespace was off, forcing a warning dialog that stopped artists in their tracks.

---

## 2. Escaping Manual Hell: The Birth of "Smart Switch"

Every time a rig needed updating, artists had to manually:
1. Toggle `Namespace Activate On` (switch to safe packaging mode)
2. Execute `Replace` to swap the rig
3. Then revert back to `Namespace Off`, `Unpack On` when done

Repeating this three-step chore manually is not only extremely tedious — skipping a single step by mistake destroys the entire scene. **Smart Switch** automates this entire process.

---

## 3. What Smart Switch Does Behind the Scenes

Simply check the **Smart Switch** option in the Options menu, and the tool automatically performs the following miraculous sequence:

```
[Replace/Reload command detected] ──► 1. Temporarily enable Namespace On (safe virtual shell)
                                                   │
                                                   ▼
                                         2. Safely execute 1:1 mapped Replace (zero interference from other characters)
                                                   │
                                                   ▼
                                         3. After successful replace, perfectly restore original Namespace Off / Unpack On
                                                   │
                                                   ▼
[Artist checks work view] ──► Namespace still Off, layers perfectly restored to original state!
```

Thanks to this intelligent sequence, artists can freely update rigs while remaining focused entirely on their flat work view, with no need to care about what is happening in the background.

---

## 4. The Safety Prompt That Works Even If the Option Is Off

What happens if you forget to enable Smart Switch in the Options menu and try to Replace a dangerous Namespace Off slot?
Instead of unconditionally blocking the operation, a smart pop-up appears:
> **"The current settings are dangerous. Would you like to temporarily apply the Smart Switch helper for this one replacement?"**

Selecting **Yes** runs the Smart Switch safe background agent for that single replacement only, resolving it safely.

💡 **Performance note**: When Smart Switch activates, it internally runs an extra round of temporary namespace assignment, node isolation, and safe restoration sequences, so it **may take slightly longer than a naive direct replace.** This is a precision physics computation step to perfectly protect the scene's integrity — please allow 3–4 extra seconds and rest assured everything is safe.