- Articulation_req* l=script_req_l_arr_[i];
-
- SCM list = scm_assoc (ly_str02scm (l->articulation_str_.ch_C ()),
- scm_eval (ly_symbol2scm ("script-alist")));
-
- if (list == SCM_BOOL_F)
- {
- l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'",
- l->articulation_str_.ch_C ()));
- continue;
- }
- // todo -> use result of articulation-to-scriptdef directly as basic prop list.
- Score_element *p =new Item (get_property ("basicScriptProperties"));
- Script::set_interface (p);
-
- p->add_offset_callback (Side_position::centered_on_parent, X_AXIS);
-
- list = gh_cdr (list);
- p->set_elt_property ("molecule",
- gh_car (list));
-
- list = gh_cdr(list);
- bool follow_staff = gh_scm2bool (gh_car (list));
- list = gh_cdr(list);
- int relative_stem_dir = gh_scm2int (gh_car (list));
- list = gh_cdr(list);
- int force_dir =gh_scm2int (gh_car (list));
- list = gh_cdr(list);
- SCM priority = gh_car (list);
-
-
- if (relative_stem_dir)
- p->set_elt_property ("side-relative-direction", gh_int2scm (relative_stem_dir));
- else
- Side_position::set_direction (p,(Direction)force_dir);
-
- if (l->get_direction ())
- Side_position::set_direction (p, l->get_direction ());
-
- SCM axisprop = get_property ("scriptHorizontal");
- bool xaxis = to_boolean (axisprop);
- Side_position::set_axis (p, xaxis ? X_AXIS : Y_AXIS);
-
- if (!follow_staff && ! xaxis)
- p->set_elt_property ("staff-support", SCM_BOOL_T);
-
- if (!xaxis && follow_staff)
- p->add_offset_callback (Side_position::quantised_position, Y_AXIS);
-
-
- p->set_elt_property ("script-priority", priority);
-
- script_p_arr_.push (p);
-
- announce_element (p, l);
+ /* FIXME: */
+ warning (_ ("do not know how to interpret articulation:"));
+ warning (_ (" scheme encoding: "));
+ scm_write (art_type, scm_current_error_port ());
+ message ("");
+ return;
+ }
+
+ art = scm_cdr (art);
+
+ bool priority_found = false;
+
+ for (SCM s = art; scm_is_pair (s); s = scm_cdr (s))
+ {
+ 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));