Skip to content

Commit

Permalink
updated extract attrs fulltransform mode to behave a little better, u…
Browse files Browse the repository at this point in the history
…pdated help
  • Loading branch information
toadstorm committed Dec 8, 2020
1 parent 33ef421 commit ce25b20
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion otls/MOPS_extractAttributes.hda/INDEX__SECTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Inputs: 1 to 1
Subnet: true
Python: false
Empty: false
Modified: Mon Dec 7 14:51:32 2020
Modified: Tue Dec 8 10:27:02 2020

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ Content-Type: text/plain

sopflags sopflags =
comment ""
position 4.00329 -9.36553
position -13.3944 -12.3368
connectornextid 2
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
flags = lock off model off template on footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
outputsNamed3
{
0 "output1"
}
inputsNamed3
{
1 dopnet1 2 1 "input1"
1 MOPs_Align 1 1 "input1"
}
inputs
{
0 dopnet1 0 1
0 MOPs_Align 0 1
}
stat
{
create 1607302183
modify 1607381490
create 1607451266
modify 1607452015
author Henry@GlaDOS
access 0777
}
Expand Down Expand Up @@ -108,7 +108,7 @@ inputs
stat
{
create 1524695134
modify 1607302193
modify 1607451267
author Henry@LAPPY586
access 0777
}
Expand Down Expand Up @@ -402,7 +402,7 @@ inputs
stat
{
create 1583522390
modify 1607302824
modify 1607451709
author Henry@LAPPY586
access 0777
}
Expand Down Expand Up @@ -645,6 +645,10 @@ if(type == \"PackedGeometry\" || type == \"PackedFragment\" || type == \"PackedD
// if full transform extraction is enabled, get that instead of transform
i@__haspackedtransform = 1;
matrix3 m = primintrinsic(0, \"transform\", @elemnum);
if(chi(\"do_full_transform\")) {
matrix m4 = primintrinsic(0, \"packedfulltransform\", @elemnum);
m = matrix3(m4);
}
vector scale = cracktransform(0,0,2,{0,0,0},m);
vector4 orient = quaternion(m);
p@orient = orient;
Expand All @@ -660,7 +664,7 @@ if(type == \"PackedGeometry\" || type == \"PackedFragment\" || type == \"PackedD
}
}
v@scale = scale;
if(chi(\"do_pivot\") && !chi(\"do_full_transform\")) {
if(chi(\"do_pivot\")) {
v@pivot = primintrinsic(0, \"pivot\", @elemnum);
}
}
Expand Down Expand Up @@ -726,7 +730,7 @@ inputs
stat
{
create 1584916562
modify 1607302831
modify 1607451267
author Henry@LAPPY586
access 0777
}
Expand Down Expand Up @@ -796,7 +800,7 @@ sopflags sopflags =
comment ""
position 4.80944 -1.88223
connectornextid 2
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
flags = lock off model off template off footprint off xray off bypass on display off render off highlight off unload off savedata off compress on colordefault on exposed on
outputsNamed3
{
1 "output1"
Expand All @@ -812,7 +816,7 @@ inputs
stat
{
create 1607302831
modify 1607303121
modify 1607451598
author Henry@GlaDOS
access 0777
}
Expand Down Expand Up @@ -1037,7 +1041,7 @@ vex_inplace [ 0 locks=0 ] ( "off" )
vex_selectiongroup [ 0 locks=0 ] ( "" )
vex_precision [ 0 locks=0 ] ( auto )
folder1 [ 0 locks=0 ] ( 0 0 )
do_full_transform [ 8 locks=0 ] ( [ do_full_transform 0 ] )
do_full_transform [ 8 locks=0 ] ( [ do_full_transform 1 ] )
}

--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY
Expand Down Expand Up @@ -1084,7 +1088,7 @@ inputs
stat
{
create 1542257157
modify 1607302184
modify 1607451267
author Henry@LAPPY586
access 0777
}
Expand Down Expand Up @@ -1132,7 +1136,7 @@ Content-Type: text/plain

{
version 0.8
input [ 8 locks=0 ] ( [ input 0 ] )
input [ 8 locks=0 ] ( [ input 1 ] )
spare_input0 [ 0 locks=0 ] ( ../INPUT )
}

Expand Down Expand Up @@ -1440,7 +1444,7 @@ inputs
stat
{
create 1550365152
modify 1607314336
modify 1607451267
author Henry@LAPPY586
access 0777
}
Expand Down Expand Up @@ -1647,7 +1651,7 @@ inputs
stat
{
create 1584916552
modify 1607302831
modify 1607451267
author Henry@LAPPY586
access 0777
}
Expand Down Expand Up @@ -1703,7 +1707,7 @@ Content-Type: text/plain

sopflags sopflags =
comment ""
position 2.49722 -2.95642
position 2.10931 -2.91948
connectornextid 3
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
outputsNamed3
Expand All @@ -1723,7 +1727,7 @@ inputs
stat
{
create 1585514990
modify 1607302832
modify 1607451423
author Henry@LAPPY586
access 0777
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
label "Extract Pivot"
type toggle
default { "1" }
disablewhen "{ do_full_transform == 1 }"
range { 0! 10 }
parmtag { "autoscope" "0000000000000000" }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ The extracted attributes are written directly to the points representing the pac

This operator generates the following point attributes: p@orient, v@scale, v@N, v@up, v@pivot

NOTE:
If your pivots don't match between this geometry and your destination geometry, you should generally enable "Extract Full Transform" and then disable "Use Pivots" on any following MOPs Apply Attributes node. This is due to the pivots shifting during simulations and as a part of the center-of-mass calculations in the solve.

@inputs

Input MOPs Primitives:
Expand All @@ -30,7 +27,7 @@ Extract MOPs Orient:

Extract Full Transform:
#id: do_full_transform
Extract the `packedfulltransform` intrinsic rather than the `transform` intrinsic. This is often necessary if you're trying to extract the transforms of something with different pivots from your destination geometry, or a packed Alembic from disk rather than regular Houdini packed primitives.
Extract the `packedfulltransform` intrinsic rather than the `transform` intrinsic. This is often necessary if you're trying to extract the transforms of packed Alembics from disk rather than regular Houdini packed primitives.

Simplify Scale:
#id: simplify_scale
Expand Down

0 comments on commit ce25b20

Please sign in to comment.