MObject from 'objectId ' ? 2003-11-24 - By Martin Leguizamon
Back Hi there, Has anyone successfully got the shape object from the 'objectId' attribute ?
Seems that 'objectId' provides a pointer address to the object, so I tried this in my shader with no luck:
******
MStatus myShader::compute( const MPlug& plug, MDataBlock& block ) {
//...
MStatus status;
int objId = block.inputValue( aObjectId ).asLong(); MFnDependencyNode dNode( *( MObject* ) objId, &status );
status == MS::kSuccess ? MGlobal::displayInfo( dNode.name() ) : MGlobal::displayError( "Invalid Object!" );
//...
}
******
Is there any Alias developer ?
Thanks for any help, Martin
-- Martin Leguizamon PROVIDE3D Developments http://www.provide3d.com - contact@(protected) +54 (341) 447-3389
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|