I create a python type Digital Assets
I want to use python to copy input geometry some times like COPY SOP.
But I can't find the right method in hou.Geometry class.
Please help,so thanks . :roll:
How to copy geometry in python?
5913 5 0- 达 风
- Member
- 7 posts
- Joined: 10月 2013
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: 11月 2008
- Offline
- 达 风
- Member
- 7 posts
- Joined: 10月 2013
- Offline
- 达 风
- Member
- 7 posts
- Joined: 10月 2013
- Offline
Stalkerx777
In Python SOP:
this_geo = node.geometry()
source_geo = get_geometry_somewhere()
for i in range(10):
new_geo = hou.Geometry()
new_geo.merge(source_geo)
# Do something with new_geo
this_geo.merge(new_geo)
Yes,I can use merge method to copy other sop into it.
But I have new problem.
Box —-> My Python Copy SOP
How can I realize the copy Box some times and Create Output Groups function?
=====================
And can I read the Copy SOP source,then I can get more information?
- Stalkerx777
- Member
- 183 posts
- Joined: 11月 2008
- Offline
- 达 风
- Member
- 7 posts
- Joined: 10月 2013
- Offline
Stalkerx777
grp = geo.createPrimGroup('mygroup')
grp.add(prim)
thanks.but this is not perfect
grp.add(self.prims())
this method can merge itself.
but run this method again,will get four times
I want to get three times or five times.
this method can't do it.
I want copy original prims with the special number and ,put the output to a new group,like Copy SOP in python
-
- Quick Links