Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm looking for examples how to use this.backendApi.getProperties() / setProperties() methods. Anything on this?
- Ralf
Hi Erik,
how do I set a property of an extension property panel (eg. settings/items/myprop) from inside the paint function? Any example?
Best,
Ralf
Hi,
In your properties panel definition you have a value called 'ref' that points to the position in the properties structure where your property is stored. Use this either in your setProperties call or in applyPatch. Note that the ref notion is with dots, but applypatch wants it with slashes.
Erik
Thanks! So, is the path the just "/myRef" ? I cannot find any example.
Hi,
That depends on what you have written in 'ref' in the property panel definition.
In the definition:
myProperty : {
ref : "myProperty",
label : "My Property",
......
Would give you a path of "/myProperty" if you use applyPatch.
Erik
Thanks, this works for the actual value, how about "/myProperty/defaultValue" ? Seems not to work..
No, it only works for the values actually in the property object, and the default value is in the property panel.
Erik
Ok, thanks.