-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edit Points class #13
base: master
Are you sure you want to change the base?
Conversation
simple class for points.
def __init__(self, *args, **kwargs): | ||
super(Points, self).__init__(*args, **kwargs) | ||
|
||
def set_positions(self, *args): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see Xform.set_scale, https://github.com/alembic/cask/blob/master/cask.py#L1617
This should probably accept both a V3fArray or a list of values, and check the type.
def set_positions(self, *args): | |
def set_positions(self, positions): |
# print content | ||
positions = imath.V3fArray(len(content)) | ||
ids = imath.IntArray(len(content)) | ||
for i in range(0, len(content)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can then enumerate on the positions to get the id,
for i in range(0, len(content)): | |
for i, position in enumerate(positions): |
|
||
def set_positions(self, *args): | ||
content = args[0] | ||
# print content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
simple class for points.