Exemple #1
0
 def execute(self, context):
     my_item = addaroute(context.scene.MOM_Items)
     for k, v in context.scene.MOM_Items[self.n].items():
         if k != 'perma_rank':
             my_item[k] = v
     generate_dict(self, context)
     return {'FINISHED'}
Exemple #2
0
 def execute(self, context):
     prefs = bpy.context.preferences.addons['AddRoutes'].preferences
     my_item = addaroute(prefs.AddR_System_Routes)
     for k, v in prefs.AddR_System_Routes[self.n].items():
         if k != 'perma_rank':
             my_item[k] = v
     generate_dict(self, context)
     return {'FINISHED'}
Exemple #3
0
def get_ctx_scene():
    global scn
    try:
        get_scn = bpy.data.window_managers[0].windows[0].scene

        #get_scn = bpy.data.scenes[scn.name]
        if get_scn != scn:
            scn = get_scn
            build_idx()
            #bpy.ops.addroutes.gendict()
            generate_dict(None, bpy.data.window_managers[0].windows[0])
            send_clock(scn, scn)
    except:
        print('No Context Scene, waiting...')
        scn = None
    return 0.3
Exemple #4
0
 def execute(self, context):
     my_item = bpy.context.scene.VPT_Items.add()
     for k, v in bpy.context.scene.VPT_Items[self.n].items():
         my_item[k] = v
     generate_dict(self, context)
     return {'FINISHED'}
Exemple #5
0
 def execute(self, context):
     bpy.context.scene.VPT_Items.remove(self.n)
     generate_dict(self, context)
     return {'FINISHED'}
Exemple #6
0
 def upd_max(self, context):
     if self.max <= self.min:
         self.max = self.max + 1
     generate_dict(self, context)
Exemple #7
0
 def upd_min(self, context):
     if self.min >= self.max:
         self.min = self.max - 1
     generate_dict(self, context)
Exemple #8
0
 def execute(self, context):
     prefs = bpy.context.preferences.addons['AddRoutes'].preferences
     prefs.AddR_System_Routes.remove(self.n)
     generate_dict(self, context)
     return {'FINISHED'}