MappedRandomPointDistributionOp::MappedRandomPointDistributionOp() : UniformRandomPointDistributionOp( "The MappedRandomPointDistributionOp distributes points over a mesh using a random distribution and a density map." ) { m_imageParameter = new ImagePrimitiveParameter( "image", "The image specifying the density map.", new ImagePrimitive() ); StringParameter::PresetsContainer channelNamePresets; channelNamePresets.push_back( StringParameter::Preset( "R", "R" ) ); channelNamePresets.push_back( StringParameter::Preset( "G", "G" ) ); channelNamePresets.push_back( StringParameter::Preset( "B", "B" ) ); channelNamePresets.push_back( StringParameter::Preset( "A", "A" ) ); channelNamePresets.push_back( StringParameter::Preset( "Y", "Y" ) ); m_channelNameParameter = new StringParameter( "channelName", "The name of the floating point channel in the image to use as the density map.", "Y", channelNamePresets, false ); parameters()->addParameter( m_imageParameter ); parameters()->addParameter( m_channelNameParameter ); }
void FromMayaMeshConverter::constructCommon() { // interpolation StringParameter::PresetsContainer interpolationPresets; interpolationPresets.push_back( StringParameter::Preset( "poly", "linear" ) ); interpolationPresets.push_back( StringParameter::Preset( "subdiv", "catmullClark" ) ); // the last interpolation type is 'default' interpolationPresets.push_back( StringParameter::Preset( "default", "default" ) ); StringParameterPtr interpolation = new StringParameter( "interpolation", "Sets the interpolation type of the new mesh. When 'default' is used it will query the attribute 'ieMeshInterpolation' from the Mesh instead (and use linear if nonexistent).", "default", interpolationPresets ); parameters()->addParameter( interpolation ); // normals BoolParameterPtr normals = new BoolParameter( "normals", "When this is on the mesh normals are added to the result as a primitive variable named \"N\". " "Note that normals will only ever be added to meshes created with linear interpolation as " "vertex normals are unsuitable for meshes which will be rendered with some form of " "subdivision.", true ); parameters()->addParameter( normals ); // uv BoolParameterPtr uv = new BoolParameter( "uv", "When this is on the uv sets are added to the result as primitive variables", true ); parameters()->addParameter( uv ); // colors BoolParameterPtr colors = new BoolParameter( "colors", "When this is on the default color set is added to the result as primitive variable named \"Cs\".", false ); parameters()->addParameter( colors ); // extra colors BoolParameterPtr extraColors = new BoolParameter( "extraColors", "When this is on, all color sets are added to the result as primitive variables named \"setName_Cs\".", false ); parameters()->addParameter( extraColors ); }