On 14/08/2018 at 01:39, xxxxxxxx wrote:
Hi Shallow_Red, first of all, welcome in the plugin cafe community!
As Andreas explain in his previous post you have to useGetState to define your behavior.
Here is a quick plugin example which toggles the icon if there is an object selected or not.
# Be sure to use a unique ID obtained from www.plugincafe.com
PLUGIN_ID = 1000001
class MyCommandDataPlugin(c4d.plugins.CommandData) :
def Execute(self, doc) :
def GetState(self, doc) :
# If we get an object selected we can click on the Icon
if doc.GetActiveObject() :
if __name__ == "__main__":
If you have any questions please, let me know