|
From: Josh D. <jos...@gm...> - 2022-01-13 00:00:04
|
Hi James, Property-path sounds fine to me, I wonder if there would be use in adding this to other things like animation or expressions also. > so you can’t specify a non-existing node path and then create the node later Not a problem for me. In nasal property dynamic is easy, so I don't really see that to be a bit limitation > the input will be marked as disabled Yes, good idea, I actually wondered about this > if there is a <value> defined, we will set it on the node pointed to by property-path There is no reason to set a property and a value, so that's probably just fallback behavior which is fine by me Thanks James! Kind Regards, -- Josh Davidson On Wed, Jan 12, 2022 at 4:27 PM James Turner <ja...@fl...> wrote: > > > On 11 Jan 2022, at 12:44, Benedikt Hallinger <be...@ha...> wrote: > > James, that would be nice, I already have some use case in mind :) > > > I’m hacking this up, some comments: > > - the config option is called ‘property-path’, if anyone has a strong > alternative idea, please let me know > > - if property-path is set, ‘property’ is ignored > > - changes to the property-path re-resolve the node at that time (via a > listener), and I don’t poll for the property appearing later, since > property lookups are slow and autopilot components run fast : so you can’t > specify a non-existing node path and then create the node later. I don’t > see a huge issue here but maybe it’s awkward for Nasal? But in that case an > fdm-initialized script can just write to the path property (triggering the > listener) and everything will work. > > - if the property path doesn’t resolve to a valid node, the input will be > marked as disabled: this feels sensible since it allows cascading inputs as > we do with conditions (conditions still work *as well*, it’s a logical AND) > : so it’s easy to fall back to a value if no valid property is found > > - if there is a <value> defined, we will set it on the node pointed to by > property-path : I’m not sure about this, but it’s also what inputs do when > they have a <value> *and* a <property> > > (if anyone has a reason not to do this, I can be easily convinced to > change it….) > > Going to add unit-tests for all this of course, before pushing. > > Kind regards, > James > > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > |