Skip to content

Commit d4e2ab0

Browse files
committed
[UPDATE] *Straighten SOP* can now export transform values to be restored later
1 parent 27b0c89 commit d4e2ab0

File tree

3 files changed

+74
-28
lines changed

3 files changed

+74
-28
lines changed

otls/sop_straighten.hda/INDEX__SECTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Inputs: 1 to 1
1010
Subnet: true
1111
Python: false
1212
Empty: false
13-
Modified: Tue Oct 15 11:07:44 2019
13+
Modified: Wed Nov 20 20:55:40 2019
1414

otls/sop_straighten.hda/gamedev_8_8Sop_1sop__straighten/Contents.dir/Contents.mime

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,25 @@ Content-Type: text/plain
2020

2121
sopflags sopflags =
2222
comment ""
23-
position -2.29231 -5.50559
24-
connectornextid 1
25-
flags = lock off model off template on footprint off xray off bypass off display on render on highlight off unload off savedata off compress on colordefault on exposed on
23+
position -9.582 2.7023
24+
connectornextid 2
25+
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
2626
outputsNamed3
2727
{
28+
1 "output1"
2829
}
2930
inputsNamed3
3031
{
31-
0 group2 1 1 "input1"
32+
0 testgeometry_pighead1 0 1 "input1"
3233
}
3334
inputs
3435
{
35-
0 group2 0 1
36+
0 testgeometry_pighead1 0 1
3637
}
3738
stat
3839
{
39-
create 1571150558
40-
modify 1571152036
40+
create 1574301145
41+
modify 1574301337
4142
author MAINGEAR@DESKTOP-P98C1VA
4243
access 0777
4344
}
@@ -62,7 +63,7 @@ Content-Disposition: attachment; filename="hdaroot.inp"
6263
Content-Type: text/plain
6364

6465
1
65-
0 -1.8415964939053886 8.2428713058309313 2 0 __NO_OWNER_NETWORK_BOX__ "FROMOUTPUT"
66+
0 -2.6867357267219489 8.2831160312031482 2 0 __NO_OWNER_NETWORK_BOX__ "FROMOUTPUT"
6667

6768
--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY
6869
Content-Disposition: attachment; filename="hdaroot/blast2.init"
@@ -293,7 +294,7 @@ Content-Type: text/plain
293294

294295
sopflags sopflags =
295296
comment ""
296-
position -3.70846 4.15259
297+
position -4.35238 4.83675
297298
connectornextid 2
298299
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
299300
outputsNamed3
@@ -311,7 +312,7 @@ inputs
311312
stat
312313
{
313314
create 1524169200
314-
modify 1524181827
315+
modify 1574301333
315316
author MAINGEAR@DESKTOP-P98C1VA
316317
access 0777
317318
}
@@ -343,6 +344,13 @@ Content-Type: text/plain
343344
flags = 0
344345
segment { length = 0 expr = "explodematrix(dihedral(vector3(detail(\"../attribpromote1\", \"N\",0),detail(\"../attribpromote1\", \"N\",1),detail(\"../attribpromote1\", \"N\",2)),vector3(0,1,0)), \"SRT\", \"XYZ\", \"RZ\")" }
345346
}
347+
channel addattrib {
348+
lefttype = extend
349+
righttype = extend
350+
default = 1
351+
flags = 0
352+
segment { length = 0 value = 1 1 expr = ch(\"../addattrib\") }
353+
}
346354
}
347355

348356
--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY
@@ -356,7 +364,7 @@ grouptype [ 0 locks=0 ] ( "guess" )
356364
xOrd [ 0 locks=0 ] ( "srt" )
357365
rOrd [ 0 locks=0 ] ( "xyz" )
358366
t [ 0 locks=0 ] ( 0 0 0 )
359-
r [ 8 locks=0 ] ( [ rx -6.3570232043949266 ] [ ry 0.094649701675052211 ] [ rz 1.7042777914987048 ] )
367+
r [ 8 locks=0 ] ( [ rx -8.7886138506050564 ] [ ry -3.5463527374956634 ] [ rz -43.884464472968034 ] )
360368
s [ 0 locks=0 ] ( 1 1 1 )
361369
shear [ 8 locks=0 ] ( 0 0 0 )
362370
scale [ 0 locks=0 ] ( 1 )
@@ -376,8 +384,8 @@ updatenmls [ 0 locks=0 ] ( "off" )
376384
updateaffectednmls [ 0 locks=0 ] ( "on" )
377385
vlength [ 0 locks=0 ] ( "on" )
378386
invertxform [ 0 locks=0 ] ( "off" )
379-
addattrib [ 0 locks=0 ] ( "off" )
380-
outputattrib [ 0 locks=0 ] ( xform )
387+
addattrib [ 8 locks=0 ] ( [ addattrib 1 ] )
388+
outputattrib [ 0 locks=0 ] ( `chs(\"../outputattrib\")` )
381389
outputmerge [ 0 locks=0 ] ( "post" )
382390
}
383391

@@ -405,7 +413,7 @@ Content-Type: text/plain
405413

406414
sopflags sopflags =
407415
comment ""
408-
position -1.13988 0.99212
416+
position -2.11009 0.56955
409417
connectornextid 2
410418
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
411419
outputsNamed3
@@ -423,7 +431,7 @@ inputs
423431
stat
424432
{
425433
create 1524169200
426-
modify 1524181830
434+
modify 1574301283
427435
author MAINGEAR@DESKTOP-P98C1VA
428436
access 0777
429437
}
@@ -443,6 +451,20 @@ Content-Type: text/plain
443451
flags = 0
444452
segment { length = 0 expr = "explodematrix(dihedral(vector3(detail(\"../attribpromote2\", \"N\",0),detail(\"../attribpromote2\", \"N\",1),detail(\"../attribpromote2\", \"N\",2)),vector3(1,0,0)), \"SRT\", \"XYZ\", \"RY\")" }
445453
}
454+
channel outputattrib {
455+
lefttype = extend
456+
righttype = extend
457+
defaultString = \"xform\"
458+
flags = 0
459+
segment { length = 0 expr = chs(\"../outputattrib\") }
460+
}
461+
channel addattrib {
462+
lefttype = extend
463+
righttype = extend
464+
default = 1
465+
flags = 0
466+
segment { length = 0 value = 1 1 expr = ch(\"../addattrib\") }
467+
}
446468
}
447469

448470
--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY
@@ -456,7 +478,7 @@ grouptype [ 0 locks=0 ] ( "guess" )
456478
xOrd [ 0 locks=0 ] ( "srt" )
457479
rOrd [ 0 locks=0 ] ( "xyz" )
458480
t [ 0 locks=0 ] ( 0 0 0 )
459-
r [ 8 locks=0 ] ( 0 [ ry -266.93287786029765 ] 0 )
481+
r [ 8 locks=0 ] ( 0 [ ry -261.64067770240115 ] 0 )
460482
s [ 0 locks=0 ] ( 1 1 1 )
461483
shear [ 8 locks=0 ] ( 0 0 0 )
462484
scale [ 0 locks=0 ] ( 1 )
@@ -476,8 +498,8 @@ updatenmls [ 0 locks=0 ] ( "off" )
476498
updateaffectednmls [ 0 locks=0 ] ( "on" )
477499
vlength [ 0 locks=0 ] ( "on" )
478500
invertxform [ 0 locks=0 ] ( "off" )
479-
addattrib [ 0 locks=0 ] ( "off" )
480-
outputattrib [ 0 locks=0 ] ( xform )
501+
addattrib [ 0 locks=0 ] ( [ addattrib 1 ] )
502+
outputattrib [ 0 locks=0 ] ( [ outputattrib xform ] )
481503
outputmerge [ 0 locks=0 ] ( "post" )
482504
}
483505

@@ -708,7 +730,7 @@ Content-Type: text/plain
708730

709731
sopflags sopflags =
710732
comment ""
711-
position -2.57391 -1.25692
733+
position -3.29832 -1.31729
712734
connectornextid 3
713735
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
714736
outputsNamed3
@@ -728,7 +750,7 @@ inputs
728750
stat
729751
{
730752
create 1524181050
731-
modify 1543600193
753+
modify 1574301176
732754
author MAINGEAR@DESKTOP-P98C1VA
733755
access 0777
734756
}
@@ -784,7 +806,7 @@ Content-Type: text/plain
784806

785807
sopflags sopflags =
786808
comment ""
787-
position -2.57391 -3.22662
809+
position -3.29832 -3.22662
788810
connectornextid 1
789811
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
790812
outputsNamed3
@@ -801,7 +823,7 @@ inputs
801823
stat
802824
{
803825
create 1524181056
804-
modify 1524181074
826+
modify 1574301179
805827
author MAINGEAR@DESKTOP-P98C1VA
806828
access 0777
807829
}
@@ -918,7 +940,7 @@ Content-Type: text/plain
918940

919941
sopflags sopflags =
920942
comment ""
921-
position -1.62715 4.02926
943+
position -1.64727 4.83675
922944
connectornextid 2
923945
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
924946
outputsNamed3
@@ -936,7 +958,7 @@ inputs
936958
stat
937959
{
938960
create 1524169200
939-
modify 1524181860
961+
modify 1574301329
940962
author MAINGEAR@DESKTOP-P98C1VA
941963
access 0777
942964
}
@@ -968,6 +990,13 @@ Content-Type: text/plain
968990
flags = 0
969991
segment { length = 0 expr = "explodematrix(dihedral(vector3(detail(\"../attribpromote1\", \"N\",0),detail(\"../attribpromote1\", \"N\",1),detail(\"../attribpromote1\", \"N\",2)),vector3(0,-1,0)), \"SRT\", \"XYZ\", \"RZ\")" }
970992
}
993+
channel addattrib {
994+
lefttype = extend
995+
righttype = extend
996+
default = 1
997+
flags = 0
998+
segment { length = 0 value = 1 1 expr = ch(\"../addattrib\") }
999+
}
9711000
}
9721001

9731002
--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY
@@ -981,7 +1010,7 @@ grouptype [ 0 locks=0 ] ( "guess" )
9811010
xOrd [ 0 locks=0 ] ( "srt" )
9821011
rOrd [ 0 locks=0 ] ( "xyz" )
9831012
t [ 0 locks=0 ] ( 0 0 0 )
984-
r [ 8 locks=0 ] ( [ rx -192.70707285344548 ] [ ry -197.89267838879007 ] [ rz -70.54380620550539 ] )
1013+
r [ 8 locks=0 ] ( [ rx -170.59814728950425 ] [ ry -158.98941438194944 ] [ rz -47.82992231566066 ] )
9851014
s [ 0 locks=0 ] ( 1 1 1 )
9861015
shear [ 8 locks=0 ] ( 0 0 0 )
9871016
scale [ 0 locks=0 ] ( 1 )
@@ -1001,8 +1030,8 @@ updatenmls [ 0 locks=0 ] ( "off" )
10011030
updateaffectednmls [ 0 locks=0 ] ( "on" )
10021031
vlength [ 0 locks=0 ] ( "on" )
10031032
invertxform [ 0 locks=0 ] ( "off" )
1004-
addattrib [ 0 locks=0 ] ( "off" )
1005-
outputattrib [ 0 locks=0 ] ( xform )
1033+
addattrib [ 8 locks=0 ] ( [ addattrib 0 ] )
1034+
outputattrib [ 0 locks=0 ] ( `chs(\"../outputattrib\")` )
10061035
outputmerge [ 0 locks=0 ] ( "post" )
10071036
}
10081037

otls/sop_straighten.hda/gamedev_8_8Sop_1sop__straighten/DialogScript

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,21 @@
111111
parmtag { "script_action_help" "Select geometry from an available viewport.\nShift-click to turn on Select Groups." }
112112
parmtag { "script_action_icon" "BUTTONS_reselect" }
113113
}
114+
parm {
115+
name "addattrib"
116+
label "Output Attribute"
117+
type toggle
118+
joinnext
119+
default { "off" }
120+
parmtag { "autoscope" "0000000000000000" }
121+
}
122+
parm {
123+
name "outputattrib"
124+
label "Output Attribute"
125+
type string
126+
nolabel
127+
default { "xform" }
128+
disablewhen "{ addattrib == 0 }"
129+
parmtag { "autoscope" "0000000000000000" }
130+
}
114131
}

0 commit comments

Comments
 (0)