Setting custom properties

Hello there.

I've read in the docs that one can set custom properties, but it's not working the way I expected. It does work if I pass in an existing node and predefined component/property. For example I can set "rv.matte.show" to "0", but I cannot set "rv.matte.myProperty".

Is there a way I can create custom nodes with custom components and custom properties? I've done this writing RV files to disk directly, but it does not work when I do it with commands.newProperty/setXXXProperty functions.

Thanks in advance :)


1 comment

  • 0
    Jon Morley

    Hi Chema,

    You can certainly set your own custom properties. The trick is that you need to create them first with commands.newProperty. I would read more about that function in the Commands API Browser found under the Help menu. Once the property exists (like the default properties you were modifying) you can then change/set the value.

    I would recommend using a component for your custom properties that is unique for your needs as opposed to adding properties to existing components. You could use something like:

    commands.newProperty("rv.chema.myProperty", commands.IntType, 1)

    Hope that helps. Please let me know if you have any follow up questions.


Please sign in to leave a comment.