def analyze_selection(parameters=None): if not InteractiveWithMemory.analyze_selection(parameters): return False application = context.application if application is None: return False victim = application.cache.node if victim is None: return False if victim.get_fixed(): return False if not isinstance(victim, GLTransformationMixin): return False if not isinstance(victim.transformation, Translation): return False return True
def analyze_selection(parameters=None): if not InteractiveWithMemory.analyze_selection(parameters): return False cache = context.application.cache if len(cache.nodes) == 1: if cache.last.get_fixed(): return False if not isinstance(cache.last, GLTransformationMixin): return False if not isinstance(cache.last.transformation, Rotation): return False elif len(cache.nodes) == 2: if cache.next_to_last.get_fixed(): return False if not isinstance(cache.next_to_last, GLTransformationMixin): return False if not isinstance(cache.next_to_last.transformation, Translation): return False if not ( isinstance(cache.last, Vector) or ( isinstance(cache.last, GLTransformationMixin) and isinstance(cache.last.transformation, Translation) ) ): return False else: return False return True
def analyze_selection(parameters=None): if not InteractiveWithMemory.analyze_selection(parameters): return False cache = context.application.cache if len(cache.nodes) == 1: if cache.last.get_fixed(): return False if not isinstance(cache.last, GLTransformationMixin): return False if not isinstance(cache.last.transformation, Rotation): return False elif len(cache.nodes) == 2: if cache.next_to_last.get_fixed(): return False if not isinstance(cache.next_to_last, GLTransformationMixin): return False if not isinstance(cache.next_to_last.transformation, Translation): return False if not (isinstance(cache.last, Vector) or (isinstance(cache.last, GLTransformationMixin) and isinstance(cache.last.transformation, Translation))): return False else: return False return True