Register a Scenesaverdata plugin
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/01/2011 at 09:47, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : PYTHON ;---------
Hi,
i'm writing a exportplugin for cinema 4d, but i have a problem.
My plugin starts correctly, but it isn't in the export menu.
I know it's a problem with name, when i register the plugin.
In the documentation i read:Note:
If you want to affect the order that your plugins are displayed in menus you can add #$n as a prefix to this name, where n is a number.But when i do it, it doesn't works. Maybe i don't understand it correctly. Where is the mistake?
Please Help!Code:
if __name__ == "__main__":
plugins.RegisterSceneSaverPlugin(PLUGIN_ID, "#$2C3DExporter", Exporter, 0, "Discription", "c3d", PLUGIN_RESOURCE)My another question is, is there an example for a scenesaverdata plugin?
I didn't find an example.Thanks.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/01/2011 at 10:04, xxxxxxxx wrote:
Have nobody an idea?
Here is the complete code:import c4d, sys;
from c4d import plugins, storage;PLUGIN_ID = 123456789;
PLUGIN_NAME = "C3DExporter";
PLUGIN_VERSION = "1.0";
PLUGIN_RESOURCE = plugins.GeResource();class C3DExporter(plugins.SceneSaverData) :
def Save(self, node, name, doc, filterflags) :
print("Export gestartet!");
return storage.FILEERROR_NONE;
if __name__ == "__main__":
plugins.RegisterSceneSaverPlugin(PLUGIN_ID, "#$2" + PLUGIN_NAME, C3DExporter, c4d.PLUGINFLAG_SCENEFILTER_DIALOGCONTROL, "Discription", "c3d", PLUGIN_RESOURCE)
print(PLUGIN_NAME + " Version " + PLUGIN_VERSION + " erfolgreich geladen!"); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/01/2011 at 12:50, xxxxxxxx wrote:
This is the prefix format that seems to work for me:
if __name__ == "__main__":
plugins.RegisterSceneSaverPlugin(PLUGIN_ID, "#$2.PLUGIN_NAME", C3DExporter, c4d.PLUGINFLAG_SCENEFILTER_DIALOGCONTROL, "Discription", "c3d", PLUGIN_RESOURCE)
print(PLUGIN_NAME + " Version " + PLUGIN_VERSION + " erfolgreich geladen!");Be aware of this though.
I currently have two custom python plugins on my system. And If I use this prefix thing on only one of them, and not both, It doesn't work.
This is the first time I've tried it and I haven't tested it that much. But you might find that you'll have to use a prefix on all the plugins in your menu in order for this to work properly.-ScottA