yes, your example return the same here... but I can call this on the file
class:print f.getExpandName()
f.getExpandName()
# Result: //Isilon/alpha/data/dev/Maya_dev/projects/Python_scripting/file1
#

which is the path of the scene + the name of the node
or even this method:
f.getUiConfiguration()
# Result: 1 #

I don't see why the file node would have a getUiConfiguration() method.

Looking at the documentation, in the
pymel.core.nodetypes<file://isilon/alpha/data/shared_maya_folder/shared_scripts/AVpythonScriptsDEV/pymel/docs/toc-pymel.core.nodetypes-module.html>
ssection...
look at the file ... it say:
File<file://isilon/alpha/data/shared_maya_folder/shared_scripts/AVpythonScriptsDEV/pymel/docs/pymel.core.nodetypes.File-class.html>
class counterpart of mel function file

This is why I get file command (like the mel command file) instead of having
method relatives to a file node, like getImage(), setDefaultColor(), etc.
Instead of method that let me get the attributes of a file node I get
command to query the scene opened...

I hope my explanation makes more sense ...



On Wed, Apr 29, 2009 at 4:48 PM, Chad Dombrova <[email protected]> wrote:

> "the nodetype file is not a file node class ... it is the mel file command"
>
> i'm not sure i follow.  are you getting the function maya.cmds.file
> somewhere instead of the File class?
>
> just did a quick test on my end and i'm getting what i expect:
>
> from pymel import *
> newFile(f=1)
> # Result: untitled #
> shadingNode( 'file', asTexture=1)
> # Result: file1 #
> ls(type='file')
> # Result: [File(u'file1'), File(u'file2')] #
> f = ls(type='file')[0]
> f.type()
> # Result: file #
> f.listConnections()
> # Result: [DefaultTextureList(u'defaultTextureList1')] #
> repr(f)
> # Result: File(u'file1') #
>
> -chad
>
>
>
> On Wed, Apr 29, 2009 at 11:42 AM, sberger <[email protected]>wrote:
>
>>
>> Hi, I am listing all the file nodes with pymel
>>
>> import pymel as pm
>> pm.ls(type='file')
>>
>> the result is the list of all file nodes in my scene ... the pymel
>> object returned is the nodeType file... but the nodetype file is not a
>> file node class ... it is the mel file command ... the one used to
>> query file info...
>>
>> this is not really useful :)
>>
>>
>>
>
> >
>


-- 
They say, "Evil prevails when good men fail to act." What they ought to say
is, "Evil prevails."
Nicolas Cage as Yuri Orlov in Lord of War.

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to