parameters: (self, vobj, properties)
docstring: Set annotation properties only if they don't already exist.
docstring_summary: Set annotation properties only if they don't already exist.
docstring_tokens: Set annotation properties only if they don t already exist .
function: def set_annotation_properties(self, vobj, properties):
          """Set annotation properties only if they don't already exist."""
          if "ScaleMultiplier" not in properties:
              _tip = QT_TRANSLATE_NOOP("App::Property",
                                       "General scaling factor that affects "
                                       "the annotation consistently\n"
                                       "because it scales the text, "
                                       "and the line decorations, if any,\n"
                                       "in the same proportion.")
              vobj.addProperty("App::PropertyFloat",
                               "ScaleMultiplier",
                               "Annotation",
                               _tip)
              annotation_scale = param.GetFloat("DraftAnnotationScale", 1.0)
              if annotation_scale != 0:
                  vobj.ScaleMultiplier = 1 / annotation_scale
  
          if "AnnotationStyle" not in properties:
              _tip = QT_TRANSLATE_NOOP("App::Property",
                                       "Annotation style to apply "
                                       "to this object.\n"
                                       "When using a saved style "
                                       "some of the view properties "
                                       "will become read-only;\n"
                                       "they will only be editable by changing "
                                       "the style through "
                                       "the 'Annotation style editor' tool.")
              vobj.addProperty("App::PropertyEnumeration",
                               "AnnotationStyle",
                               "Annotation",
                               _tip)
              styles = []
              for key in vobj.Object.Document.Meta.keys():
                  if key.startswith("Draft_Style_"):
                      styles.append(key[12:])
  
              vobj.AnnotationStyle = [""] + styles
function_tokens: def set_annotation_properties ( self , vobj , properties ) : if "ScaleMultiplier" not in properties : _tip = QT_TRANSLATE_NOOP ( "App::Property" , "General scaling factor that affects " "the annotation consistently\n" "because it scales the text, " "and the line decorations, if any,\n" "in the same proportion." ) vobj . addProperty ( "App::PropertyFloat" , "ScaleMultiplier" , "Annotation" , _tip ) annotation_scale = param . GetFloat ( "DraftAnnotationScale" , 1.0 ) if annotation_scale != 0 : vobj . ScaleMultiplier = 1 / annotation_scale if "AnnotationStyle" not in properties : _tip = QT_TRANSLATE_NOOP ( "App::Property" , "Annotation style to apply " "to this object.\n" "When using a saved style " "some of the view properties " "will become read-only;\n" "they will only be editable by changing " "the style through " "the 'Annotation style editor' tool." ) vobj . addProperty ( "App::PropertyEnumeration" , "AnnotationStyle" , "Annotation" , _tip ) styles = [ ] for key in vobj . Object . Document . Meta . keys ( ) : if key . startswith ( "Draft_Style_" ) : styles . append ( key [ 12 : ] ) vobj . AnnotationStyle = [ "" ] + styles