Re: PS
Ya in the first dvd I only show you usage of existing methods (@15min) on the 
string object. But to teach writing methods would require teaching classes 
which was too advanced for that 1st intro video.
I get into writing classes and methods right away in the 2nd DVD.



On Oct 22, 2012, at 9:51 PM, san wrote:

> well in dagnodes I am passing in a shape node(working in maya 2013).... 
> though you have my answer already if we just pass camera name like front or 
> back...thanks s tonn.  
> 
> 
> PS: hey did u talked about __methods__ in the second DVD of python @ CMIvfx 
> coz in first u mentioned you will tlak about them but till the end I didnt 
> hear anything about those !!!
> 
> On Tuesday, October 23, 2012 1:03:48 AM UTC+5:30, Justin Israel wrote:
> Do you want to be able to get the imagePlane that is connected to a given 
> camera? 
> 
> camShape = cmds.listRelatives('camera1', type='camera', fullPath=True)[0]
> ip = cmds.listConnections(camShape, type="imagePlane")[0]
> cmds.getAttr(ip + ".imageName")
> 
> If not, what are you passing as "dagNode"?
> 
> 
> 
> On Fri, Oct 19, 2012 at 10:38 AM, San Luthra <[email protected]> wrote:
> I am trying to get the imageplane shape node  so that its attribute 
> "imageName" can be read
> 
> so far I have this 
>     def connectedImgPlanes(self,dagNode):
>         print "dagNode ",dagNode ,type(dagNode)
>         lc=""
>         try:
>             lc=cmds.listRelatives(cmds.listRelatives(dagNode)[0])[0]
>         except TypeError:
>                return ""
>         print lc
>         atribVal=cmds.getAttr(lc+".imageName")
>         return atribVal
> 
> the above code works fine if their is only one camera connected to imageplane 
> , but I have more than one camera's imageplane set i get error saying " More 
> than one object matches name: imagePlane1"
> 
> I guess this is not the right way to traverse and get the ip shape node 
> please help me out....
> 
> 
> -- 
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: 
> http://groups.google.com/group/python_inside_maya/subscribe
> 
> 
> -- 
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: 
> http://groups.google.com/group/python_inside_maya/subscribe

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to