It's a little hacky, but try this:

Group {
 name pixelMeasure
 help "This node displays the distance in pixels between two points\n\n-
John Mangia"
 label "x distance: \[value this.calc.x]\ny distance: \[value this.calc.y]"
 selected true
 xpos -589
 ypos -334
 addUserKnob {20 pixelMeasure}
 addUserKnob {6 lockY l "lock y" +STARTLINE}
 addUserKnob {12 pointA}
 pointA {764 796}
 addUserKnob {12 pointB}
 pointB {1460 {"this.lockY == True ? this.pointA.y :this.pointB.y" x1001
820 x1023 502 x1035 1}}
 addUserKnob {12 calc l INVISIBLE +INVISIBLE}
 calc {{"abs(this.pointA.x - this.pointB.x)"} {"abs(this.pointA.y -
this.pointB.y)"}}
}
 Input {
  inputs 0
  name Input1
  selected true
  xpos -339
  ypos -110
 }
 Output {
  name Output1
  xpos -339
  ypos 61
 }
end_group


On Tue, Nov 15, 2011 at 7:28 AM, Sam Cole <[email protected]> wrote:

> > Hey folks,
> > Is there a way I can measure direct pixel distances from point to point;
>
> Like that?
>
> NoOp {
>  name ruler
>  selected true
>  xpos -399
>  ypos -215
>  addUserKnob {20 User}
>  addUserKnob {7 distance}
>  distance {{sqrt(((x2.x-x1.x)*(x2.x-x1.x))+((x2.y-x1.y)*(x2.y-x1.y)))}}
>  addUserKnob {12 x1}
>  addUserKnob {12 x2}
>  x2 {200 300}
> }
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>



-- 
John Mangia

908.616.1796
[email protected]
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to