Hi all,
Here’s one for documenting the process of combining floating licences.
When purchasing a floating licence, you’ll get a floating licence server to go along with it. This is the software “leasing” licences to anyone making a request.
On the artist side, Ragdoll would look to the RAGDOLL_FLOATING
environment variable for where to lease their licence.
import os
os.environ["RAGDOLL_FLOATING"] = "10.20.30.40:8001"
Where 10.20.30.40
is the IP of the machine running the licence server, and 8001
the port at which the licence server is listening.
One server can hold 1 product type at a time, either Ragdoll Unlimited or Ragdoll Complete. So in an environment where both licences need to be available, you’ll need 2 unique IP/Port combinations such that the RAGDOLL_FLOATING
environment variable can point to which of the two product types it should lease from.
import os
from maya import cmds
# Ragdoll Unlimited
os.environ["RAGDOLL_FLOATING"] = "1.0.0.0:8001"
cmds.loadPlugin("ragdoll")
# Ragdoll Complete
cmds.file(new=True, force=True)
cmds.unloadPlugin("ragdoll")
os.environ["RAGDOLL_FLOATING"] = "2.0.0.0:8001"
cmds.loadPlugin("ragdoll")
The RAGDOLL_FLOATING
environment variable is copied into the plug-in at the time of loading the plug-in.
Reference
Hotswap I - Shelf Buttons
From within a Maya context, here’s a few things you could do for artists to pick one over the other.
- Do not auto-load the plug-in on Maya startup
- Provide 2 shelf buttons
- Set
RAGDOLL_FLOATING
to Ragdoll Unlimited andcmds.loadPlugin
- Set
RAGDOLL_FLOATING
to Ragdoll Complete andcmds.loadPlugin
- Set
You’ll likely still want a default value for RAGDOLL_FLOATING
upon launching Maya, or system-wide, such that artists who open scenes with Ragdoll but do not intend on directly interacting with it are still able to see the physics geometry and simulation.
Hotswap II - Application Launcher
Another option, if you have an application launcher to set the context within which to launch Maya/Blender, is to have 2 options for how to launch the application; one for Ragdoll Complete and another for Ragdoll Standalone.
Conclusion
Hope it helps! If you run into any issues, or have suggestions for alternative ways in which to manage multiple licence servers, feel free to share here!