Exemplo n.º 1
0
def updateNode(self, context):
    """
    When a node has changed state and need to call a partial update.
    For example a user exposed bpy.prop
    """
    global DEBUG_MODE
    a = time.perf_counter()
    sverchok_update(start_node=self)
    b = time.perf_counter()
    if DEBUG_MODE:
        print("Partial update from node", self.name, "in", round(b - a, 4))
Exemplo n.º 2
0
def updateNode(self, context):
    """
    When a node has changed state and need to call a partial update.
    For example a user exposed bpy.prop
    """
    global DEBUG_MODE
    a = time.perf_counter()
    sverchok_update(start_node=self)
    b = time.perf_counter()
    if DEBUG_MODE:
        print("Partial update from node", self.name, "in", round(b-a, 4))            
Exemplo n.º 3
0
    def update(self):
        '''
        Rebuild and update the Sverchok node tree, used at editor changes
        '''
        # startup safety net, a lot things will just break if this isn't
        # stopped...
        try:
            l = bpy.data.node_groups[self.id_data.name]
        except:
            return

        build_update_list(tree=self)
        sverchok_update(tree=self)
Exemplo n.º 4
0
    def update(self):
        '''
        Rebuild and update the Sverchok node tree, used at editor changes
        '''
        # startup safety net, a lot things will just break if this isn't
        # stopped...
        try:
            l = bpy.data.node_groups[self.id_data.name]
        except:
            return

        build_update_list(tree=self)
        sverchok_update(tree=self)
Exemplo n.º 5
0
 def execute(self, context):
     ng = bpy.data.node_groups.get(self.node_group)
     if ng:
         build_update_list(tree=ng)
         sverchok_update(tree=ng)
     return {'FINISHED'}
Exemplo n.º 6
0
 def execute(self, context):
     build_update_list()
     sverchok_update()
     return {'FINISHED'}
Exemplo n.º 7
0
 def update_ani(self):
     """
     Updates the Sverchok node tree if animation layers show true. For animation callback
     """
     if self.sv_animate:
         sverchok_update(tree=self)
Exemplo n.º 8
0
 def turn_off_ng(self, context):
     sverchok_update(tree=self)
Exemplo n.º 9
0
 def execute(self, context):
     ng = bpy.data.node_groups.get(self.node_group)
     if ng:
         build_update_list(tree=ng)
         sverchok_update(tree=ng)
     return {'FINISHED'}
Exemplo n.º 10
0
 def execute(self, context):
     build_update_list()
     sverchok_update()
     return {'FINISHED'}
Exemplo n.º 11
0
 def update_ani(self):
     """
     Updates the Sverchok node tree if animation layers show true. For animation callback
     """
     if self.sv_animate:
         sverchok_update(tree=self)
Exemplo n.º 12
0
 def turn_off_ng(self, context):
     sverchok_update(tree=self)