Skip to content

Fix for exception when modifying extents#330

Merged
prabhuramachandran merged 5 commits into
masterfrom
37-fix-for-actor
Apr 20, 2016
Merged

Fix for exception when modifying extents#330
prabhuramachandran merged 5 commits into
masterfrom
37-fix-for-actor

Conversation

@stefanoborini
Copy link
Copy Markdown
Contributor

Fixes #37

Comment thread mayavi/tools/tools.py Outdated
extentz = 0.5 * (zmax - zmin)
# Now the actual bounds.
xmin, xmax, ymin, ymax, zmin, zmax = module.actor.actor.bounds
xmin, xmax, ymin, ymax, zmin, zmax = module.actor.bounds
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will need to be conditional. For example one could do the following:

actor = getattr(module.actor, 'actor', module.actor)

and then use actor.bounds etc. The reason is that in some cases the module.actor may not be an image actor, so one should test that for the case when the object is not an Image actor that it continues to work.

Comment thread mayavi/tools/tools.py Outdated
scalez = 1

module.actor.actor.scale = (scalex, scaley, scalez)
module.actor.scale = (scalex, scaley, scalez)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actor.scale = (scalex, scaley, scalez)?

@stefanoborini
Copy link
Copy Markdown
Contributor Author

@prabhuramachandran @kitchoi can I merge?

@prabhuramachandran
Copy link
Copy Markdown
Member

LGTM. Sorry for the delay, can you resolve the conflicts and I will merge it right away.

@kitchoi
Copy link
Copy Markdown
Contributor

kitchoi commented Apr 20, 2016

@stefanoborini I can take this over if you're busy with other stuff?

@stefanoborini
Copy link
Copy Markdown
Contributor Author

@kitchoi No I'll do it

@prabhuramachandran
Copy link
Copy Markdown
Member

Thanks!

@prabhuramachandran prabhuramachandran merged commit ce21cfe into master Apr 20, 2016
@prabhuramachandran prabhuramachandran deleted the 37-fix-for-actor branch April 20, 2016 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants