chribis
chribis

Reputation: 277

Maya C++ Plugin MPxImagePlane

I'm creating an MPxImagePlane plugin in maya's c++ api. It works great in the legacy viewport, but I'm not finding any reference to extend it to viewport 2.0.

Example: http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__cpp_ref_custom_image_plane_2custom_image_plane_8cpp_example_html

How can I extend my current MPxImagePlane to draw in viewport 2.0? I assume it's something along the lines of using MPxDrawOverride, but i'd rather not completely re implement the image plane node.

Upvotes: 1

Views: 445

Answers (2)

chribis
chribis

Reputation: 277

In Maya 2018 and greater an override class has been added for viewport 2.0:

https://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=__cpp_ref_class_m_h_w_render_1_1_m_px_image_plane_override_html

Upvotes: 0

Jorge CR
Jorge CR

Reputation: 21

I am doing the same! right now, for some reason when ever that we create a new node is Locket To the Camera by default, go to Extra Attributes->Locked To Camera and disable it, then go to Image Plane Attributes -> Display and change between the two optios, "looking through camera" and "in all views", this will force your image to update, and finally you ll be able to see it on the viewport 2.0.

A bit tricky in my option

PD: I come from Unreal Engine c++ and to be honest Maya's API is one of the worse, super horrible structure and that graph node system it's a joke, it is like c++ converted to c jajajajajajaj I am trying to integrate an auto modeler tool with opencv for characters,and I decided use maya because it has some cool tools for modeling, but looking into the code I am changing my mind, seems like very bad structured, bad job from Autodesk

Upvotes: 1

Related Questions