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
    • Recent
    • Tags
    • Users
    • Login

    Setting 'Axes Scale' parameter does not work

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 443 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

      On 26/02/2016 at 01:25, xxxxxxxx wrote:

      Hello!
      Quick question:
      Why does setting the parameter
      c4d.BASEDRAW_DATA_ROTATION_CIRCLE = 123
      have no effect?

      That's the param holding the Axis' size. (VP menu > Options > Configure All, Attribute Editor Tab View > Axes Scale

      Thanks!!
      Best regards
      Eugen

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

        On 29/02/2016 at 07:52, xxxxxxxx wrote:

        Hi,

        do you have that line in your code?

        c4d.BASEDRAW_DATA_ROTATION_CIRCLE = 123
        

        then it's no wonder it has no effect, because you are writing over the ID, which you should actually use to address the BaseContainer.
        You will rather want to use something like this:

        bd[c4d.BASEDRAW_DATA_ROTATION_CIRCLE] = 123
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 01/03/2016 at 04:26, xxxxxxxx wrote:

          Oops, I see!
          Yes, I'm a freshie when it comes to C4D scripting...
          Thanks, Andreas!!
          Best regards
          Eugen

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

            On 01/03/2016 at 05:50, xxxxxxxx wrote:

            Here's the script I needed this for: 'ToggleAxis'
            Purpose:
            Since C4D does not display some other kind of axis icon when in axis mode, it's very easy to overlook that you ARE in axis mode! You have no idea how often I stumbled across this...
            I put this script on some keyshort, and always use it to toggle axis mode. It also turns on snapping, and reduces the SIZE of the axis (and back).

            import c4d
            from c4d import gui
            from c4d.modules import snap

            def main() :
                bd = doc.GetActiveBaseDraw()

            if(not doc[c4d.DOCUMENT_AXIS]) :
                    snap.EnableSnap(True, doc)
                    c4d.CallCommand(c4d.ID_MODELING_MOVE) # Enable Move Tool
                    bd[c4d.BASEDRAW_DATA_OBJECTAXIS_SCALE] = 0.2    #bd: BaseDraw
                    doc[c4d.DOCUMENT_AXIS] = True
                else:
                    bd[c4d.BASEDRAW_DATA_OBJECTAXIS_SCALE] = 0.5
                    doc[c4d.DOCUMENT_AXIS] = False
                    
                c4d.EventAdd()

            if __name__=='__main__':
                main()

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