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