def force_recalculate(object_list): """Forces connection recalculation for given objects. :param object_list: list of the objects for which connection update should be triggered :type object_list: list of bpy.types.Object """ _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], object_list)
def force_recalculate(object_list): """Forces connection recalculation for given objects. :param object_list: list of the objects for which connection update should be triggered :type object_list: list of bpy.types.Object """ _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], object_list)
def _execute_draw(): """Checks if connections should be drawn. """ # exlude optimization drawing if not bpy.context.scene.scs_props.optimized_connections_drawing: _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], None) return True return _CACHE[_DATA_UP_TO_DATE]
def _execute_draw(): """Checks if connections should be drawn. """ # exlude optimization drawing if not bpy.context.scene.scs_props.optimized_connections_drawing: _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], None) return True return _CACHE[_DATA_UP_TO_DATE]
def update_for_redraw(): """Recalculate connections, if they are not yet up to date. """ # if initialization wasn't triggered yet, then skip switching to stall and wait until it gets initialised if _COLLECTION_NAME not in bpy.data.collections: return # if data was marked as updated if not _CACHE[_DATA_UP_TO_DATE]: # recalculate curves and lines whos locators were visibly changed _core.update_for_redraw(bpy.data.collections[_COLLECTION_NAME], None) _CACHE[_DATA_UP_TO_DATE] = True
def switch_to_stall(): """Switches state of connections drawing to stalling and will trigger check for connections recalculations if they are not yet up to date. NOTE: this will effect drawing only if optimized drawing is switched on """ # if data was marked as updated if not _CACHE[_DATA_UP_TO_DATE]: # recalculate curves and lines whos locators were visiblly changed and force redraw _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], None) bpy.context.scene.unit_settings.system = bpy.context.scene.unit_settings.system _CACHE[_DATA_UP_TO_DATE] = True
def _execute_draw(optimized_drawing): """Checks if connections should be drawn. :param optimized_drawing: optimized connections drawing property from SCS globals :type optimized_drawing: bool """ # exclude optimization drawing if not optimized_drawing: _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], None) return True return _CACHE[_DATA_UP_TO_DATE]
def _execute_draw(optimized_drawing): """Checks if connections should be drawn. :param optimized_drawing: optimized connections drawing property from SCS globals :type optimized_drawing: bool """ # exclude optimization drawing if not optimized_drawing: _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], None) return True return _CACHE[_DATA_UP_TO_DATE]
def switch_to_stall(): """Switches state of connections drawing to stalling and will trigger check for connections recalculations if they are not yet up to date. NOTE: this will effect drawing only if optimized drawing is switched on """ # if data was marked as updated if not _CACHE[_DATA_UP_TO_DATE]: # recalculate curves and lines whos locators were visiblly changed and force redraw _core.update_for_redraw(bpy.data.groups[_GROUP_NAME], None) bpy.context.scene.unit_settings.system = bpy.context.scene.unit_settings.system _CACHE[_DATA_UP_TO_DATE] = True