Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Where is MDATA_AXIS_LOCALMANIPULATION stored?

    SDK Help
    0
    3
    284
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 07/10/2013 at 03:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   15 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I'm trying to create a manager window that exposes the Per-Object Manipulation and Gimballing Rotation parameters of the manipulator tools (Move, Scale, Rotate).

      Using the standard GetToolData()/GetToolPluginData() -> SetParameter() methods does nothing. Parameters of other tools can be changed this way.

      It's like those values are stored somewhere else in the c4d file, but there's no mention of them in the documentation.

      Anybody knows where they go and how to access them?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 07/10/2013 at 05:01, xxxxxxxx wrote:

        Hi,

        It is possible to change these parameters filtering the tool plugins and searching for "Scale", "Rotate" etc.
        Here's some Python code that can be easily translated to C++:

        import c4d
        from c4d import plugins
          
          
        def main() :
            toolPlugins = plugins.FilterPluginList(c4d.PLUGINTYPE_TOOL, True)
            for plugin in toolPlugins:
                if plugin.GetName()=="Scale":
                    print plugin
                    print plugin[c4d.MDATA_AXIS_LOCALMANIPULATION]
                    plugin[c4d.MDATA_AXIS_LOCALMANIPULATION] = True
                    c4d.EventAdd()
                    
          
        if __name__=='__main__':
            main()
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 07/10/2013 at 06:36, xxxxxxxx wrote:

          Thanks Yannick.

          I used

          BasePlugin *plug = FindPlugin(ID_MODELING_ROTATE, PLUGINTYPE_TOOL);  
          

          to allocate the plugin in C++.
          Works like a charm.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post