Use Attributes to update a surface shape's 3d view representation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Problem:
I am trying to work out how to alter the 3DView representation of an MPxSurfaceShape derived custom object. In this case a cameras bounding frustrum. It should work like the Grid helper model shown via Show->Grid option, which isn't selectable or affected in any way other than through some preference width/height attributes.
Attempt 1:
Altering MPxSurfaceShape::mControlPoints directly via a set of custom attributes.
The control points should be alterable using custom attributes width, height, near and far clip planes.
I am able to get the SetDependentsDirty to trigger when I change one of the attributes, I then mark the mControlPoints as being affected by this change. At this point I cannot get the compute method to fire, the compute method being the place I update the mControlPoints with the offsets from the updated attributes.
Do I need to manually mark the mControlPoints as being dirty somehow, as well as adding it into the affectedPlugs in the setDependentsDirty call?
Attempt 2:
I am in the process of creating a deformer. This seems like overkill for a shape whose 3D model I am not going to allow the user to manipulate in any other way than through the shape custom attributes. i.e. its a static helper shape.
Can anyone clue me in to the best way to go about editing my shapes 3d view.
Thanks.