def to_glyphs_guidelines(self, ufo_obj, glyphs_obj):
if not ufo_obj.guidelines:<EOL><INDENT>return<EOL><DEDENT>for guideline in ufo_obj.guidelines:<EOL><INDENT>new_guideline = self.glyphs_module.GSGuideLine()<EOL>name = guideline.name<EOL>if name is not None and name.endswith(LOCKED_NAME_SUFFIX):<EOL><INDENT>name = name[: -len(LOCKED_NAME_SUFFIX)]<EOL>new_guideline.locked = True<EOL><DEDENT>if guideline.color:<EOL><INDENT>name = (name or "<STR_LIT>") + COLOR_NAME_SUFFIX % str(guideline.color)<EOL><DEDENT>if guideline.identifier:<EOL><INDENT>name = (name or "<STR_LIT>") + IDENTIFIER_NAME_SUFFIX % guideline.identifier<EOL><DEDENT>new_guideline.name = name<EOL>new_guideline.position = Point(guideline.x or <NUM_LIT:0>, guideline.y or <NUM_LIT:0>)<EOL>if guideline.angle is not None:<EOL><INDENT>new_guideline.angle = guideline.angle % <NUM_LIT><EOL><DEDENT>elif _is_vertical(guideline.x, guideline.y, None):<EOL><INDENT>new_guideline.angle = <NUM_LIT><EOL><DEDENT>glyphs_obj.guides.append(new_guideline)<EOL><DEDENT>
Set guidelines.