Hi,
The Attribute Manager, the Edit menu offers the option "Set as Default...". This will save the active object as default for this object type. So far, so good.
Creating a Cube, changing some attributes, and then setting it as default works fine. When I create a new Cube, it has my attribute settings.
However, it does not work in two cases:
-
With Field Objects that are added via a FieldList description in one of my plugin objects (or an object, for that matter)
I can change settings in that Field Object, and set it as default. But when I create a new Field from the FieldList description in my plugin object, the created Field does not have my settings. The settings are only applied when I create a Field of that type from Cinema's Create menu. -
With objects that are added to the document via plugin code
I do the normal stuff when adding an object to the scene via e.g. a command:
BaseObject *newObjectPtr = BaseObject::Alloc(id);
if (! newObjectPtr)
return false;
doc->StartUndo();
doc->InsertObject(newObjectPtr, op->GetUp(), op, true);
doc->SetActiveObject(newObjectPtr);
newObjectPtr->Message(MSG_UPDATE);
doc->AddUndo(UNDOTYPE::NEWOBJ, newObjectPtr);
doc->EndUndo();
EventAdd();
But it's the same as with the Field objects, after setting an object as default, and creating another one (using the above code), the settings are not applied. It only works when creating the new object via Cinema's Create menu or from the plugin's menu.
So here are the questions:
- How can I add the default object, that the user has set, to the document?
Where are those default objects stored, by the way, and how can we remove a default object?
Already solved: In the Content Browser under Presets/Defaults.
Thanks in advance, greetings,
Frank