0

Problems with sourceGeometry function in rv

Hi,
I'm having a problems with the sourceGeometry function.

If I try to execute it from Python:
sourceGeometryCmd = rv.commands.sourceGeometry(sourceName)
I get an error:
#ERROR: 'module' object has no attribute 'sourceGeometry'

And if I try to execute the Mu code from Python I get nothing as result:
sourceGeometryCmd = rv.runtime.eval ("{commands.sourceGeometry(%s)}" % sourceName, ["commands"])

Do you have any idea what I'm doing wrong?

Thanks!

Manu.

댓글 1개

  • 0
    Avatar
    Jon Morley

    Hi Manu,

    You are correct. I do not see that in the commands module for python. I am not sure why that is, but I can say that sourceGeometry is an alias to imageGeometry and is only there for backwards compatibility in Mu. Therefore you should use imageGeometry.

    It is also important to point out that the method takes the name of a rendered source, and not the name of a source node. For example you may wish to try the following:

    for source in commands.sourcesRendered():
        print(source["name"],commands.imageGeometry(source["name"]))

    Please let me know if that helps.

    Thanks,
    Jon

댓글을 남기려면 로그인하세요.