Convert MEL to python command

1.2k views Asked by At

I am looking for a way to convert this MEL line mel.eval('cameraMakeNode 2 "";') into Python.

I can't find anything in the documentation, is used to convert a camera to camera aim.

2

There are 2 answers

0
Guy Micciche On

I hope this finds you well. Here is the code that worked for me:

import pymel.core as pm
pm.mel.cameraMakeNode(3, "")
1
Brent Forrest On

Perhaps I'm missing something, but doesn't this work?:

    import maya.mel
    maya.mel.eval("cameraMakeNode 2 '';")