On 05/02/2016 08:33 PM, Marius Kintel wrote:
We need a way of making the values from the customizer available
for rendering. I’m not sure how teepee solved that in his prototype
branch...
It's injecting the values into the top level assignments.
https://github.com/openscad/openscad/blob/model-meta-data3/src/mainwin.cc#L1723
https://github.com/openscad/openscad/blob/model-meta-data3/src/ParameterWidget.cc#L97
This works, but also interferes with the value coming from the
script. Referencing things to make the value available for evaluation
in addition to the value coming from the parser might be useful.
ciao,
Torsten.
On May 3, 2016 3:00 AM, "Torsten Paul" Torsten.Paul@gmx.de wrote:
This works, but also interferes with the value coming from the
script. Referencing things to make the value available for evaluation
in addition to the value coming from the parser might be useful.
Hey, the problem I mentioned in my proposal ( point number 5 in description
section ) related to current code in model-meta-data3 branch.
Is it due to this only?
https://docs.google.com/document/d/1hXXQI0PEPQnu6e-x0huNQsMt_3Ocn8aBtpwJ_0C-uiM/edit#
And I am unable to understand what you are suggesting in second line
related to "Referencing things ....."
--
Amarjeet Singh
https://amarjeetkapoor1.wordpress.com
https://github.com/amarjeetkapoor1
https://bitbucket.org/amarjeetkapoor
" There are things and there are pointers to the things. "
On 05/03/2016 02:17 PM, Amarjeet Kapoor wrote:
On May 3, 2016 3:00 AM, "Torsten Paul" Torsten.Paul@gmx.de wrote:
This works, but also interferes with the value coming from the
script. Referencing things to make the value available for evaluation
in addition to the value coming from the parser might be useful.
Hey, the problem I mentioned in my proposal ( point number 5 in
description section ) related to current code in model-meta-data3
branch. Is it due to this only?
I guess that's related, yes. We certainly don't want to always
override the GUI widgets with the values from the source code as
that would cause all controls to reset on every F5. Maybe some
kind of "reset to default"?
And I am unable to understand what you are suggesting in second
line related to "Referencing things ....."
The existing code iterates over all the assignments and just
forces the GUI values into that node in the AST tree. One other
option would be to hold the reference to the node from the
GUI widget so the value could be pushed to the node directly
if needed (instead of the search loop by variable name).
But that's already very deep in the implementation details :-)
We probably want to get the overall picture clear first.
ciao,
Torsten.