- Script *p =new Script;
- Side_position_interface stafy (p);
-
-
- 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
- stafy.set_direction ((Direction)force_dir);
-
- if (l->get_direction ())
- stafy.set_direction (l->get_direction ());
-
- SCM axisprop = get_property ("scriptHorizontal");
- bool xaxis = to_boolean (axisprop);
- if (xaxis)
- stafy.set_axis (X_AXIS);
- else
- stafy.set_axis (Y_AXIS);
-
- if (!follow_staff && ! xaxis)
- p->set_elt_property ("staff-support", SCM_BOOL_T);
-
- if (!xaxis && follow_staff)
- stafy.set_quantised (Y_AXIS);
-
- p->set_elt_property ("script-priority", priority);
-
- script_p_arr_.push (p);
-
- announce_element (Score_element_info (p, l));
+
+ 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));