Cortex  10.0.0-a4
Todo List
Member IECore.cat (sequence)
Allow destination file to be specified
Class IECore.MenuItemDefinition
Validation of attribute values, so for instance divider and command can't both be set at the same time.
Class IECore.RelativePreset
Consider adding a protected member that is responsible for that comparison and enable derived classes to do other kinds of comparisons, for example, using additional parameters such as user labels.
Class IECore::AttributeState
Make order of rendering match order of addition - there are cases where 3delight cares very much what order attributes are specified in (subsurface attributes in particular).
Member IECore::BoundedKDTree< BoundIterator >::intersectingBounds (const S &b, std::vector< BoundIterator > &bounds) const
There should be a form where nearNeighbours is an output iterator, to allow any container to be filled.
Class IECore::CachedReader

We probably need a way of setting parameters for the Readers, and treating reads with different parameters as different entities in the cache.

Stats on cache misses etc.

Can we do something to make sure that two paths to the same file (symlinks) result in only a single cache entry?

Member IECore::CameraController::setResolution (const Imath::V2i &resolution)
Remove this form, and add a default value for adjustment in the form below.
Member IECore::CameraController::unproject (const Imath::V2f rasterPosition, Imath::V3f &near, Imath::V3f &far)
Accept a V2f to provide extra precision and make this method const.
Member IECore::CapturingRenderer::world ()
If we had a class for representing whole Scenes (including stuff before worldBegin) then we could have a scene() method instead.
Member IECore::convert (const F &from)
Could this be declared static inline?
Member IECore::CurvesPrimitiveEvaluator::create (ConstPrimitivePtr primitive)
It would be much better if PrimitiveEvaluator::Description didn't require these create() functions and instead just called the constructors that have to exist anyway.
Class IECore::FileSequenceVectorParameter
Have this support the specification of frame ranges as well (in a form like "fileName.#.ext 1-20") This should be pretty easy to achieve as the FrameList class already defines the serialisation and parsing for frame ranges.
Member IECore::Group::Group ()
Add a constructor taking a list of children and state and an optional transform, and bind it.
Class IECore::IFFFile::Chunk
: the current implementation only supports reading. It may not be well suited for writing.
Member IECore::InternedString::operator< (const InternedString &other) const
: Several use cases would benefit from sorting by string value here. Investigate ways of making these comparisons by string value, while maintaining constant-time complexity.
Member IECore::KDTree< PointIterator >::nearestNeighbours (const Point &p, BaseType r, std::vector< PointIterator > &nearNeighbours) const
There should be a form where nearNeighbours is an output iterator, to allow any container to be filled. See enclosedPoints for an example of this form.
Threading:
May be called by multiple concurrent threads provided they are each using a different vector for the result.
Class IECore::LevenbergMarquardt< T, ErrorFn, Traits >

Use max iterations instead of maxCalls on the error function.

No need for TypedData. Template on vector iterators instead.

Consider to pass the parameter changed when building the Jacobian. Most of the problems would not affect all the outputs when just one parameter changes. Some space for considerable optimization there.

Member IECore::Light::parametersData ()
: Should return raw pointer to CompoundData, and we should probably remove the parameters() methods since the helper methods on ParametersData make it more useful
Member IECore::MeshPrimitive::createBox (const Imath::Box3f &b)
Add subdivisions and texture coordinates.
Class IECore::MeshPrimitiveBuilder
This is too specific to MarchingCubes. Some algorithms want to make faces other than triangles, and some algorithms don't want to supply normals.
Class IECore::MurmurHash
Deal with endian-ness.
Class IECore::NURBSPrimitive
createPlane, createSphere static member functions
Member IECore::NURBSPrimitive::setTopology (int uOrder, ConstFloatVectorDataPtr uKnot, float uMin, float uMax, int vOrder, ConstFloatVectorDataPtr vKnot, float vMin, float vMax)
Remove virtual-ness for Cortex 9.
Class IECore::Object
rename virtual functions that match non-virtual functions so that pointers to derived classes still provide access the non-virtual ones: example hash(), memoryUsage(), save().
Class IECore::Object::AbstractTypeDescription< T >
Hopefully find a way of not needing a separate class for this, but use a specialisation of TypeDescription or summink.
Member IECore::Op::doOperation (const CompoundObject *operands)=0
This should be const.
Class IECore::OversamplesCalculator
Rename to something more descriptive of its function
Class IECore::PerlinNoise< P, V, F >

4d ones

Class IECore::PointNormalsOp
This was written for a production and then never needed. The normals it produces are somewhat noisy - we could probably do with improving the process.
Member IECore::PointsPrimitiveEvaluator::create (ConstPrimitivePtr primitive)
It would be much better if PrimitiveEvaluator::Description didn't require these create() functions and instead just called the constructors that have to exist anyway.
Class IECore::Primitive
Validation of variableSizes before rendering.
Member IECore::Primitive::expandedVariableData (const std::string &name, PrimitiveVariable::Interpolation requiredInterpolation=PrimitiveVariable::Invalid) const
: Provide accessors that return an iterator range for the data, providing transparent access to the indexed data without actually copying and expanding.
Member IECore::PrimitiveEvaluator::closestPoint (const Imath::V3f &p, Result *result) const =0
Extend this to pass a maximum distance past which results are no longer interesting.
Member IECore::PrimitiveVariable::expandedData () const
: Provide accessors that return an iterator range for the data, providing transparent access to the indexed data without actually copying and expanding.
Class IECore::RefCounted
Disallow construction on the heap by having a private destructor - do we need to do this for all derived classes as well?
Member IECore::Renderer::command (const std::string &name, const CompoundDataMap &parameters)=0
Make a dedicated virtual clippingPlane() method for the next major version.
Member IECore::Renderer::editBegin (const std::string &editType, const CompoundDataMap &parameters)=0
Better define the semantics of this function as we implement it for different renderers.
Member IECore::Renderer::image (const Imath::Box2i &dataWindow, const Imath::Box2i &displayWindow, const PrimitiveVariableMap &primVars)=0
Clarify the intended use of dataWindow and displayWindow.
Member IECore::Renderer::sphere (float radius, float zMin, float zMax, float thetaMax, const PrimitiveVariableMap &primVars)=0
Give this the default values it talks about.
Class IECore::SceneInterface
Implement a TransformStack class that can represent any custom transformation that could be interpolated and consider using it here as the returned type as opposed to DataPtr.
Class IECore::SpherePrimitiveEvaluator
Currently ignores zMin, zMax, thetaMax parameters, instead assuming that there sphere is whole and facing outwards.
Class IECore::TransformationMatrix< T >
add more utility methods.
Member IECore::triangleArea (const Vec &v0, const Vec &v1, const Vec &v2)
It might be nice to make a triangle class and make these methods.
Class IECore::TriangulateOp
Currently we just do a simple "fan" across the face, but we eventually need to deal with concave polygons, polgons with holes, and non-planar polygons
Member IECoreGL::ColorTexture::ColorTexture (const IECoreImage::ImagePrimitive *image, bool mipMap)
Make all constructors take a mipMap argument with a useful default value, then remove this version.
Class IECoreGL::MeshPrimitive
Fast drawing, uvs etc. Consider using NVIDIA tristrip library? something else? GLU?
Member IECoreGL::Renderer::command (const std::string &name, const IECore::CompoundDataMap &parameters) override
Consider generalising an interface for scene edits and making it a standard part of the documentation in IECore. Any such interface should take into account support for PRMan's new rerendering API.
Member IECoreGL::Renderer::editBegin (const std::string &name, const IECore::CompoundDataMap &parameters) override
Implement the existing editing commands in this new form.
Member IECoreGL::Renderer::mesh (IECore::ConstIntVectorDataPtr vertsPerFace, IECore::ConstIntVectorDataPtr vertIds, const std::string &interpolation, const IECore::PrimitiveVariableMap &primVars) override
Support normals and st.
Member IECoreGL::Renderer::shader (const std::string &type, const std::string &name, const IECore::CompoundDataMap &parameters) override
Add support for "textureParameterName:filter" and "textureParameterName:wrap" parameters which set wrapping and filtering on a ShaderStateComponent.
Class IECoreGL::ShaderStateComponent
Allow this to specify texture filtering and wrap modes.
Class IECoreGL::StateComponent
We shouldn't be using TypeId objects for the StateComponent identifiers - we should use summink else (we need to have a Shader and a FixedShader component that both occupy the same slot).
Class IECoreGL::Texture

Provide some control over resizing (to power of 2), mipmapping, filtering etc. Rather than complicate the constructors in the subclasses we should probabaly make ToGLTextureConverters with a bunch of parameters.

Review Y axis ordering for Cortex 8 - currently a texture lookup in GLSL ends up with the image upside down from the expected, but perhaps there are other places relying on the current ordering? See TestTexture.performShaderParameterTest() for a test that should be checking this but isn't.

Class IECoreGL::TextureLoader
At some point we'll need to deal with the fact that there's limited texture memory and we can't just keep loading things forever without getting rid of something.
Member IECoreGL::TransparentShadingStateComponent
Consider also moving the following state components to Primitive header since the renderer maps then to "gl:primitive:*" Used to signify that the shading for a primitive may produce transparent values. The Renderer maps the "gl:shade:transparent" attribute directly to this state. Note that this information is provided as a separate state item rather than as a query on the Shader class as the values of variables on Primitives may change the transparency of a shader.
Member IECoreHoudini.ActiveTake.ls ()
: remove this method when the hscript take commands are available in python
Member IECoreHoudini.ActiveTake.name ()
: remove this method when the hscript take commands are available in python
Class IECoreHoudini::FnParameterisedHolder
: This class is a bit funny. Can this all be moved to the bindings like in IECoreMaya?
Member IECoreHoudini::FnParameterisedHolder::setParameterisedValues (double time)
: add setNodeValues as well
Member IECoreHoudini::GEO_CortexPrimitive::setTypeDef (GA_PrimitiveDefinition *def)
: setTypeDef is called once by the plugin. Seems quite silly to expose. Maybe we should just give up registration in the plugin and do it all here.
Member IECoreHoudini::LiveScene::readWorldTransform (double time) const
: consider making these virtual methods of SceneInterface itself
Class IECoreHoudini::MessageHandler
: make this threadsafe
Member IECoreHoudini::OBJ_SceneCacheGeometry::expandHierarchy (const IECore::SceneInterface *scene)
: do we need this extra abstraction?
Member IECoreHoudini::ParameterisedHolder< BaseType >::buildClassCategoryMenu (void *data, PRM_Name *menu, int maxSize, const PRM_SpareData *, const PRM_Parm *)
: the concept of class category is a hack to make the UI usable. remove this when Houdini supports cascading menus for parameters.
Member IECoreHoudini::ParameterisedHolder< BaseType >::setNodeValues ()
: actually implement this once parameter handling is in c++
Class IECoreMaya.DAGPathParameter
Dervive from IECoreMaya.NodeParameter
Class IECoreMaya.DAGPathParameter.CheckType
Use Enum for this
Class IECoreMaya.NodeParameter.CheckType
Use Enum for this
Class IECoreMaya.OpWindow
We need to close this window if the node is deleted - for instance when the user makes a fresh scene.
Class IECoreMaya.ParameterPanel

Reimplement this in terms of the new Panel base class.

Prefix methods which aren't intended to be public to make them either private or protected.

Class IECoreMaya.ParameterUI
Separate control drawing from labelling and layout, so these classes just create the right hand side of what they're doing at the moment. Then we can use them in different layouts like spreadsheets and wotnot.
Member IECoreMaya.ParameterUI.__init__ (self, parameterisedHolderNode, parameter, topLevelUI, kw)
Document the meaning of the various keyword arguments - perhaps the names of these should be prefixed with the name of the class which implements each argument so as to make it easier to find the documentation too.
Class IECoreMaya.PresetsUI
Currently, the LoadUI, has to instantiate every preset in the search path, and call 'applicableTo'. This is potentially a huge bottle neck, so, well see what happens when we use it in earnest...
Class IECoreMaya.ScopedSelection

Cope with objects changing names, being deleted etc - can probably do this by storing DagNode and Node objects.

This should be reimplemented as a context object called SelectionSaved to follow the model set by UndoDisabled.

Class IECoreMaya.StringVectorParameterUI
: this is incredibly similar to NumericVectorParameterUI.
Class IECoreMaya.UIElement
Preexisting ui elements should be rewritten to take advantage of this base class wherever possible.
Class IECoreMaya::CacheSet
This is an IE specific base class - remove from Cortex
Class IECoreMaya::FromMayaMeshConverter
Vertex color support. Blind data support?
Class IECoreMaya::MayaAppendIterator< T >
Should this be a member of MArrayIter?
Class IECoreMaya::ObjectData
Perhaps offer this as a template instead, to allow specific classes of objects to be held in their own data type entirely. Maya would then prevent connection between incompatible types.
Member IECoreMaya::ParameterHandler::create (IECore::ConstParameterPtr parameter, const MString &plugName, MObject &node)
: return an MStatus like the other methods, and pass a plug reference as an argument (Cortex 8)
Member IECoreMaya::ParameterisedHolderInterface::getParameterisedInterface (std::string *className, int *classVersion=0, std::string *searchPathEnvVar=0)
Remove version with no arguments and default className to 0 as well.
Class IECoreMaya::PythonCmd

Support the conversion of -eval results into the most appropriate mel form based on type

Split the management of python contexts and all the evaluation code into a Python object defined in an IECorePython library. Then we can use that object in a Nuke python plugin and wherever else we want. And this command becomes a lot smaller and easier to maintain. Nice.

Member IECoreMaya::ToMayaObjectConverter::convert (MObject &object) const
Define the meaning of object. Some derived classes seem to modify it, others seem to create a new one and assign it. I think if a valid object is passed then it should be edited, and if a null object is passed then a new one should be created. We also probably need a ToMayaShapeConverter base class with some parentOrOwner type semantics.
Member IECoreMaya::ToMayaObjectConverter::ToMayaObjectConverterDescription< T >::ToMayaObjectConverterDescription (IECore::TypeId fromType, const MFn::Type resultType)
Constructors allowing more complex mappings of types (multiple fromTypes and resultTypes).
Class IECoreMaya::ToMayaParticleConverter
Could we make a ToMayaShapeConverter base class to provide utilities for this and the ToMayaMeshConverter etc?
Member IECoreMaya::ToMayaPlugConverter::convert (MPlug &plug) const
Replace this function with one that calls a pure virtual doConversion function taking the contents of parameters(), like the other converters. Also consider that MStatus might be a better return type, and that we might also want a converter to create a new plug rather than just fill an existing one.
Member IECoreMaya::ToMayaPlugConverter::create (const IECore::ObjectPtr src)

Implement this as a genuine factory which creates subclasses.

Should be ConstPtr not const Ptr.

Class IECoreMaya::TransformationMatrixParameterHandler< T >
Expose and add support for other rotation orders supported by Imath::Euler<T>
Class IECoreNuke::FromNukePointsConverter
Might be good to have a FromNukeGeometryConverter as a base class of this and MeshFromNuke. .
Class IECoreNuke::MeshFromNuke
Sort out the naming of this and other converters so they follow the convention used elsewhere in cortex - particularly IECoreMaya.
Class IECoreNuke::MeshToNukeGeometryConverter
Sort out the naming of this and other converters so they follow the convention used elsewhere in cortex - particularly IECoreMaya. .
Member IECoreNuke::OpHolder::isExecuteThreadSafe () const
We /are/ threadsafe, but Nuke doesn't release the GIL when calling through to here from nuke.execute(). We therefore have to pretend not to be threadsafe - if they fix this we can return true from this instead of false.
Class IECoreNuke::PointToNukeGeometryConverter
Sort out the naming of this and other converters so they follow the convention used elsewhere in cortex - particularly IECoreMaya. .
Member IECoreRI::Renderer::command (const std::string &name, const IECore::CompoundDataMap &parameters) override
Make a VisibleRenderable subclass to encapsulate a call to this.
Member IECoreRI::Renderer::mesh (IECore::ConstIntVectorDataPtr vertsPerFace, IECore::ConstIntVectorDataPtr vertIds, const std::string &interpolation, const IECore::PrimitiveVariableMap &primVars) override
Consider how we might standardise a means of storing tags explicitly on the mesh rather than as primitive variables.
Member IECoreRI::Renderer::setAttribute (const std::string &name, IECore::ConstDataPtr value) override

Do the todo items in IECore::Group and IECore::AttributeState and deprecate the ri:subsurface call.

Consider whether or not we should have a standard LOD mechanism defined in IECore.

Module Lower level rendering methods
We need to rethink this mechanism. The problem is that we've ended up using this method for two things - firstly to get a ShaderSetup where all the primitive variables are bound (good), and secondly we've abused it to actually change the shader in PointsPrimitive and CurvePrimitive. Asking for a setup for one shader and getting back a setup for another doesn't make a great deal of sense. There are several competing sources of source code for shaders :
Module Primitives
Better documentation for the calls below, particularly in relation to the rightHandedOrientation attribute.
Module Standard parameters
Pass the matrices and projections via standard parameters to avoid use of deprecated gl_ModelViewMatrix etc.