<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I want to render the Model/object in window in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8928028#M7611</link>
    <description>Not a static image I need to render a model same as Panel&lt;BR /&gt;</description>
    <pubDate>Wed, 24 Jul 2019 13:53:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-24T13:53:35Z</dc:date>
    <item>
      <title>I want to render the Model/object in window</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8927535#M7609</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to render the object in window.&lt;/P&gt;&lt;P&gt;I've created a window in Maya using python scripting. And I've a model in Maya which is in '.obj' format.&lt;/P&gt;&lt;P&gt;Now I want to show the object in the window I created through scripting. How should I go about this?&lt;/P&gt;&lt;P&gt;I searching up &amp;amp; down on the Maya document where I'm unable to find a proper solution.&lt;/P&gt;&lt;P&gt;Please provide a solution. Even if the solution is bit complicated I'm ready to work with it.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 10:24:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8927535#M7609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-24T10:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: I want to render the Model/object in window</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8927970#M7610</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Do you want to show the image of the Obj or Like a panel window.....can you share your window script.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:34:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8927970#M7610</guid>
      <dc:creator>rajasekaransurjen</dc:creator>
      <dc:date>2019-07-24T13:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: I want to render the Model/object in window</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8928028#M7611</link>
      <description>Not a static image I need to render a model same as Panel&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8928028#M7611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-24T13:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: I want to render the Model/object in window</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8932258#M7612</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this.....&lt;/P&gt;&lt;P&gt;select the object and the script.&lt;/P&gt;&lt;PRE&gt;import maya.cmds as cmds
window = cmds.window(widthHeight=(500, 500))
cmds.paneLayout()
rsSelObj = cmds.ls( sl=True )
rsObjPos = cmds.xform(rsSelObj, q=True, ws=True, t=True)
rsCameraName = cmds.camera()
cmds.modelPanel(cam = rsCameraName[0])
rsCamShape = rsCameraName[1]
rsBBox = cmds.exactWorldBoundingBox(rsSelObj)
cmds.move( (rsBBox[0]/rsBBox[3]), (rsBBox[1]/rsBBox[4]), (rsBBox[2]/rsBBox[5]), rsCameraName, absolute=True )
cmds.viewPlace( rsCamShape, la=(rsObjPos[0], rsObjPos[1], rsObjPos[2]) )
cmds.showWindow( window )&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jul 2019 08:59:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8932258#M7612</guid>
      <dc:creator>rajasekaransurjen</dc:creator>
      <dc:date>2019-07-26T08:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: I want to render the Model/object in window</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8938309#M7613</link>
      <description>&lt;P&gt;Thanks for the replay.&lt;/P&gt;&lt;P&gt;Your code was useful. But not exactly what I was searching.&lt;/P&gt;&lt;P&gt;I have found an alternative but I'm not sure if this proper way if I have a desktop application as my end product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import maya.cmds as cmds

cmds.window()
cmds.file(Demo.obj, r=True)
cmds.render(replace=True)
if cmds.paneLayout('demoModel', exists=True):
    cmds.deleteUI('demoModel', panel=True)

cmds.paneLayout( 'demoModel', width=800, height=600 )
form = cmds.formLayout()
editor = cmds.modelEditor('demoModelEditor')
column = cmds.columnLayout('true')
cmds.formLayout( form, edit=True, attachForm=[(column, 'top', 0), (column, 'left', 0), (editor, 'top', 0), (editor, 'bottom', 0), (editor, 'right', 0)], attachNone=[(column, 'bottom'), (column, 'right')], attachControl=(editor, 'left', 0, column))

cmds.modelEditor( editor , edit=True, rom='myOverride', displayAppearance='smoothShaded', backfaceCulling=True)
cmds.showWindow()&lt;/PRE&gt;&lt;P&gt;If you can suggest me with any alternatives to cmds.file() it is much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:28:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/i-want-to-render-the-model-object-in-window/m-p/8938309#M7613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T12:28:11Z</dc:date>
    </item>
  </channel>
</rss>

