Hello PluginCafe! :)
I have an object generator plugin which already has its own Base Container based on .res
file.
I need to create a new tab directly from .pyp
file which will contain attributes of another object. As I know, this task should be accomplished via GetDDescription
.
I tried 2 different methods to import BaseContainer of null object into my plugin.
this is the first attempt. But the problem is that it completely overrode the existing container.
def GetDDescription(self, node, description, flags):
if not description.LoadDescription(c4d.Onull): return False
return (True, flags | c4d.DESCFLAGS_DESC_LOADED)
Then I tried another method but seems like it does not work.
def GetDDescription(self, node, description, flags):
data = node.GetDataInstance()
nullData = c4d.BaseObject(node.GetType()).GetData()
data.MergeContainer(nullData)
if not description.LoadDescription(node.GetType()): return False
return (True, flags | c4d.DESCFLAGS_DESC_LOADED)