Example #1
0
    def chains(self):
        """
        Sort the finger chains by their relative position to the hand. This give consistent order.
        :return: The chains sorted by their position relative to the hand.
        """
        # TODO: Implement 'super' behavior in property
        chains = libPymel.get_chains_from_objs(self.input)

        #TODO : Do we want to check the distance in the world or related to the parent ?
        def sort_chain(chain):
            local_tm = chain.end.getMatrix(worldSpace=True)
            return local_tm.translate.z

        #Sorted by distance, but doesn't detect positive/negative value
        sorted_chain = sorted(chains, key=sort_chain)

        return sorted_chain
Example #2
0
 def chains_jnt(self):
     return libPymel.get_chains_from_objs(self.jnts)
Example #3
0
 def chains(self):
     return libPymel.get_chains_from_objs(self.input)
 def chains_jnt(self):
     return libPymel.get_chains_from_objs(self.jnts)
 def chains(self):
     return libPymel.get_chains_from_objs(self.input)