Hello
I'm trying to create a new collection to categorize my Variants in Variant Manager, using Python script, but the action is not going through, although the script shows no errors and seems to function properly. Here are two different versions of the script that I tried:
version 1:
from Variants import Variants
from Scene import Objects
model = ACTIVE_MODEL
new_collection = Variants.createCollection("TEST", [35,215,181], model)
if new_collection is not None:
print("Collection Z_TEST was created successfully.")
else:
print("Failed to create collection TEST.")
version 2:
from Variants import Variants
import DGScene
from Scene import Objects
model = DGScene.sceneAccess().activeModel()
new_collection = Variants.createCollection("TEST", 35,215,181], model)
if new_collection is not None:
print("Collection TEST was created successfully.")
else:
print("Failed to create collection TEST.")
In both cases, the message for success is printed, but the Collection does not appear in the Variant Manager. Unfortunately, the documentation has a very limited explanation on this.
Thank you!
