try this gizmo
set cut_paste_input [stack 0]
version 6.3 v4
push $cut_paste_input
add_layer {rgba redguard1.glow rgba.edgeblur}
Roto {
curves {AnimTree: "" {
Version: 1.2
Flag: 0
RootNode: 1
Node: {
NodeName: "Root" {
Flag: 512
NodeType: 1
Transform: 0 0 S 0 0 S 0 0 S 0 0 S 0 1 S 0 1 S 0 0 S 0 1120 S 0 480
NumOfAttributes: 10
"vis" S 0 1 "opc" S 0 1 "mbo" S 0 1 "mb" S 0 1 "mbs" S 0 0.5 "fo" S 0 1
"fx" S 0 0 "fy" S 0 0 "ff" S 0 1 "ft" S 0 0
}
NumOfChildren: 1
Node: {
NodeName: "Rectangle1" {
Flag: 576
NodeType: 3
CurveGroup: "" {
Transform: 0 0 S 1 1 0 S 1 1 0 S 1 1 0 S 1 1 1 S 1 1 1 S 1 1 0 S 1 1
358 S 1 1 219
Flag: 0
NumOfCubicCurves: 2
CubicCurve: "" {
Type: 0 Flag: 8192 Dim: 2
NumOfPoints: 12
1 S 1 1 0 S 1 1 -85.412 0 1 S 1 1 116.964 S 1 1 343.118 0 1 S 1 1
150.024 S 1 1 0 0 1 S 1 1 -150.024 S 1 1 0 0 1 S 1 1 567.036 S 1 1 343.118
0 1 S 1 1 0 S 1 1 -85.412 0 1 S 1 1 0 S 1 1 85.412 0 1 S 1 1 567.036 S 1 1
86.882 0 1 S 1 1 -150.024 S 1 1 0 0 1 S 1 1 150.024 S 1 1 0 0 1 S 1 1
116.964 S 1 1 86.882 0 1 S 1 1 0 S 1 1 85.412 0
}
CubicCurve: "" {
Type: 0 Flag: 8192 Dim: 2
NumOfPoints: 12
1 S 1 1 0 S 1 1 -85.412 0 1 S 1 1 0 S 1 1 0 0 1 S 1 1 150.024 S 1 1 0
0 1 S 1 1 -150.024 S 1 1 0 0 1 S 1 1 0 S 1 1 0 0 1 S 1 1 0 S 1 1 -85.412 0
1 S 1 1 0 S 1 1 85.412 0 1 S 1 1 0 S 1 1 0 0 1 S 1 1 -150.024 S 1 1 0 0 1 S
1 1 150.024 S 1 1 0 0 1 S 1 1 0 S 1 1 0 0 1 S 1 1 0 S 1 1 85.412 0
}
NumOfAttributes: 44
"vis" S 0 1 "r" S 0 0.039 "g" S 0 0.039 "b" S 0 0.039 "a" S 0 1 "ro" S
0 0 "go" S 0 0 "bo" S 0 0 "ao" S 0 0 "opc" S 0 1 "bm" S 0 0 "inv" S 0 0
"mbo" S 0 0 "mb" S 0 1 "mbs" S 0 0.5 "mbsot" S 0 0 "mbso" S 0 0 "fo" S 0 1
"fx" S 0 0 "fy" S 0 0 "ff" S 0 1 "ft" S 0 0 "src" S 0 0 "stx" S 0 0 "sty" S
0 0 "str" S 0 0 "sr" S 0 0 "ssx" S 0 1 "ssy" S 0 1 "ss" S 0 0 "spx" S 0
1120 "spy" S 0 480 "stot" S 0 0 "sto" S 0 0 "sv" S 0 0 "sf" S 0 1 "sb" S 0
1 "nv" S 0 2 "view1" S 0 1 "view2" S 0 2 "ltn" S 0 1 "ltm" S 0 1 "ltt" S 0
0 "tt" S 0 7
}
}
NumOfChildren: 0
}
}
}
}
toolbox {selectAll {
{ selectAll ssx 1 ssy 1 sf 1 }
{ createBezier ssx 1 ssy 1 sf 1 sb 1 tt 4 }
{ createBSpline ssx 1 ssy 1 sf 1 sb 1 }
{ createEllipse ssx 1 ssy 1 sf 1 sb 1 }
{ createRectangle ssx 1 ssy 1 sf 1 sb 1 tt 7 }
{ brush ssx 1 ssy 1 sf 1 sb 1 }
{ eraser src 2 ssx 1 ssy 1 sf 1 sb 1 }
{ clone src 1 ssx 1 ssy 1 sf 1 sb 1 }
{ reveal src 3 ssx 1 ssy 1 sf 1 sb 1 }
{ dodge src 1 ssx 1 ssy 1 sf 1 sb 1 }
{ burn src 1 ssx 1 ssy 1 sf 1 sb 1 }
{ blur src 1 ssx 1 ssy 1 sf 1 sb 1 }
{ sharpen src 1 ssx 1 ssy 1 sf 1 sb 1 }
{ smear src 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
toolbar_brush_hardness 0.200000003
toolbar_lifetime_type all
toolbar_source_transform_scale {1 1}
toolbar_source_transform_center {320 240}
color {0.0390000008 0.0390000008 0.0390000008 1}
colorOverlay 0
lifetime_type "all frames"
motionblur_shutter_offset_type centred
source_black_outside true
name Roto1
selected true
xpos -402
ypos 32
}
Text {
message "XY - \[value distance_between_2_points.translate.x]\nX - \[value
x_y_distances.translate.x]\nY - \[value x_y_distances.translate.y]"
font /usr/share/fonts/bitstream-vera/Vera.ttf
size 76
xjustify center
yjustify center
box {560 240 1680 720}
translate {-776 -266}
center {1120 480}
name Text1
selected true
xpos -402
ypos 60
}
add_layer {rgb rgb.red rgb.green rgb.blue}
Constant {
inputs 0
channels rgb
name Constant1
selected true
xpos -718
ypos -240
disable true
}
set N18fa8d10 [stack 0]
Position {
translate {816 696}
name Position2
selected true
xpos -767
ypos -141
}
push $N18fa8d10
Position {
translate {1558 508}
name Position1
selected true
xpos -664
ypos -143
}
Merge2 {
inputs 2
name Merge1
selected true
xpos -743
ypos -47
}
Input {
inputs 0
name Input1
selected true
xpos -546
ypos -358
}
Merge2 {
inputs 2
name Merge2
selected true
xpos -546
ypos -55
}
Transform {
translate {{"int(sqrt(((Position1.translate.x -
Position2.translate.x)*(Position1.translate.x - Position2.translate.x)) +
((Position1.translate.y - Position2.translate.y)*(Position1.translate.y -
Position2.translate.y))))" i} {curve i}}
center {1120 480}
name distance_between_2_points
selected true
xpos -546
ypos -27
disable true
}
Transform {
translate {{abs(Position1.translate.x-Position2.translate.x) i}
{abs(Position1.translate.y-Position2.translate.y) i}}
center {1120 480}
name x_y_distances
selected true
xpos -546
ypos 1
disable true
}
Merge2 {
inputs 2
mix 0.875
name Merge3
selected true
xpos -546
ypos 143
}
set N17dee5e0 [stack 0]
Output {
name Output1
selected true
xpos -546
ypos 211
}
push $N17dee5e0
Viewer {
input_process false
near 1
far 100000
name Viewer1
selected true
xpos -573
ypos 270
}
pat
On 15 November 2011 15:39, John Mangia <[email protected]> wrote:
> 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
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users