Hello everyone,
I try to develop an extension, but I have a problem :
I would like to set a value in my gui extension, for example if I have this line in my .inx :
<param name="flatness" type="float" min="0.0" max="1000.0" _gui-text="Flatness">10.0</param>
I would like to change the default value by a value from my svg file. Read the xml tag and affect the value.
Is it possible ?
Thanks,
jerome
extension and param
Re: extension and param
No.jeromebdx wrote:I would like to change the default value by a value from my svg file. Read the xml tag and affect the value.
Is it possible ?
Re: extension and param
At least on Windows the last value set is maintained between program runs. (Where does Inkscape keep this information?) Anyway, the only time the default value shows up is if the parameter has never been set, once it is set you always see the last set value.
So I'm not sure that changing the default parameter value would do anything anyway.
Did you want to change the last value set?
So I'm not sure that changing the default parameter value would do anything anyway.
Did you want to change the last value set?
Re: extension and param
ok thranks for your response,
I want to read past value in extra xml tag and load it, but it's not really necessary.
I want to read past value in extra xml tag and load it, but it's not really necessary.
Re: extension and param
jeromebdx wrote:I would like to set a value in my gui extension, for example if I have this line in my .inx :
<param name="flatness" type="float" min="0.0" max="1000.0" _gui-text="Flatness">10.0</param>
I would like to change the default value by a value from my svg file. Read the xml tag and affect the value.
Stumbled onto a way to read the XML (see other thread here), which is:
object->getAttribute("flatness")
I believe there is a setAttribute equivalent (don't recall where this is, grep -R from the top of src for the header file which defines getattribute, the set variant was defined in the same place).
Is that what you are after?