hi.. I´m making my first custom node... and after read maya api docs, I
have some questions...
... how to get rendering info in my compute function.. like.. current
rendering camera position and/or current sampling point position in
camera space.?
... mag (vector lenght) mel function exists i
Attributes just need to have specific naming to pull from the sampler.
Special names include:
inColor
normalCamera
tangentUCamera
etc.
Once you have those attributes, they should just be filled with the relevant
data.
The api has the MVector class which contains all the vector operations.
On Mon
I don't have a way to test this right now but I was wondering if you
could get the MObject of the string data from the dataBlock and pass
it to MFnStringData and call MFnStringData.string()?
Matt
On Sat, Feb 21, 2009 at 7:19 PM, Dean Edmonds wrote:
>
> On Sat, Feb 21, 2009 at 15:20, John Riddle
I'm sorry but I'm still very new to the API and can't seem to get the syntax
right. I'm doing:
dataHandle = dataBlock.inputValue( readBandedImageNode.filename )
filenameStr = dataHandle.asString()
and getting filenameStr as an MString object. Dean mentioned above I am
going to need use MPlug to g
Example usage of MDGContext:
import maya.OpenMaya as om
atTime10 = om.MDGContext(om.MTime(10))
import maya.OpenMaya as om
atTime10 = om.MDGContext(om.MTime(10))
selList = om.MSelectionList()
selList.add("pCube1.translateX")
plug = om.MPlug()
selList.getPlug(0, plug)
print "Value now: ", plug.asD
wow. wonderful.. but where I find the list of automatic filled
attributes?
thank you very much chad
Wilsimar
Goiânia - Goiás - Brazil
On Feb 23, 2:13 pm, Chad Vernon wrote:
> Attributes just need to have specific naming to pull from the sampler.
> Special names include:
> inColor
> normalCame
Let me know if these are wrong I am not able to test this wight now.
# Somthing like this for MPlug I think
node = self.thisMObject()
plug = api.MPlug(node, readBandedImageNode.filename)
strData = plug.asString()
# I am wondering if this might work
dataHandle = dataBlock.inputValue( readBandedI
Hello,
I'm working on a project to create a tool/plug-in that will create and
simulate an Asteroid impacting a planetary surface. Part of the effect
will be the displacement of the surface the Astral Body impacts with.
What I intend to do is to select only the required section of geometry
that w
Thanks Paul, that is a huge help, I appreciate it
cheers
-todd
On Mon, Feb 23, 2009 at 10:08 AM, barnabas79 wrote:
>
> Example usage of MDGContext:
>
> import maya.OpenMaya as om
> atTime10 = om.MDGContext(om.MTime(10))
> import maya.OpenMaya as om
> atTime10 = om.MDGContext(om.MTime(10))
>
> s
The MPlug method that you posted is what works for me. The MFnStringData bit
still throws an error.
NotImplementedError: No matching function for overloaded 'new_MFnStringData'
//
But hey, I got a string I can work with! Haha
Thanks a lot for your help Matt and Dean.
On Mon, Feb 23, 2009 at 10:
would you mind posting what this returns?
dataHandle = dataBlock.inputValue( readBandedImageNode.filename )
data = dataHandle.data()
print data, type(data)
I am wondering what instance is returned from a '.data()' call for a string.
Matt
On Mon, Feb 23, 2009 at 11:04 AM, John Riddle
Here ya go:
On Mon, Feb 23, 2009 at 11:19 AM, Matthew Chapman wrote:
> would you mind posting what this returns?
>
> dataHandle = dataBlock.inputValue( readBandedImageNode.filename )
> data = dataHandle.data()
> print data, type(data)
>
> I am wondering what instance is returned f
I guess I will have to play with it sometime cause I think there is a way to
get around the bug using MFnStringData. This way you don't have to use MPlug
and make queries directly into the DG.
Matt
On Mon, Feb 23, 2009 at 11:22 AM, John Riddle wrote:
> Here ya go:
> _a8d6b90f_p_MObject>
>
>
>
Just dropped RC4 which should fix this problem.
Does anyone have any feedback regarding the treatment of non-existent
objects in the new PyMEL? love it, hate it? check out the docs under
non-backward compatible changes.
-chad
>
> Everytime I import pymel in Maya 8.5sp1, I have the foll
I'm trying to execute this bit of code I found in one of the devkit
examples. (customImagePlane.py)
image = OpenMaya.MImage()
image.readFromFile(filenameStr)
scriptUtil = OpenMaya.MScriptUtil()
widthPtr = scriptUtil.asUintPtr()
heightPtr = scriptUtil.asUintPtr()
scriptUtil.setUint( widthPtr, 0 )
Maybe the MScriptUtil class can help you here? It's a python wrapper
for pointers/references.
On Mon, Feb 23, 2009 at 4:06 PM, jbrav...@gmail.com wrote:
>
> I'm trying to execute this bit of code I found in one of the devkit
> examples. (customImagePlane.py)
>
> image = OpenMaya.MImage()
> image
Well that was a healthy rant only to discover that I should be using
getUcharArrayItem instead of getCharArrayItem... nice work Riddle... =P
On Mon, Feb 23, 2009 at 4:09 PM, Ravi Jagannadhan wrote:
>
> Maybe the MScriptUtil class can help you here? It's a python wrapper
> for pointers/references
If I were to create a custom node and I wanted it to start with an
expression connected to an attribute by default, what is the best way
to go about this? Should it be done in the initializer? Somewhere in
the beginning of the node class? I have a frame attribute that I want
to start with the expr
18 matches
Mail list logo