user19769290
user19769290

Reputation: 1

Convert MEL to python command

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.

Upvotes: 0

Views: 1699

Answers (2)

Brent Forrest
Brent Forrest

Reputation: 21

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

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

Upvotes: 0

Guy Micciche
Guy Micciche

Reputation: 408

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

import pymel.core as pm
pm.mel.cameraMakeNode(3, "")

Upvotes: 0

Related Questions