0

Error when calling RV's commands.deleteNode method

I add media to an RV session using this method:

commands.addSourceVerbose(string; string[] fileNames, string tag = nil)

This method returns the source node name which I use later to delete the node like so:

commands.deleteNode(void; string nodeName)

However, when I call deleteNode in this way, I get the following error:

exception: "invalid property name nil.request.imageComponent"

I want the result of my deletion to be the same as if I had right clicked the source node in the interface's session manager and selected "Delete View". How do I achieve this?

Thanks!

3 条评论

  • Avatar
    Jon Morley 正式评论

    Hi Danny,

    Sorry I missed that before! The addSourceVerbose method returns you the RVFileSource node from the new RVSourceGroup node that was created. The nodes inside an RVSourceGroup cannot be individually deleted (nor added). Therefore the way to delete a source is to delete the top level group. Here are some more notes on the matter:

    http://tweaksoftware.com/static/documentation/rv/current/html/rv_reference.html#Chapter_2_Image_Processing_Graph_Source_Group_Node

    Please let me know if you have more questions.

    Thanks,
    Jon

  • 0
    Avatar
    Jon Morley

    Hi Danny,

    Can you please share more of your code or talk about the context from which you are calling it? Are you trying to delete the active view node? That error sounds like the node you are deleting is being evaluated at the time you are deleting it. Have you tried changing RV's view to another node before attempting the delete?

    Thanks,
    Jon

  • 0
    Avatar
    Danny Rerucha

    Hey Jon,

    Thanks for your quick response!

    So when I add media to the session using the addSourceVerbose command, the node name returned is something like "sourceGroup000000_source". Calling deleteNode and passing in "sourceGroup000000_source" for the node name gives the error I mentioned above. However, if I instead call deleteNode and pass in "sourceGroup000000" for the node name I get what I want.

    Could you please explain what's happening here?

    Thanks!

     

请先登录再写评论。