enthought / ensemble

High-level widgets for building Python applications
Other
4 stars 7 forks source link

"Gaussian" CTF nodes #29

Closed jwiggins closed 9 years ago

jwiggins commented 9 years ago

This is done enough to make it available to other projects. I'm still planning on making this actually evaluate a Gaussian for the opacity values.

noraderam commented 9 years ago

I tried testing this out on the examples, but when I try to add a Gaussian, this happens:

Traceback (most recent call last):
  File "/Users/nderam/Code/pyface/pyface/ui/qt4/action/action_item.py", line 163, in _qt4_on_triggered
    self.controller.perform(action, action_event)
  File "/Users/nderam/Code/ETS/enable/enable/tools/pyface/context_menu_tool.py", line 36, in perform
    return action.perform(event)
  File "/Users/nderam/Code/ETS/ensemble/ensemble/ctf/editor.py", line 37, in perform
    self.perform_with_color(event, color)
  File "/Users/nderam/Code/ETS/ensemble/ensemble/ctf/editor.py", line 64, in perform_with_color
    opacity_node=opacity_node)
  File "/Users/nderam/Code/ETS/ensemble/ensemble/ctf/gaussian_function_component.py", line 122, in __init__
    self.node.sync_trait('center', self.opacity_node)
AttributeError: 'NoneType' object has no attribute 'sync_trait'
jwiggins commented 9 years ago

Yeah... missed a spot when I was moving some code around.

noraderam commented 9 years ago

:heart_eyes: This is awesome

noraderam commented 9 years ago

Ok, I've read through this all once. Based on the time constraints, I'm ready to merge whenever @tonysyu is.

tonysyu commented 9 years ago

I only glanced at, but probably won't put much more time into it. Feel free to merge whenever.