- Articulation_req* l=script_req_l_arr_[i];
-
- SCM alist = get_property ("scriptDefinitions");
- SCM art = scm_assoc (l->get_mus_property ("articulation-type"), alist);
-
- if (art == SCM_BOOL_F)
- {
- String a = ly_scm2string (l->get_mus_property ("articulation-type"));
- l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", a.ch_C()));
-
- continue;
- }
- // todo -> use result of articulation-to-scriptdef directly as basic prop list.
- Grob *p =new Item (get_property ("Script"));
- art = gh_cdr (art);
- p->set_grob_property ("molecule",
- gh_car (art));
-
- art = gh_cdr(art);
- bool follow_staff = gh_scm2bool (gh_car (art));
- art = gh_cdr(art);
- SCM relative_stem_dir = gh_car (art);
- art = gh_cdr(art);
-
- SCM force_dir = l->get_mus_property ("direction");
- if (isdir_b (force_dir) && !to_dir (force_dir))
- force_dir = gh_car (art);
-
- art = gh_cdr(art);
- SCM priority = gh_car (art);
-
-
- if (isdir_b (force_dir) && to_dir (force_dir))
- p->set_grob_property ("direction", force_dir);
- else if (to_dir (relative_stem_dir))
- p->set_grob_property ("side-relative-direction", relative_stem_dir);
-
-
-
- /*
- FIXME: should figure this out in relation with basic props!
- */
- SCM axisprop = get_property ("scriptHorizontal");
- bool xaxis = to_boolean (axisprop);
- Side_position_interface::set_axis (p, xaxis ? X_AXIS : Y_AXIS);
-
- if (!follow_staff && ! xaxis)
- p->set_grob_property ("staff-support", SCM_BOOL_T);
-
- if (!xaxis && follow_staff)
- p->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
-
-
- p->set_grob_property ("script-priority", priority);
-
- script_p_arr_.push (p);
-
- announce_grob (p, l);
+ SCM sym = scm_caar (s);
+ SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
+ if (!ly_is_procedure (type))
+ continue;
+
+ SCM val = scm_cdar (s);
+
+ if (sym == ly_symbol2scm ("script-priority"))
+ {
+ priority_found = true;
+ /* Make sure they're in order of user input by adding index i.
+ Don't use the direction in this priority. Smaller means closer
+ to the head. */
+ int prio = scm_to_int (val) + index;
+
+ val = scm_from_int (prio);
+ }
+
+ SCM preset = p->get_property_data (sym);
+ if (val == SCM_EOL
+ || scm_call_1 (type, preset) == SCM_BOOL_F)
+ p->set_property (sym, val);
+ }
+
+ if (!priority_found)
+ {
+ p->set_property ("script-priority",
+ scm_from_int (index));