Python plugins.CommandData.GetSubContainer

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 07/01/2011 at 20:22, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Platform:      
Language(s) :       PYTHON  ;

---------
Hi,

I have been trying create a submenu, but the exemple in the documentation doesnt work :

  
import c4d   
  
PLUGIN_ID = 1019277   
  
class SubMenuTest(c4d.plugins.CommandData) :   
  
    def GetSubContainer(self, doc, submenu) :   
        bc = c4d.BaseContainer()   
        bc.SetString(1, "Submenu Test")   
        bc.SetString(1000, "First Entry")   
        submenu.InsData(0,bc)   
        return True   
  
if __name__ == "__main__":   
    c4d.plugins.RegisterCommandPlugin(PLUGIN_ID, "Test de sous menu", 0, None, '-', SubMenuTest())

What's wrong ?

Thanks and cheers.

olid

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/01/2011 at 03:11, xxxxxxxx wrote:

I can confirm this. I will forward this to the developers.

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/01/2011 at 03:30, xxxxxxxx wrote:

Submenus are currently not supported in Python. The documentation will change accordingly.

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/01/2011 at 00:21, xxxxxxxx wrote:

OK,
thx Matthias

On 06/01/2014 at 18:09, xxxxxxxx wrote:

Is this still the case? I can't get submenus to work, but The 15.057 documentation definitely mentions them: http://www.maxonexchange.de/sdk/CINEMA4DPYTHONSDK/help/modules/c4d.plugins/BaseData/CommandData/index.html#c4d.plugins.CommandData

On 07/01/2014 at 07:21, xxxxxxxx wrote:

GetSubContainer() is called when the Plugin Icon is docked in the interface of Cinema 4D and it is
clicked from there. The same limitation applies to GetSubContainer() of C++ plugins.

Best,
-Niklas