Jump to content

AlembicArchive very slow update from python code


Recommended Posts

Hi, guys. I have serious problem with alembic.

1. It is AlembicArchive object node with heavy geometry

2. If I press button "Build or Update Hierarchy" it updates very fast

3. But if I want update in my python code - it is very slow

It behaves equally if I call function, for example:

node=hou.node('/obj/alembicarchive1'); node.hdaModule().BuildHierarchyRoot(node)[/CODE]

or press button in my code:

[CODE]hou.node('/obj/alembicarchive1').parm('buildHierarchy').pressButton()[/CODE]

It updates very slowly.

I think it is problem with hom implementation or _alembic_hom_extension module that AlembicArchive used.

How do you think???

Link to comment
Share on other sites

Simple example. This is my asset:

2013_02_27_191714_1600x900_scrot.jpg

If i press butoon Test - it works well. But if I write something like: hou.node('/obj/myasset').parm('Test').pressButton() - it works very slow. Why ?

What I`m doing wrong?

Good question. Offhand, it doesn't look like you're doing anything wrong but I haven't tried to replicate your test. Are you testing with that pressButton() call from the Python Shell window? Maybe it's particular to that. Perhaps try using "opparm -c /obj/myasset Test ( 1 )" in the Hscript Textport to see if it's also as slow.

One other idea is to try turning undo's off in the Hscript Textport by running "undoctrl off" .. (remember to turn it back on! :) ... and see if there's any speed difference.

Link to comment
Share on other sites

Good question. Offhand, it doesn't look like you're doing anything wrong but I haven't tried to replicate your test. Are you testing with that pressButton() call from the Python Shell window? Maybe it's particular to that. Perhaps try using "opparm -c /obj/myasset Test ( 1 )" in the Hscript Textport to see if it's also as slow.

One other idea is to try turning undo's off in the Hscript Textport by running "undoctrl off" .. (remember to turn it back on! :) ... and see if there's any speed difference.

Yes. with hscript it works well, but not from python. And its not only from Python shell, but also from scripts. As i understand, any function in hdaModule called outside from asset, works slow. Sometimes i need call python functions of asset from different places - pythonShell \ functions in other sub assets etc. :blink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...