hi,
regarding Houdini stuff recently i have an practice with alembic workflow from 3dsmax to houdini. And i get lost when i try to extract orientation form that in order to use it like an point template to use with copysop. i write a little bit of python code to extract the transform data but when i try to turn it into orientation via atributeVop it only transfer one transform i think the problem regarding to @ptnum but i dont know how to do it right now...

any idea? thank in advance!

here is a simple python code to extract the transform data
Code: Select all
import _alembic_hom_extensions as abc
node = hou.pwd()
geo = node.geometry()
# Add code to modify contents of geo.
# Use drop down menu to select examples.
abcPath = "D:/thuy_max/00_max/export/OBJ/soleil/SOLEIL_LOCATION_thuy_00_export/test.abc"
sampleTime = 1
x4_attrib = geo.addAttrib(hou.attribType.Point, "m4", ( 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0))
x3_attrib = geo.addAttrib(hou.attribType.Point, "m3", ( 0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0 ))
ori_attrib = geo.addAttrib(hou.attribType.Point, "ori",( 0.0, 0.0, 0.0 ))
for prim, point in zip(geo.prims(), geo.points()):
objectPath = prim.attribValue("path")
abcXform = abc.getLocalXform(abcPath, objectPath, sampleTime)[0]
x4 = hou.Matrix4(abcXform)
x3 = x4.extractRotationMatrix3()
srt = x4.explode(pivot = point.position())
point.setAttribValue(x4_attrib, x4.asTuple())
point.setAttribValue(ori_attrib, srt["rotate"])
print srt["rotate"]