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

    GetActiveToolData() and Modeling Axis

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 368 Views
    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 Offline
      Helper
      last edited by

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

      On 30/11/2012 at 23:36, xxxxxxxx wrote:

      I'm trying to access the Axis and Orientation of the Modeling Axis in R14 like this:

        
      import c4d   
        
      def main() :   
          tool = doc.GetActiveToolData()   
          print tool[c4d.MDATA_AXIS_MODE]   
          print tool[c4d.MDATA_AXIS_ROT]   
             
      if __name__=='__main__':   
          main()   
      

      This works correctly for the Live Selection tool but not for Move, Scale and Rotate.

      The COFFEE equivalent using GetActiveTool() works consistently for all of these tools.

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

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

        On 01/12/2012 at 02:34, xxxxxxxx wrote:

        hm,

        this works for me.

        import c4d
        from c4d import plugins as p
          
        def main() :
            bclist = []
            bclist.append(p.GetToolData(doc,c4d.ID_MODELING_AXIS))
            bclist.append(p.GetToolData(doc,c4d.ID_MODELING_MOVE))
            bclist.append(p.GetToolData(doc,c4d.ID_MODELING_SCALE))
            bclist.append(p.GetToolData(doc,c4d.ID_MODELING_ROTATE))
            for tool in bclist:
                for id in tool:
                    print id
            # ----------------------------------------------------------------------------
            tool = p.FindPlugin(c4d.ID_MODELING_AXIS)
            print tool[c4d.MDATA_AXIS_MODE]
        if __name__=='__main__':
            main()
        

        in the first part i was just looking what is in the bcs of the respective tools.

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

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

          On 01/12/2012 at 06:05, xxxxxxxx wrote:

          Thanks, this works nicely and does exactly what I need. I appreciate your time and effort.

          As a matter of interest, I looked at the ID found in each container. The only corresponding enum I could find is the MDATA_INTERACTIVE bool for DescriptionToolData plugins.

          I'm assuming that the GetActiveTool() behaviour is a bug, so I'll submit a report.

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