Knob filmstrip via script
-
I am having a hard time to set a knob filmstrip by script:
Content.setPropertiesFromJSON(id, { "filmstripImage": "{PROJECT_FOLDER}knob.png" });
So I tried to add
onInit
:Engine.loadImageIntoPool("{PROJECT_FOLDER}knob.png");
with no success, the pool stays empty...
-
@ustk Obvious question but where is your knob.png file located?
-
@d-healey in the
Images
folder as usual, and it's working if I want to load an image for a paint routine for instance
Thinking it could be a bug... -
@ustk and shouldnt it be:
MyKnob.setPropertiesFromJSON("filmstripImage": "{PROJECT_FOLDER}knob.png");
--well maybe "id" is the id of the slider, but I'd try the simple method first.
in fact wouldnt it then be:
id.setPropertiesFromJSON("filmstripImage": "{PROJECT_FOLDER}knob.png");
-
@Lindon Thanks, but the method is good I think, I am always using it this way, but it is the first time I try a filmstrip
In fact, the JSON is updated, so it should work:
-
Oh that's not it, even the values
min -100
&max 36
are in the JSON, but the actual knob stays at a value of 0-1
The property editor shows all the good values so it is taken into account, but the knob itself doesn't refresh... Strange... -
MyKnob.setPropertiesFromJSON("filmstripImage": "{PROJECT_FOLDER}knob.png");
Both methods are correct according to the docs. This method is the most logical one to use if you already have a reference to the control stored in a variable.
-
@d-healey Ok so all the parameters are now working, I just forgot something obvious (the stepSize which was at 0...) But the image still doesn't load
-
Stupidity... Again...
@d-healey You were right asking for the folder, it was in the good one, but wrong project... -
@ustk we call that a PEBCAK
(problem exists between chair and keyboard)