Setting 'Axes Scale' parameter does not work



  • 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



  • 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
    


  • 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



  • 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()


Log in to reply