Exemple #1
0
 def execute(self, context):
     root = sUtils.getRoot(context.active_object)
     if root:
         if self.usegitbranch:
             gitbranch = iUtils.getgitbranch()
             if gitbranch:
                 root["version"] = self.version.replace('*', gitbranch)
         else:
             root["version"] = self.version
     else:
         log("Could not set version due to missing root link. No version was set.", "ERROR")
     return {'FINISHED'}
Exemple #2
0
    def execute(self, context):
        """

        Args:
          context: 

        Returns:

        """
        root = sUtils.getRoot(context.active_object)
        if self.usegitbranch:
            gitbranch = ioUtils.getgitbranch()
            if gitbranch:
                root["model/version"] = self.version.replace('*', gitbranch)
        else:
            root["model/version"] = self.version
        return {'FINISHED'}