Jump to content

Simple Copy Of Objects


andrewlowell

Recommended Posts

Ok, so I just want to replicate the CTRL+C CTRL+V thing .. is there a way to do this without creating a big array of parameters, creating the object, and then looping through and setting all the parameters? I'm not seeing anything like a simple copy operation. (hou Python)

Link to comment
Share on other sites

ok, got it ... copyNodesTo ... but what about a single object? Does if have to be defined as a tuple like

mytuple = (hou.node('obj/myteapot'),)

does anyone know how to get this to run from a function in a DA though, when I run it from the python shell it copies fine, when I run it from a function / callback on a button from a DA it gives me this ...

post-3343-1201952959_thumb.jpg

Link to comment
Share on other sites

ah ha, I got it ... thanks Edward!

I guess when running from the shell you don't need to use the / when referencing /obj ... is that because the shell assumes that's where you're relative to?

but with a DA you need to use the '/obj'

If it runs fine in the python shell but not from a DA, then you probably don't have the right cwd/pwd.
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...