title: 'Object' object has no attribute 'my_tool'
body: <p>We try that the variables that we initialize in the addon pass to the execute function but it gives us an error in mytool.
  We want the variables to be taken out of the objects appear in the scene so we use mytool = Object.my_tool</p>
  <pre><code>class Propiedades(PropertyGroup):
      Frecuencia = FloatProperty(name = &quot;Frecuencia&quot;,
      description = &quot;La frecuencia con la que ocurren las interpolaciones&quot;,
      default = 23.7,
      min = 0.0,
      max = 50.0)
  
      Amplitud = FloatProperty(name = &quot;Amplitud&quot;,
      description = &quot;La amplitud maxima&quot;,
      default = 23.7,
      min = 0.01, 
      max = 50.0)
  
      Metodo = StringProperty(name=&quot;Metodo de Interpolacion&quot;,
      description=&quot;Añada el metodo que se va a usar&quot;,
      default=&quot;Lineal&quot;,
      maxlen=1024)
  
      Tension = FloatProperty(name = &quot;Tension&quot;,
      description = &quot;La tensión en la interpolación de Catmull-Rom&quot;,
      default = 0.0)
  
      Oscilacion = BoolProperty(name = &quot;Oscilación Aleatoria&quot;,
      description = &quot;Activa la oscilacion aleatoria&quot;,
      default = False)
  
      Velocidad = FloatVectorProperty(name = &quot;Velocidad&quot;,
      description = &quot;Velocidad en Hermite&quot;)
  
      Numobjetos = IntProperty(name = &quot;Número de objetos&quot;,
      description = &quot;Número de objetos en escena&quot;,
      default = 1)
  
  class Panel_Operadores(Operator):
      bl_idname = &quot;wm.hacer_interpolacion&quot;
      bl_label = &quot;Interpolación&quot;
  
      def execute(self, context):
          Object = context.object
          
          fotogramas = bpy.data.actions['CubeAction'].fcurves.find('location', index = 0)
          for j in range(0, mytool.Numobjetos):
              for i in range(1, len(fotogramas.keyframe_points)-1):
                  vec_pos = get_pos(mytool.Metodo, fotogramas.keyframe_points[i], context)
                  bpy.data.objects['Cube'].keyframe_insert(frame = i, data_path=&quot;location&quot;)
                  if mytool.Oscilacion == True:
                      vec_pos += modif_ale(mytool.Amplitud, mytool.Frecuencia)
  
          return {'FINISHED'}
  
  
  
  class Panel_Custom(Panel):
      bl_label = &quot;Panel&quot;;
      bl_idname =&quot;OBJECT_PT_custom_panel&quot;
      bl_space_type = &quot;VIEW_3D&quot;
      bl_region_type = &quot;UI&quot;
      bl_category = &quot;Tools&quot;
      bl_context = &quot;objectmode&quot;
      bl_label = &quot;Hacer interpolación&quot;
  
      @classmethod
      def poll(self, context):
          return context.object is not None
  
      def draw(self, context):
          layout =self.layout
          scene = context.scene
          mytool = scene.my_tool
  
          layout.prop(mytool, &quot;Frecuencia&quot;)
          layout.prop(mytool, &quot;Amplitud&quot;)
          layout.prop(mytool, &quot;Metodo&quot;)
          layout.prop(mytool, &quot;Tension&quot;)
          layout.prop(mytool, &quot;Oscilacion&quot;)
          layout.prop(mytool, &quot;Velocidad&quot;)
          layout.prop(mytool, &quot;Numobjetos&quot;)
          TheCol = self.layout.column(align = True)
          TheCol.operator(&quot;wm.hacer_interpolacion&quot;, text=&quot;Hacer interpolacion&quot;)
  
  
  
  classes = {Propiedades, Panel_Operadores, Panel_Custom}
  #bpy.data.objects['Cube'].animation_data_clear()
  
  
  def register():
      from bpy.utils import register_class
      for cls in classes:
          bpy.utils.register_class(cls)
  
      bpy.types.Scene.my_tool = bpy.props.PointerProperty(type = Propiedades)
  
  
  def unregister():
      from bpy.utils import unregister_class
      for cls in reversed(classes):
          unregister_class(cls)
  
      del bpy.types.Scene.my_tool
      del bpy.types.Scene.make_Interpolacion
  
  
  if __name__ == &quot;__main__&quot;:
      register()
  
  bl_info = \
      {
          &quot;name&quot; : &quot;Hacer interpolación&quot;,
          &quot;author&quot; : &quot;Grupo 4 Animación&quot;,
          &quot;version&quot; : (1,0,0),
          &quot;blender&quot; : (2,8,3),
          &quot;location&quot; : &quot;View 3D &gt; UI &gt; Tools&quot;,
          &quot;description&quot; : &quot;Realizar la interpolación&quot;,
          &quot;warning&quot; : &quot;&quot;,
          &quot;wiki_url&quot; : &quot;&quot;,
          &quot;tracker_url&quot; : &quot;&quot;,
          &quot;category&quot; : &quot;Tools&quot;
      }
  </code></pre>
  <p>Now we try to use the Object values ​​in the execute</p>
  <pre><code>def interpola_valores(pos, pos1, pos2, pos3, metodo, numfot, context, velAnt, velPost):
  
      Object = context.object
      mytool = Object.my_tool    
  
      u = (numfot - (numfot-1))/((numfot+1)-(numfot-1))
  
      #interpolación lineal
      if metodo == &quot;lineal&quot;:
          valorInterp = lin_interp (u, pos1, pos2)          
  
      #interpolación de Hermite
      if metodo == &quot;Hermite&quot;:
          valorInterp = hermite_interp(u, numfot, pos, pos1, pos2, velAnt, velPost)
  
      #interpolación de Catmull-Rom
      if metodo == &quot;Catmull-Rom&quot;:
          valorInterp = CatRom_interp(u, pos, pos1, pos2, pos3, mytool.Tension)
          
  
      return valorInterp
  </code></pre>
  <p>The error ocurs in mytool = Object.my_tool
  AttributeError: 'Object' object has no attribute 'my_tool'</p>