OpenSourcePhysics / tracker

Video analysis and modeling tool built on the Open Source Physics framework
GNU General Public License v3.0
206 stars 52 forks source link

Creating KeyFrame reads autoload_search_paths from osp.prefs, not tracker.prefs #11

Open jcalbert opened 7 years ago

jcalbert commented 7 years ago

When creating a KeyFrame, you eventually call: tracker.AutoTracker.createTemplateMatcher()

which in turn calls opensourcehysics.media.core.TemplateMatcher.<init>() that creates an FitBuilder object, which eventually checks osp.prefs for the key autoload_search_paths, rather than tracker.prefs, which also has a key autoload_search_paths used in the Data Builder Autoload dialogue.

This is problematic because there is to way to set this option from within the Tracker application. Moreover, the if autoload_search_paths is not present in osp.prefs, osp will use a set of default search paths which include the user's home directory (see also: https://github.com/OpenSourcePhysics/osp/issues/4).

dobrown commented 6 years ago

Hi J.  I will prevent the TemplateMatcher FitBuilder from autoloading fit functions since it never needs them anyway.

The FitBuilder used by DataTool, however, does need to autoload fit functions, and since DataTool is used by other OSP applications like EjsS (not just Tracker) then it is appropriate for it to read the |autoload_search_paths |from osp.prefs, not tracker.prefs.  While it is true that you cannot set the FitBuilder search paths from within Tracker, you can set them when you use FitBuilder in DataTool.

Doug

On 9/9/2017 3:39 PM, J. wrote:

When creating a KeyFrame, you eventually call: |tracker.AutoTracker.createTemplateMatcher()|

which in turn calls |opensourcehysics.media.core.TemplateMatcher.()| that creates an |FitBuilder| object, which eventually checks osp.prefs for the key |autoload_search_paths|, rather than tracker.prefs, which also has a key |autoload_search_paths| used in the Data Builder Autoload dialogue.

This is problematic because there is to way to set this option from within the Tracker application. Moreover, the if |autoload_search_paths| is not present in osp.prefs, osp will use a set of default search paths which include the user's home directory (see #).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenSourcePhysics/tracker/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6AlHrEaORLDdD-cYyjDgq4s_zLIGRpks5sgxOOgaJpZM4PSJAb.

-- You can't control the wind, but you can adjust your sails --Yiddish proverb