Re: [Maya-Python] custom constraint

2011-08-20 Thread Jan Berger


Didnt they introduce a MPXConstraint class at some point for custom constraints
to get this behaviour?

At 21:29 20.08.2011, you wrote:

I`m working on custom constraint and wonder how Maya does the
connections to translate or rotate attribute, so they can be still
changed. I will explain it more. If you make Maya constraint, you can
still move constrained object around, even if there are connections.
Actually Maya keyframes work the same way, you couldn`t animate really
if once keyframe is connected object`s attribute values couldn`t
change.
So I wonder if this is internal way of plug evaluation or I need
specific type of attribute (constraintTranslate seems to be simple
double3 type). Does anyone know how this works? thanks.

--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Jan Berger
j...@janberger.de :: www.janberger.de  


--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


[Maya-Python] Re: custom constraint

2011-08-20 Thread Jakub Krompolc
yes, that`s what I started from, my node is based on this proxy. But
it doesn`t seem to have implemented output attributes for translate/
rotate. I checked the example surface constraint too. There are only
some useful internal methods, but I guess you need to make your own
outputs.
But, I just looked at multiway constraint (just have the PDFs, not the
code) and they are using pairBlend nodes. Very smart! :) So I tested
it and it works. If you output your values via pairBlend you get both:
set value, but still leave it free to change interactively. I also
tested adding keyframes, and Maya picked up existing pairBlend node
automaticly - even better.
So I guess it will follow animation and when constraint input would
get dirty it would set its values over keyframes.

J

On Aug 20, 8:35 pm, Jan Berger j...@janberger.de wrote:
 Didnt they introduce a MPXConstraint class at some point for custom 
 constraints
 to get this behaviour?

 At 21:29 20.08.2011, you wrote:

 I`m working on custom constraint and wonder how Maya does the
 connections to translate or rotate attribute, so they can be still
 changed. I will explain it more. If you make Maya constraint, you can
 still move constrained object around, even if there are connections.
 Actually Maya keyframes work the same way, you couldn`t animate really
 if once keyframe is connected object`s attribute values couldn`t
 change.
 So I wonder if this is internal way of plug evaluation or I need
 specific type of attribute (constraintTranslate seems to be simple
 double3 type). Does anyone know how this works? thanks.

 --
 view archives:http://groups.google.com/group/python_inside_maya
 change your subscription settings:
 http://groups.google.com/group/python_inside_maya/subscribe

 Jan Berger
 j...@janberger.de ::www.janberger.de 

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


[Maya-Python] Re: custom constraint

2011-08-20 Thread Jakub Krompolc
well, after double checking. Maya connected keyframes directly per
axis (TX, TY, TZ etc..) while pairBlend was going compound --
compound. But, if it works :)

On Aug 20, 8:46 pm, Jakub Krompolc syntet...@gmail.com wrote:
 yes, that`s what I started from, my node is based on this proxy. But
 it doesn`t seem to have implemented output attributes for translate/
 rotate. I checked the example surface constraint too. There are only
 some useful internal methods, but I guess you need to make your own
 outputs.
 But, I just looked at multiway constraint (just have the PDFs, not the
 code) and they are using pairBlend nodes. Very smart! :) So I tested
 it and it works. If you output your values via pairBlend you get both:
 set value, but still leave it free to change interactively. I also
 tested adding keyframes, and Maya picked up existing pairBlend node
 automaticly - even better.
 So I guess it will follow animation and when constraint input would
 get dirty it would set its values over keyframes.

 J

 On Aug 20, 8:35 pm, Jan Berger j...@janberger.de wrote:







  Didnt they introduce a MPXConstraint class at some point for custom 
  constraints
  to get this behaviour?

  At 21:29 20.08.2011, you wrote:

  I`m working on custom constraint and wonder how Maya does the
  connections to translate or rotate attribute, so they can be still
  changed. I will explain it more. If you make Maya constraint, you can
  still move constrained object around, even if there are connections.
  Actually Maya keyframes work the same way, you couldn`t animate really
  if once keyframe is connected object`s attribute values couldn`t
  change.
  So I wonder if this is internal way of plug evaluation or I need
  specific type of attribute (constraintTranslate seems to be simple
  double3 type). Does anyone know how this works? thanks.

  --
  view archives:http://groups.google.com/group/python_inside_maya
  change your subscription settings:
  http://groups.google.com/group/python_inside_maya/subscribe

  Jan Berger
  j...@janberger.de ::www.janberger.de 

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe