GetActiveToolData() and Modeling Axis

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.

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.

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.