Example #1
0
	def __new__(cls, **kwargs):
		s = super(Orient, cls).__new__(cls, **kwargs)
		s.append(curve(name=Orient.__name__.lower() + '#', degree=3,
			point=convert_points([ \
				[0.0959835, 0.604001, -0.0987656], [0.500783, 0.500458, -0.0987656],
				[0.751175, 0.327886, -0.0987656], [0.751175, 0.327886, -0.0987656],
				[0.751175, 0.327886, -0.336638], [0.751175, 0.327886, -0.336638],
				[1.001567, 0, 0], [1.001567, 0, 0], [0.751175, 0.327886, 0.336638],
				[0.751175, 0.327886, 0.336638], [0.751175, 0.327886, 0.0987656],
				[0.751175, 0.327886, 0.0987656], [0.500783, 0.500458, 0.0987656],
				[0.0959835, 0.604001, 0.0987656], [0.0959835, 0.604001, 0.0987656],
				[0.0959835, 0.500458, 0.500783], [0.0959835, 0.327886, 0.751175],
				[0.0959835, 0.327886, 0.751175], [0.336638, 0.327886, 0.751175],
				[0.336638, 0.327886, 0.751175], [0, 0, 1.001567], [0, 0, 1.001567],
				[-0.336638, 0.327886, 0.751175], [-0.336638, 0.327886, 0.751175],
				[-0.0959835, 0.327886, 0.751175], [-0.0959835, 0.327886, 0.751175],
				[-0.0959835, 0.500458, 0.500783], [-0.0959835, 0.604001, 0.0987656],
				[-0.0959835, 0.604001, 0.0987656], [-0.500783, 0.500458, 0.0987656],
				[-0.751175, 0.327886, 0.0987656], [-0.751175, 0.327886, 0.0987656],
				[-0.751175, 0.327886, 0.336638], [-0.751175, 0.327886, 0.336638],
				[-1.001567, 0, 0], [-1.001567, 0, 0], [-0.751175, 0.327886, -0.336638],
				[-0.751175, 0.327886, -0.336638], [-0.751175, 0.327886, -0.0987656],
				[-0.751175, 0.327886, -0.0987656], [-0.500783, 0.500458, -0.0987656],
				[-0.0959835, 0.604001, -0.0987656], [-0.0959835, 0.604001, -0.0987656],
				[-0.0959835, 0.500458, -0.500783], [-0.0959835, 0.327886, -0.751175],
				[-0.0959835, 0.327886, -0.751175], [-0.336638, 0.327886, -0.751175],
				[-0.336638, 0.327886, -0.751175], [0, 0, -1.001567], [0, 0, -1.001567],
				[0.336638, 0.327886, -0.751175], [0.336638, 0.327886, -0.751175],
				[0.0959835, 0.327886, -0.751175], [0.0959835, 0.327886, -0.751175],
				[0.0959835, 0.500458, -0.500783],
				[0.0959835, 0.604001, -0.0987656]])).getShape())
		return s
Example #2
0
	def __new__(cls, **kwargs):
		s = super(Plus, cls).__new__(cls, **kwargs)
		s.append(curve(name=Plus.__name__.lower() + '#', degree=1,
			point=convert_points([ \
				[0, 1, 0], [0, -1, 0], [0, 0, 0], [-1, 0, 0], [1, 0, 0], [0, 0, 0], [0, 0, 1],
				[0, 0, -1]])).getShape())
		return s
Example #3
0
 def __new__(cls, **kwargs):
     s = super(Plus, cls).__new__(cls, **kwargs)
     s.append(curve(name=Plus.__name__.lower() + '#', degree=1,
      point=convert_points([ \
       [0, 1, 0], [0, -1, 0], [0, 0, 0], [-1, 0, 0], [1, 0, 0], [0, 0, 0], [0, 0, 1],
       [0, 0, -1]])).getShape())
     return s
Example #4
0
 def __new__(cls, **kwargs):
     s = super(Orient, cls).__new__(cls, **kwargs)
     s.append(curve(name=Orient.__name__.lower() + '#', degree=3,
      point=convert_points([ \
       [0.0959835, 0.604001, -0.0987656], [0.500783, 0.500458, -0.0987656],
       [0.751175, 0.327886, -0.0987656], [0.751175, 0.327886, -0.0987656],
       [0.751175, 0.327886, -0.336638], [0.751175, 0.327886, -0.336638],
       [1.001567, 0, 0], [1.001567, 0, 0], [0.751175, 0.327886, 0.336638],
       [0.751175, 0.327886, 0.336638], [0.751175, 0.327886, 0.0987656],
       [0.751175, 0.327886, 0.0987656], [0.500783, 0.500458, 0.0987656],
       [0.0959835, 0.604001, 0.0987656], [0.0959835, 0.604001, 0.0987656],
       [0.0959835, 0.500458, 0.500783], [0.0959835, 0.327886, 0.751175],
       [0.0959835, 0.327886, 0.751175], [0.336638, 0.327886, 0.751175],
       [0.336638, 0.327886, 0.751175], [0, 0, 1.001567], [0, 0, 1.001567],
       [-0.336638, 0.327886, 0.751175], [-0.336638, 0.327886, 0.751175],
       [-0.0959835, 0.327886, 0.751175], [-0.0959835, 0.327886, 0.751175],
       [-0.0959835, 0.500458, 0.500783], [-0.0959835, 0.604001, 0.0987656],
       [-0.0959835, 0.604001, 0.0987656], [-0.500783, 0.500458, 0.0987656],
       [-0.751175, 0.327886, 0.0987656], [-0.751175, 0.327886, 0.0987656],
       [-0.751175, 0.327886, 0.336638], [-0.751175, 0.327886, 0.336638],
       [-1.001567, 0, 0], [-1.001567, 0, 0], [-0.751175, 0.327886, -0.336638],
       [-0.751175, 0.327886, -0.336638], [-0.751175, 0.327886, -0.0987656],
       [-0.751175, 0.327886, -0.0987656], [-0.500783, 0.500458, -0.0987656],
       [-0.0959835, 0.604001, -0.0987656], [-0.0959835, 0.604001, -0.0987656],
       [-0.0959835, 0.500458, -0.500783], [-0.0959835, 0.327886, -0.751175],
       [-0.0959835, 0.327886, -0.751175], [-0.336638, 0.327886, -0.751175],
       [-0.336638, 0.327886, -0.751175], [0, 0, -1.001567], [0, 0, -1.001567],
       [0.336638, 0.327886, -0.751175], [0.336638, 0.327886, -0.751175],
       [0.0959835, 0.327886, -0.751175], [0.0959835, 0.327886, -0.751175],
       [0.0959835, 0.500458, -0.500783],
       [0.0959835, 0.604001, -0.0987656]])).getShape())
     return s
Example #5
0
	def __new__(cls, **kwargs):
		s = super(Arrow, cls).__new__(cls, **kwargs)
		s.append(curve(name=Arrow.__name__.lower() + '#', degree=1,
			point=convert_points([ \
				[0, 0.6724194, 0.4034517], [0, 0, 0.4034517], [0, 0, 0.6724194],
				[0, -0.4034517, 0], [0, 0, -0.6724194], [0, 0, -0.4034517],
				[0, 0.6724194, -0.4034517], [0, 0.6724194, 0.4034517]])).getShape())
		return s
Example #6
0
	def __new__(cls, **kwargs):
		s = super(Sphere, cls).__new__(cls, **kwargs)
		s.append(curve(name=Sphere.__name__.lower() + '#', degree=1,
			point=convert_points([ \
				[0, 3, 0], [0, 2, -2], [0, 0, -3], [0, -2, -2], [0, -3, 0], [0, -2, 2],
				[0, 0, 3], [0, 2, 2], [0, 3, 0], [2, 2, 0], [3, 0, 0], [2, -2, 0], [0, -3, 0],
				[-2, -2, 0], [-3, 0, 0], [-2, 2, 0], [0, 3, 0]])))
		return s
Example #7
0
 def __new__(cls, **kwargs):
     s = super(Cross, cls).__new__(cls, **kwargs)
     s.append(curve(name=Cross.__name__.lower() + '#', degree=1,
      point=convert_points([ \
       [1, 0, -1], [2, 0, -1], [2, 0, 1], [1, 0, 1], [1, 0, 2], [-1, 0, 2],
       [-1, 0, 1], [-2, 0, 1], [-2, 0, -1], [-1, 0, -1], [-1, 0, -2], [1, 0, -2],
       [1, 0, -1]])).getShape())
     return s
Example #8
0
 def __new__(cls, **kwargs):
     s = super(Arrow, cls).__new__(cls, **kwargs)
     s.append(curve(name=Arrow.__name__.lower() + '#', degree=1,
      point=convert_points([ \
       [0, 0.6724194, 0.4034517], [0, 0, 0.4034517], [0, 0, 0.6724194],
       [0, -0.4034517, 0], [0, 0, -0.6724194], [0, 0, -0.4034517],
       [0, 0.6724194, -0.4034517], [0, 0.6724194, 0.4034517]])).getShape())
     return s
Example #9
0
 def __new__(cls, **kwargs):
     s = super(Sphere, cls).__new__(cls, **kwargs)
     s.append(curve(name=Sphere.__name__.lower() + '#', degree=1,
      point=convert_points([ \
       [0, 3, 0], [0, 2, -2], [0, 0, -3], [0, -2, -2], [0, -3, 0], [0, -2, 2],
       [0, 0, 3], [0, 2, 2], [0, 3, 0], [2, 2, 0], [3, 0, 0], [2, -2, 0], [0, -3, 0],
       [-2, -2, 0], [-3, 0, 0], [-2, 2, 0], [0, 3, 0]])))
     return s
Example #10
0
	def __new__(cls, **kwargs):
		s = super(Cross, cls).__new__(cls, **kwargs)
		s.append(curve(name=Cross.__name__.lower() + '#', degree=1,
			point=convert_points([ \
				[1, 0, -1], [2, 0, -1], [2, 0, 1], [1, 0, 1], [1, 0, 2], [-1, 0, 2],
				[-1, 0, 1], [-2, 0, 1], [-2, 0, -1], [-1, 0, -1], [-1, 0, -2], [1, 0, -2],
				[1, 0, -1]])).getShape())
		return s
Example #11
0
 def __new__(cls, **kwargs):
     s = super(Cube, cls).__new__(cls, **kwargs)
     s.append(curve(name=Cube.__name__.lower() + '#', degree=1,
      point=convert_points([ \
       [-0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [0.5, 0.5, -0.5], [-0.5, 0.5, -0.5],
       [-0.5, 0.5, 0.5], [-0.5, -0.5, 0.5], [-0.5, -0.5, -0.5], [0.5, -0.5, -0.5],
       [0.5, -0.5, 0.5], [-0.5, -0.5, 0.5], [0.5, -0.5, 0.5], [0.5, 0.5, 0.5],
       [0.5, 0.5, -0.5], [0.5, -0.5, -0.5], [-0.5, -0.5, -0.5],
       [-0.5, 0.5, -0.5]])).getShape())
     return s
Example #12
0
	def __new__(cls, **kwargs):
		s = super(Cube, cls).__new__(cls, **kwargs)
		s.append(curve(name=Cube.__name__.lower() + '#', degree=1,
			point=convert_points([ \
				[-0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [0.5, 0.5, -0.5], [-0.5, 0.5, -0.5],
				[-0.5, 0.5, 0.5], [-0.5, -0.5, 0.5], [-0.5, -0.5, -0.5], [0.5, -0.5, -0.5],
				[0.5, -0.5, 0.5], [-0.5, -0.5, 0.5], [0.5, -0.5, 0.5], [0.5, 0.5, 0.5],
				[0.5, 0.5, -0.5], [0.5, -0.5, -0.5], [-0.5, -0.5, -0.5],
				[-0.5, 0.5, -0.5]])).getShape())
		return s
Example #13
0
    def on_createSplineIKSystemButton_clicked(self):
        self.bottomWidget.show()
        self.topWidget.setEnabled(False)

        dj_chains, output_curves = (), ()
        for root in selected():
            dj_chain = (root, )
            while dj_chain[-1].numChildren():
                dj_chain += (dj_chain[-1].getChildren()[0], )
            dj_chains += (dj_chain, )

            # Assign a hair system to the driver joint chain.
            output_curves += ( \
             curve(p=[dj.getTranslation(space='world').get() \
             for dj in dj_chain]),)

        select(output_curves)
        mel.eval('assignNewHairSystem')
        follicle_curves = selected()

        hs = follicle_curves[0].getParent().getShape().attr('outHair') \
         .outputs()[0]

        [hs.attr(x).set(0) for x in \
         ('drag', 'friction', 'mass', 'gravity', 'dynamicsWeight')]

        hs.attr('startCurveAttract').set(0.25)

        for i, dj_chain in enumerate(dj_chains):
            oc = output_curves[i]
            select(dj_chain + (oc, ))
            SmoothBindSkin()
            bjs = [dj.attr('rotate').outputs()[0].attr('constraintRotateZ') \
             .outputs()[0] for dj in (dj_chain[0], dj_chain[-1])]
            ikHandle(startJoint=bjs[0],
                     endEffector=bjs[1],
                     curve=oc,
                     solver='ikSplineSolver',
                     parentCurve=False,
                     createCurve=False)

        self.topWidget.setEnabled(True)
        self.bottomWidget.hide()
Example #14
0
	def on_createSplineIKSystemButton_clicked(self):
		self.bottomWidget.show()
		self.topWidget.setEnabled(False)
		
		dj_chains, output_curves = (), ()
		for root in selected():
			dj_chain = (root,)
			while dj_chain[-1].numChildren():
				dj_chain += (dj_chain[-1].getChildren()[0],)
			dj_chains += (dj_chain,)
			
			# Assign a hair system to the driver joint chain.
			output_curves += ( \
				curve(p=[dj.getTranslation(space='world').get() \
				for dj in dj_chain]),)
		
		select(output_curves)
		mel.eval('assignNewHairSystem')
		follicle_curves = selected()
		
		hs = follicle_curves[0].getParent().getShape().attr('outHair') \
			.outputs()[0]
		
		[hs.attr(x).set(0) for x in \
			('drag', 'friction', 'mass', 'gravity', 'dynamicsWeight')]
		
		hs.attr('startCurveAttract').set(0.25)
		
		for i, dj_chain in enumerate(dj_chains):
			oc = output_curves[i]
			select(dj_chain + (oc,))
			SmoothBindSkin()
			bjs = [dj.attr('rotate').outputs()[0].attr('constraintRotateZ') \
				.outputs()[0] for dj in (dj_chain[0], dj_chain[-1])]
			ikHandle(startJoint=bjs[0], endEffector=bjs[1],
				curve=oc, solver='ikSplineSolver',
				parentCurve=False, createCurve=False)
		
		self.topWidget.setEnabled(True)
		self.bottomWidget.hide()
Example #15
0
	def __new__(cls, **kwargs):
		s = super(Bulb, cls).__new__(cls, **kwargs)
		s.append(curve(name=Bulb.__name__.lower(), degree=3,
			point=convert_points([ \
				[-0.139471, -0.798108, 0], [-0.139471, -0.798108, 0],
				[-0.139471, -0.798108, 0], [-0.299681, -0.672294, 0],
				[-0.299681, -0.672294, 0], [-0.299681, -0.672294, 0],
				[-0.121956, -0.578864, 0], [-0.121956, -0.578864, 0],
				[-0.121956, -0.578864, 0], [-0.285304, -0.51952, 0],
				[-0.285304, -0.51952, 0], [-0.0744873, -0.442806, 0],
				[-0.0744873, -0.442806, 0], [-0.287769, -0.373086, 0],
				[-0.287769, -0.373086, 0], [-0.100386, -0.296549, 0],
				[-0.100386, -0.296549, 0], [-0.264344, -0.205725, 0],
				[-0.264344, -0.205725, 0], [-0.262544, -0.0993145, 0],
				[-0.262544, -0.0993145, 0], [-0.167051, -0.0613459, 0],
				[-0.167051, -0.0613459, 0], [-0.167051, -0.0613459, 0],
				[-0.166024, 0.0163458, 0], [-0.157394, 0.232092, 0],
				[-0.367902, 0.680843, 0], [-0.96336, 1.224522, 0],
				[-1.006509, 1.992577, 0], [-0.316123, 2.613925, 0],
				[0.561786, 2.548479, 0], [1.094888, 2.001207, 0],
				[1.051638, 1.166965, 0], [0.436419, 0.66543, 0],
				[0.13283, 0.232092, 0], [0.15009, 0.0163458, 0],
				[0.15073, -0.046628, 0], [0.15073, -0.046628, 0],
				[0.270326, -0.0955798, 0], [0.270326, -0.0955798, 0],
				[0.267815, -0.208156, 0], [0.267815, -0.208156, 0],
				[0.0884224, -0.291145, 0], [0.0884224, -0.291145, 0],
				[0.292477, -0.366091, 0], [0.292477, -0.366091, 0],
				[0.0946189, -0.439723, 0], [0.0946189, -0.439723, 0],
				[0.306664, -0.508968, 0], [0.306664, -0.508968, 0],
				[0.112488, -0.57513, 0], [0.112488, -0.57513, 0],
				[0.323789, -0.674644, 0], [0.323789, -0.674644, 0],
				[0.152097, -0.794645, 0], [0.152097, -0.794645, 0],
				[0.152097, -0.794645, 0], [0.106716, -0.907397, 0],
				[0.0103741, -1.003739, 0], [-0.0919896, -0.907397, 0],
				[-0.139471, -0.798108, 0], [-0.139471, -0.798108, 0]])))
		return s
Example #16
0
 def __new__(cls, **kwargs):
     s = super(Bulb, cls).__new__(cls, **kwargs)
     s.append(curve(name=Bulb.__name__.lower(), degree=3,
      point=convert_points([ \
       [-0.139471, -0.798108, 0], [-0.139471, -0.798108, 0],
       [-0.139471, -0.798108, 0], [-0.299681, -0.672294, 0],
       [-0.299681, -0.672294, 0], [-0.299681, -0.672294, 0],
       [-0.121956, -0.578864, 0], [-0.121956, -0.578864, 0],
       [-0.121956, -0.578864, 0], [-0.285304, -0.51952, 0],
       [-0.285304, -0.51952, 0], [-0.0744873, -0.442806, 0],
       [-0.0744873, -0.442806, 0], [-0.287769, -0.373086, 0],
       [-0.287769, -0.373086, 0], [-0.100386, -0.296549, 0],
       [-0.100386, -0.296549, 0], [-0.264344, -0.205725, 0],
       [-0.264344, -0.205725, 0], [-0.262544, -0.0993145, 0],
       [-0.262544, -0.0993145, 0], [-0.167051, -0.0613459, 0],
       [-0.167051, -0.0613459, 0], [-0.167051, -0.0613459, 0],
       [-0.166024, 0.0163458, 0], [-0.157394, 0.232092, 0],
       [-0.367902, 0.680843, 0], [-0.96336, 1.224522, 0],
       [-1.006509, 1.992577, 0], [-0.316123, 2.613925, 0],
       [0.561786, 2.548479, 0], [1.094888, 2.001207, 0],
       [1.051638, 1.166965, 0], [0.436419, 0.66543, 0],
       [0.13283, 0.232092, 0], [0.15009, 0.0163458, 0],
       [0.15073, -0.046628, 0], [0.15073, -0.046628, 0],
       [0.270326, -0.0955798, 0], [0.270326, -0.0955798, 0],
       [0.267815, -0.208156, 0], [0.267815, -0.208156, 0],
       [0.0884224, -0.291145, 0], [0.0884224, -0.291145, 0],
       [0.292477, -0.366091, 0], [0.292477, -0.366091, 0],
       [0.0946189, -0.439723, 0], [0.0946189, -0.439723, 0],
       [0.306664, -0.508968, 0], [0.306664, -0.508968, 0],
       [0.112488, -0.57513, 0], [0.112488, -0.57513, 0],
       [0.323789, -0.674644, 0], [0.323789, -0.674644, 0],
       [0.152097, -0.794645, 0], [0.152097, -0.794645, 0],
       [0.152097, -0.794645, 0], [0.106716, -0.907397, 0],
       [0.0103741, -1.003739, 0], [-0.0919896, -0.907397, 0],
       [-0.139471, -0.798108, 0], [-0.139471, -0.798108, 0]])))
     return s
Example #17
0
	def __new__(cls, **kwargs):
		s = super(Square, cls).__new__(cls, **kwargs)
		s.append(curve(name=Square.__name__.lower() + '#', degree=1,
			p=convert_points([ \
				[-1, 0, 1], [1, 0, 1], [1, 0, -1], [-1, 0, -1], [-1, 0, 1]])).getShape())
		return s
Example #18
0
 def __new__(cls, **kwargs):
     s = super(Square, cls).__new__(cls, **kwargs)
     s.append(curve(name=Square.__name__.lower() + '#', degree=1,
      p=convert_points([ \
       [-1, 0, 1], [1, 0, 1], [1, 0, -1], [-1, 0, -1], [-1, 0, 1]])).getShape())
     return s