THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/07/2011 at 19:52, xxxxxxxx wrote:
I cycle through the names of the plugins in order to retrieve the container of the Optimize command. The documentation says, FilterPluginList() returns a list of BasePlugin(). But I get a BaseList2D ...
tools = plugins.FilterPluginList(c4d.PLUGINTYPE_COMMAND, True)
tool = None
for t in tools:
if t.GetName().find("Optimize") != -1:
Another way I tried is directly getting the tool-data container, which failed too (returns None) :
td = plugins.GetToolData(doc,c4d.MCOMMAND_OPTIMIZE)
So ... whats up here ?
On 11/07/2011 at 05:09, xxxxxxxx wrote:
I don't know whats the problem with the first code, couldn't test it.
[//edit] You're right, I can't imagine about what is wrong there. Maybe it's a bug.
But for the second: Optimize isn't a ToolData plugin, it's a command.
On 11/07/2011 at 10:56, xxxxxxxx wrote:
If you don't get an answer to this tool container stuff here.
I suggest getting in touch with Matthias in the C++ forum. And ask him if it's even possible to get at the original container for that command.
You might be trying to access something that's not accessible.
I could have sworn I saw someone ask this same kind of question there a long time ago. For either Coffee or C++. And he said it wasn't possible. But he's the guy who would know the answer.