MtlBlinn3D::MtlBlinn3D(const Registry *reg, const ScriptVal &table, const TagList &tags) : BaseClass(reg, table, tags)
{
	if (m_RegNode == &MtlBlinn3D::Reg)	// other materials may derive this material so be careful not to set MtlInputs twice
	{
		MtlInputs = (MtlBlinnInputs3D *) MtlBlinnInputs3D::Reg.New(table, tags);
		RegisterInputs(MtlInputs);
		//MtlInputs->AddInputs();  -- no, Blinn has special handling to add inputs in OnAddToFlow()
	}
}
 CImplicitFractal::CImplicitFractal(unsigned int type, unsigned int basistype, unsigned int interptype)
 {
     RegisterInputs();
     setNumOctaves(8);
     setFrequency(1.0);
     setLacunarity(2.0);
     setType(type);
     setAllSourceTypes(basistype, interptype);
     resetAllSources();
 }
 CImplicitFractal::CImplicitFractal()
 {
     RegisterInputs();
     setNumOctaves(8);
     setFrequency(1.0);
     setLacunarity(2.0);
     setType(FBM);
     setAllSourceTypes(SIMPLEX, QUINTIC);
     resetAllSources();
 }
SimpleCubeTool::SimpleCubeTool(const Registry *reg, const ScriptVal &table, const TagList &tags) : BaseClass(reg, table, tags)
{
   // add the cube's geometry inputs to the controls page
   AddControlPage("Controls");

   InCubeInputs = (SimpleCubeInputs *) ClassRegistry->New(COMPANY_ID_DOT + CLSID_PartioViewerInputs, CT_SurfaceInputs3D, table, tags);

   if (InCubeInputs)
   {
      // Register the inputs with this SimpleCubeTool.  This will cause the tool to forward NotifyChanged()/OnAddToFlow()/OnConnect() and
      // other GUI notifications onto the inputs.  It will not actually add the inputs to this tool though.
      RegisterInputs(InCubeInputs);

      // This is how you currently add object ID inputs but it needs to be changed...
      InCubeInputs->SetAttrs(
         SI_ObjectIDInputName,		"ObjectID",
         SI_ObjectIDInputID,			"ObjectID",
         TAG_DONE);

      // Now add the cube inputs to this tool.  Just to be clean, we're going to put the inputs in a group so that to scripting their IDs
      // will be things like SimpleCubeTool.SimpleCubeInputs.Width.  If the group wasn't here, the inputs would be like SimpleCubeTool.Width
      // and this could conflict with other injected inputs.
      BeginGroup(CLSID_PartioViewerInputs, CLSID_PartioViewerInputs, true, false);
      InCubeInputs->AddInputs();
      EndGroup();
   }

   // Add the material input
   InMaterial = AddInput("Material Input", "MaterialInput",
      LINKID_DataType,			CLSID_DataType_MtlGraph3D,
      LINKID_AllowedDataType,	CLSID_DataType_Image,		// LINKID_AllowedDataType is optional, but putting it here allows the material input to receive image connections also
      LINK_Main,					GetNextMainValue(),			// make sure our LINK_Main value doesn't conflict with Transform3DOperator::In3Ds LINK_Main 
      INP_Required,				FALSE,
      INP_ConnectRequired,		TRUE,
      TAG_DONE);
}