예제 #1
0
    bool InputDoubleN(const char* label, double* v, int components, const char* display_format, ImGuiInputTextFlags extra_flags)
    {
        ImGuiWindow* window = GetCurrentWindow();
        if (window->SkipItems)
            return false;

        ImGuiContext& g = *GImGui;
        bool value_changed = false;
        BeginGroup();
        PushID(label);
        PushMultiItemsWidths(components);
        for (int i = 0; i < components; i++)
        {
            PushID(i);
            value_changed |= InputDouble("##v", &v[i], 0.0, 0.0, display_format, extra_flags);
            SameLine(0, g.Style.ItemInnerSpacing.x);
            PopID();
            PopItemWidth();
        }
        PopID();

        TextUnformatted(label, FindRenderedTextEnd(label));
        EndGroup();

        return value_changed;
    }
예제 #2
0
//---------------------------------------------------------------------------
void TActionLog::ReflectSettings()
{
  TGuard Guard(FCriticalSection);

  bool ALogging =
    !FClosed && FConfiguration->GetLogActions() && GetEnabled();

  if (ALogging && !FLogging)
  {
    FLogging = true;
    Add(L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    Add(FORMAT(L"<session xmlns=\"http://winscp.net/schema/session/1.0\" name=\"%s\" start=\"%s\">",
      XmlAttributeEscape(FSessionData->GetSessionName()).c_str(), StandardTimestamp().c_str()));
  }
  else if (!ALogging && FLogging)
  {
    if (FInGroup)
    {
      EndGroup();
    }
    // do not try to close the file, if it has not been opened, to avoid recursion
    if (FFile != nullptr)
    {
      Add(L"</session>");
    }
    CloseLogFile();
    FLogging = false;
  }

}
예제 #3
0
void StatementListVisitor::Visit(StatementList* list)
{
	if (list == NULL) return;

	const int32 n = list->Size();
	for (int32 i = 0; i < n; i ++) {
		Statement* statement = list->StatementAt(i);
		GroupStatement group(statement);
		if (group.IsOpenGroup()) {
			BeginGroup(&group);
			fLevel ++;
		} else if (statement->IsValueStatement()) {
			DoValue(statement);
		} else if (statement->IsDefaultStatement()) {
			DoDefault(statement);
		} else if (statement->IsQueryStatement()) {
			DoQuery(statement);
		} else if (statement->IsParamStatement()) {
			DoParam(statement);
		}		
		
		StatementList* children = statement->GetChildren();
		if (children != NULL) {
			Visit(children);
		}
		
		// Close statements have been removed
		if (group.IsOpenGroup()) {
			fLevel --;
			EndGroup(&group);
		}
	}
}
예제 #4
0
void PNS_LOGGER::Save( const std::string& aFilename )
{
	EndGroup();

	FILE* f = fopen( aFilename.c_str(), "wb" );
	printf( "Saving to '%s' [%p]\n", aFilename.c_str(), f );
	const std::string s = m_theLog.str();
	fwrite( s.c_str(), 1, s.length(), f );
	fclose( f );
}
예제 #5
0
파일: mgl_3d.cpp 프로젝트: LuaDist/iup
//-----------------------------------------------------------------------------
void mglGraph::CloudP(const mglData &x, const mglData &y, const mglData &z, const mglData &a, const char *sch, mreal alpha, bool rnd)
{
	register long i,j,k,n=a.nx,m=a.ny,l=a.nz;
	if(n<2 || m<2 || l<2)	{	SetWarn(mglWarnLow,"CloudP");	return;	}
	bool both = x.nx*x.ny*x.nz==n*m*l && y.nx*y.ny*y.nz==n*m*l && z.nx*z.ny*z.nz==n*m*l;
	if(!(both || (x.nx==n && y.nx==m && z.nx==l)))
	{	SetWarn(mglWarnDim,"CloudP");	return;	}
	static int cgid=1;	StartGroup("CloudP",cgid++);

	if(alpha<0)	alpha = AlphaDef;
	if(sch && strchr(sch,'-'))	alpha = -alpha;
	SetScheme(sch);
	alpha /= pow(n*m*l,1./3)/CloudFactor/15;
	if(alpha>1)	alpha = 1;

	// x, y -- матрицы как и z
	bool al=Alpha(true);
	register mreal xx,yy,zz,aa;
	if(both)
	{
		for(i=0;i<n*m*l;i++)
		{
			if(rnd)
			{	xx=x.a[i];	yy=y.a[i];	zz=z.a[i];	aa=a.a[i];	}
			else
			{
				register mreal tx,ty;
				tx=mgl_rnd();	ty=mgl_rnd();	zz=mgl_rnd();
				aa=a.Spline1(tx,ty,zz);	xx=x.Spline1(tx);
				yy=y.Spline1(ty);		zz=z.Spline1(zz);
			}
			AVertex(xx,yy,zz,aa,alpha);
		}
	}
	else	// x, y -- вектора
	{
		for(i=0;i<n;i++)	for(j=0;j<m;j++)	for(k=0;k<l;k++)
		{
			if(rnd)
			{	xx=x.a[i];	yy=y.a[j];	zz=z.a[k];	aa=a.a[i+n*(j+m*k)];	}
			else
			{
				xx=mgl_rnd();	yy=mgl_rnd();	zz=mgl_rnd();
				aa=a.Spline1(xx,yy,zz);	xx=x.Spline1(xx);
				yy=y.Spline1(yy);		zz=z.Spline1(zz);
			}
			AVertex(xx,yy,zz,aa,alpha);
		}
	}
	Alpha(al);
	EndGroup();
}
예제 #6
0
파일: mgl_3d.cpp 프로젝트: LuaDist/iup
//-----------------------------------------------------------------------------
//
//	CloudQ series
//
//-----------------------------------------------------------------------------
void mglGraph::Cloud(const mglData &x, const mglData &y, const mglData &z, const mglData &a,
					const char *sch, mreal alpha)
{
	long i,j,k,n=a.nx,m=a.ny,l=a.nz;
	register int i0,i1;
	if(n<2 || m<2 || l<2)	{	SetWarn(mglWarnLow,"CloudQ");	return;	}
	bool both = x.nx*x.ny*x.nz==n*m*l && y.nx*y.ny*y.nz==n*m*l && z.nx*z.ny*z.nz==n*m*l;
	if(!(both || (x.nx==n && y.nx==m && z.nx==l)))
	{	SetWarn(mglWarnDim);	return;	}
	static int cgid=1;	StartGroup("CloudQ",cgid++);

	int tx=1,ty=1,tz=1;
	if(MeshNum>1)
	{	tx=(n-1)/(MeshNum-1);	ty=(m-1)/(MeshNum-1);	tz=(l-1)/(MeshNum-1);}
	if(tx<1)	tx=1;	if(ty<1)	ty=1;	if(tz<1)	tz=1;

	if(alpha<0)	alpha = AlphaDef;
	if(sch && strchr(sch,'-'))	alpha = -alpha;
	alpha /= pow(n/tx*m/ty*l/tz,1./3)/CloudFactor/5;
	if(alpha>1)	alpha = 1;
	SetScheme(sch);
	mreal *pp = new mreal[3*n*m*l];
	if(!pp)	{	SetWarn(mglWarnMem);	return;	}
	mreal *aa = new mreal[n*m*l];

	// x, y -- матрицы как и z
	if(both)	for(i=0;i<n/tx;i++)	for(j=0;j<m/ty;j++)	for(k=0;k<l/tz;k++)
	{
		i0 = i+(n/tx)*(j+(m/ty)*k);
		i1 = i*tx+n*(j*ty+m*k*tz);
		pp[3*i0]  = x.a[i1];
		pp[3*i0+1]= y.a[i1];
		pp[3*i0+2]= z.a[i1];
		aa[i0] = a.a[i1];
	}
	// x, y -- вектора
	else	for(i=0;i<n/tx;i++)	for(j=0;j<m/ty;j++)	for(k=0;k<l/tz;k++)
	{
		i0 = i+(n/tx)*(j+(m/ty)*k);
		pp[3*i0]  = x.a[i*tx];
		pp[3*i0+1]= y.a[j*ty];
		pp[3*i0+2]= z.a[k*tz];
		aa[i0] = a.a[i*tx+n*(j*ty+m*k*tz)];
	}
	bool al=Alpha(true);
	cloud_plot(n/tx,m/ty,l/tz,pp,aa,alpha);
	Alpha(al);
	EndGroup();
	delete []pp;	delete []aa;
}
예제 #7
0
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);
}
예제 #8
0
/*******************************************************************************
 *	Slot function. Translates command object recevied from the parser thread
 * 	to appropriate function call.
 * ****************************************************************************/
void DialogBox::ExecuteCommand(DialogCommand command)
{
	QWidget* widget=NULL;

	if(empty)
		{
			ClearDialog();
			empty=false;
		}
	switch(command.command & DialogCommand::command_mask)
		{
			case DialogCommand::add:

				if(command.command & DialogCommand::option_space & DialogCommand::option_mask)
					{
						// Seems sscanf %d in some versions of standard C library has a bug
						// returning 32k on sero-size strings
						if(command.GetText()[0])
							{
								int size;
								sscanf(command.GetText(), "%d", &size);
								AddSpace(size);
							}
						else AddSpace();
						break;
					}

				if(command.command & DialogCommand::option_stretch & DialogCommand::option_mask)
					{
						AddStretch();
						break;
					}

				switch(command.control & ~DialogCommand::property_mask)
					{
						case DialogCommand::label:
							AddLabel(command.GetTitle(), command.GetName(),
								command.control & DialogCommand::property_picture & DialogCommand::property_mask ? DialogBox::pixmap :
										command.control & DialogCommand::property_animation & DialogCommand::property_mask ? DialogBox::movie :
										DialogBox::text);
							break;
						case DialogCommand::groupbox:
							AddGroupbox(command.GetTitle(), command.GetName(),
								command.control & DialogCommand::property_vertical & DialogCommand::property_mask,
								command.control & DialogCommand::property_checkable & DialogCommand::property_mask,
								command.control & DialogCommand::property_checked & DialogCommand::property_mask);
							break;
						case DialogCommand::frame:
							AddFrame(command.GetTitle(),
								command.control & DialogCommand::property_vertical & DialogCommand::property_mask,
								command.control);
							break;
						case DialogCommand::pushbutton:
							AddPushbutton(command.GetTitle(), command.GetName(),
								command.control & DialogCommand::property_apply & DialogCommand::property_mask,
								command.control & DialogCommand::property_exit & DialogCommand::property_mask,
								command.control & DialogCommand::property_default & DialogCommand::property_mask);
							break;
						case DialogCommand::checkbox:
							AddCheckbox(command.GetTitle(), command.GetName(),
								command.control & DialogCommand::property_checked & DialogCommand::property_mask);
							break;
						case DialogCommand::radiobutton:
							AddRadiobutton(command.GetTitle(), command.GetName(),
								command.control & DialogCommand::property_checked & DialogCommand::property_mask);
							break;
						case DialogCommand::textbox:
							AddTextbox(command.GetTitle(), command.GetName(),
								command.GetText(),
								command.GetAuxText(),
								command.control & DialogCommand::property_password & DialogCommand::property_mask);
							break;
						case DialogCommand::listbox:
							AddListbox(command.GetTitle(), command.GetName(),
							command.control & DialogCommand::property_activation & DialogCommand::property_mask,
							command.control & DialogCommand::property_selection & DialogCommand::property_mask);
							break;
						case DialogCommand::combobox:
							AddCombobox(command.GetTitle(), command.GetName(),
							command.control & DialogCommand::property_editable & DialogCommand::property_mask,
							command.control & DialogCommand::property_selection & DialogCommand::property_mask);
							break;
						case DialogCommand::item:
							AddItem(command.GetTitle(), command.GetName(),
							command.control & DialogCommand::property_current & DialogCommand::property_mask);
							break;
						case DialogCommand::separator:
							AddSeparator(command.GetTitle(),
								command.control & DialogCommand::property_vertical & DialogCommand::property_mask,
								command.control);
							break;
						case DialogCommand::progressbar:
							AddProgressbar(command.GetTitle(),
								command.control & DialogCommand::property_vertical & DialogCommand::property_mask,
								command.control & DialogCommand::property_busy & DialogCommand::property_mask);
							break;
						case DialogCommand::slider:
							{
								int min(0), max(100);
								if(command.GetName()[0]) sscanf(command.GetName(), "%d", &min);
								if(command.GetText()[0]) sscanf(command.GetText(), "%d", &max);
								AddSlider(command.GetTitle(),
									command.control & DialogCommand::property_vertical & DialogCommand::property_mask,
									min, max);
							}
							break;
						case DialogCommand::textview:
							AddTextview(command.GetTitle(), command.GetName());
							break;
						case DialogCommand::tabs:
							AddTabs(command.GetTitle(), command.control);
							break;
						case DialogCommand::page:
							AddPage(command.GetTitle(), command.GetName(), command.GetText(),
							command.control & DialogCommand::property_current & DialogCommand::property_mask);
							break;
					}
				break;
			case DialogCommand::clear:
				Clear(command.GetName());
				break;
			case DialogCommand::end:
				switch(command.control & ~DialogCommand::property_mask)
					{
						case DialogCommand::groupbox:
						case DialogCommand::frame:
							EndGroup();
							break;
						case DialogCommand::listbox:
						case DialogCommand::combobox:
							EndList();
							break;
						case DialogCommand::tabs:
							EndTabs();
							break;
						case DialogCommand::page:
							EndPage();
							break;
						case DialogCommand::widget_mask:	// none type mentioned
							if(current_view) EndList();
							else if(group_layout) EndGroup();
							else if(current_tab_widget)
								{
									if(current_tab_widget->indexOf(current_layout->parentWidget())==-1) EndTabs();
									else EndPage();
								}
							break;
					}
				break;
			case DialogCommand::step:
				if(command.command & DialogCommand::option_vertical & DialogCommand::option_mask) StepVertical();
				else StepHorizontal();
				break;
			case DialogCommand::set:
				if(command.GetName()[0])
					{
						if(!(widget=FindWidget(command.GetName()))) break;
					}
				else widget=this;

				if(command.command & DialogCommand::option_enabled & DialogCommand::option_mask)
					SetEnabled(widget, true);

				if(command.command & DialogCommand::option_focus & DialogCommand::option_mask)
					{
						QTimer::singleShot(0, widget, SLOT(setFocus()));

						// select text for QLineEdit objects
						// selectedText property is not writable and this must be done in the class specific way
						if(QWidget* proxywidget=widget->focusProxy())
							{
								switch(WidgetType(proxywidget))
									{
										case DialogCommand::combobox:
											proxywidget=((QComboBox*)proxywidget)->lineEdit();
											break;
										case DialogCommand::textbox:
											break;
										default:
											proxywidget=NULL;
											break;
									}
								if(proxywidget) ((QLineEdit*)proxywidget)->selectAll();
							}
					}

				// see http://doc.qt.io/qt-4.8/stylesheet.html for reference
				if(command.command & DialogCommand::option_stylesheet & DialogCommand::option_mask)
					{
						widget->setStyleSheet(command.GetText());
						if(QWidget* proxywidget=widget->focusProxy())
							proxywidget->setStyleSheet(command.GetText());
					}

				if(command.command & DialogCommand::option_visible & DialogCommand::option_mask)
					{
						widget->show();
						if(QWidget* proxywidget=widget->focusProxy()) proxywidget->show();
					}

				if(command.control) SetOptions(widget, command.control, command.control, command.GetText());

				// setting of some properties (calls like show and hide) generates events which are optimised next
				// or sets widget attributes which might impact next calls
				// to avoid races and to ensure the command is executed as expected we process all events that
				// have been generated:
				QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers);
				break;
			case DialogCommand::unset:
				if(command.GetName()[0])
					{
						if(!(widget=FindWidget(command.GetName()))) break;
					}
				else widget=this;

				if(command.command & DialogCommand::option_enabled & DialogCommand::option_mask)
					SetEnabled(widget, false);

				// see http://doc.qt.io/qt-4.8/stylesheet.html for reference
				if(command.command & DialogCommand::option_stylesheet & DialogCommand::option_mask)
					{
						// rarely it was seen this fails (unset stylesheet or set it to empty string)
						// hopefully this was caused by the race which is now fixed
						// (queued signaling between threads and optimisation of queued GUI events)
						widget->setStyleSheet(QString());
						if(QWidget* proxywidget=widget->focusProxy())
							proxywidget->setStyleSheet(QString());
					}

				if(command.command & DialogCommand::option_visible & DialogCommand::option_mask)
					{
						widget->hide();
						if(QWidget* proxywidget=widget->focusProxy()) proxywidget->hide();
					}

				if(command.control) SetOptions(widget, 0, command.control, NULL);

				// setting of some properties (calls like show and hide) generates events which are optimised next
				// or sets widget attributes which might impact next calls
				// to avoid races and to ensure the command is executed as expected we process all events that
				// have been generated:
				QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers);
				break;
			case DialogCommand::remove:
				RemoveWidget(command.GetName());
				break;
			case DialogCommand::position:
				Position(command.GetText(),
							command.command & DialogCommand::option_behind & DialogCommand::option_mask,
							command.command & DialogCommand::option_onto & DialogCommand::option_mask);
				break;
			case DialogCommand::query:
				Report();
				break;
			case DialogCommand::noop:
			default:
				;
		}
	// clean up after possible FindWidget call
	chosen_view=NULL;
	chosen_row_flag=false;
}
예제 #9
0
파일: mgl_3d.cpp 프로젝트: LuaDist/iup
//-----------------------------------------------------------------------------
//
//	Surf3C series
//
//-----------------------------------------------------------------------------
void mglGraph::Surf3C(mreal val, const mglData &x, const mglData &y, const mglData &z, const mglData &a, const mglData &b, const char *sch)
{
	long i,j,k,i0,i1,n=a.nx,m=a.ny,l=a.nz;
	long *kx1,*kx2,*ky1,*ky2,*kz,pc;
	bool both, wire = sch && strchr(sch,'#');
	mreal *pp=0,*cc=0,*kk=0,*nn=0;
	mreal d,xx,yy,zz,nx,ny,nz,dx,dy,dz,tx,ty,tz,alpha;
	if(n<2 || m<2 || l<2)	{	SetWarn(mglWarnLow,"Surf3C");	return;	}
	both = x.nx*x.ny*x.nz==n*m*l && y.nx*y.ny*y.nz==n*m*l && z.nx*z.ny*z.nz==n*m*l;
	if(!(both || (x.nx==n && y.nx==m && z.nx==l)))
	{	SetWarn(mglWarnDim,"Surf3C");	return;	}
	if(b.nx*b.ny*b.nz!=n*m*l)	{	SetWarn(mglWarnDim,"Surf3C");	return;	}
	static int cgid=1;	StartGroup("Surf3C",cgid++);

	bool inv = (sch && strchr(sch,'-'));
	SetScheme(sch);
	kx1 = new long[n*m];	kx2 = new long[n*m];
	ky1 = new long[n*m];	ky2 = new long[n*m];
	kz  = new long[n*m];
	Pal[100]=GetC(val);
//	DefColor(c,AlphaDef);

	for(k=0;k<l;k++)
	{
		memcpy(kx1,kx2,n*m*sizeof(long));	memset(kx2,-1,n*m*sizeof(long));
		memcpy(ky1,ky2,n*m*sizeof(long));	memset(ky2,-1,n*m*sizeof(long));
		memset(kz ,-1,n*m*sizeof(long));
		for(i=0;i<n;i++)	for(j=0;j<m;j++)
		{
			i1 = i+n*j;	i0 = i1+n*m*k;
			if(i<n-1)
			{
				d = _d(val,a.a[i0],a.a[i0+1]);
				if(d>=0 && d<1)
				{
					xx = both ? x.a[i0]*(1.-d)+x.a[i0+1]*d : x.a[i]*(1.-d)+x.a[i+1]*d;
					yy = both ? y.a[i0]*(1.-d)+y.a[i0+1]*d : y.a[j];
					zz = both ? z.a[i0]*(1.-d)+z.a[i0+1]*d : z.a[k];
					alpha = b.a[i0]*(1.-d)+b.a[i0+1]*d;
					normal_3d(a,i+d,j,k,&dx,&dy,&dz,inv);
					if(both)
					{
						normal_3d(x,i+d,j,k,&tx,&ty,&tz,true);
						nx = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
						normal_3d(y,i+d,j,k,&tx,&ty,&tz,true);
						ny = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
						normal_3d(z,i+d,j,k,&tx,&ty,&tz,true);
						nz = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
					}
					else
					{
						normal_1d(x,i+d,&tx,true);		nx = dx/tx;
						normal_1d(y,j,&ty,true);		ny = dy/ty;
						normal_1d(z,k,&tz,true);		nz = dz/tz;
					}
					Pal[100]=GetC(alpha);
					kx2[i1] = add_spoint(pc,&pp,&kk,&cc,&nn,xx,yy,zz,nx,ny,nz,
							i+d,j,k,Transparent ? AlphaDef : 1);
				}
			}
			if(j<m-1)
			{
				d = _d(val,a.a[i0],a.a[i0+n]);
				if(d>=0 && d<1)
				{
					xx = both ? x.a[i0]*(1.-d)+x.a[i0+n]*d : x.a[i];
					yy = both ? y.a[i0]*(1.-d)+y.a[i0+n]*d : y.a[j]*(1.-d)+y.a[j+1]*d;
					zz = both ? z.a[i0]*(1.-d)+z.a[i0+n]*d : z.a[k];
					alpha = b.a[i0]*(1.-d)+b.a[i0+n]*d;
					normal_3d(a,i,j+d,k,&dx,&dy,&dz,inv);
					if(both)
					{
						normal_3d(x,i,j+d,k,&tx,&ty,&tz,true);
						nx = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
						normal_3d(y,i,j+d,k,&tx,&ty,&tz,true);
						ny = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
						normal_3d(z,i,j+d,k,&tx,&ty,&tz,true);
						nz = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
					}
					else
					{
						normal_1d(x,i,&tx,true);		nx = dx/tx;
						normal_1d(y,j+d,&ty,true);		ny = dy/ty;
						normal_1d(z,k,&tz,true);		nz = dz/tz;
					}
					Pal[100]=GetC(alpha);
					ky2[i1] = add_spoint(pc,&pp,&kk,&cc,&nn,xx,yy,zz,nx,ny,nz,
							i,j+d,k,Transparent ? AlphaDef : 1);
				}
			}
			if(k>0)
			{
				d = _d(val,a.a[i0-n*m],a.a[i0]);
				if(d>=0 && d<1)
				{
					xx = both ? x.a[i0-n*m]*(1.-d)+x.a[i0]*d : x.a[i];
					yy = both ? y.a[i0-n*m]*(1.-d)+y.a[i0]*d : y.a[j];
					zz = both ? z.a[i0-n*m]*(1.-d)+z.a[i0]*d : z.a[k-1]*(1.-d)+z.a[k]*d;
					alpha = b.a[i0-n*m]*(1.-d)+b.a[i0]*d;
					normal_3d(a,i,j,k+d-1,&dx,&dy,&dz,inv);
					if(both)
					{
						normal_3d(x,i,j,k+d-1,&tx,&ty,&tz,true);
						nx = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
						normal_3d(y,i,j,k+d-1,&tx,&ty,&tz,true);
						ny = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
						normal_3d(z,i,j,k+d-1,&tx,&ty,&tz,true);
						nz = (dx*tx+dy*ty+dz*tz)/(tx*tx+ty*ty+tz*tz);
					}
					else
					{
						normal_1d(x,i,&tx,true);		nx = dx/tx;
						normal_1d(y,j,&ty,true);		ny = dy/ty;
						normal_1d(z,k+d-1,&tz,true);	nz = dz/tz;
					}
					Pal[100]=GetC(alpha);
					kz[i1] = add_spoint(pc,&pp,&kk,&cc,&nn,xx,yy,zz,nx,ny,nz,
							i,j,k+d-1,Transparent ? AlphaDef : 1);
				}
			}
		}
		if(k>0)	surf3_plot(n,m,kx1,kx2,ky1,ky2,kz,pp,cc,kk,nn,wire);
	}
	EndGroup();
	delete []kx1;	delete []kx2;	delete []ky1;	delete []ky2;	delete []kz;
	if(pp)	{	free(pp);	free(kk);	free(cc);	free(nn);	}
}
void MtlBlinnInputs3D::EndSpecularBlinnNest()
{
	EndGroup();
}
void MtlBlinnInputs3D::AddSpecularBlinnInputs(bool addSpecularExponent)
{
	InSpecularColorNest = BeginGroup("Color", "Color", true, false);

		InSpecularR = AddInput("Specular Red", "Red",
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		COLORCONTROL_ID,
			LINKID_LegacyID,			FuID("..SpecularRed"),
			I3D_AutoFlags,				PF_AutoProcess,
			I3D_ParamName,				FuID("Specular.R"),
			IC_ControlGroup,			2,
			IC_ControlID,				0,
			ICS_Name,					"Specular Color",
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				DefaultSpecularColor.R,
			INP_SubType,				IST_ColorR,
			TAG_DONE);

		InSpecularG = AddInput("Green", "Green", 
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		COLORCONTROL_ID,
			LINKID_LegacyID,			FuID("..SpecularGreen"),
			I3D_AutoFlags,				PF_AutoProcess,
			I3D_ParamName,				FuID("Specular.G"),
			IC_ControlGroup,			2,
			IC_ControlID,				1,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				DefaultSpecularColor.G,
			INP_SubType,				IST_ColorG,
			TAG_DONE);

		InSpecularB = AddInput("Blue", "Blue", 
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		COLORCONTROL_ID,
			I3D_AutoFlags,				PF_AutoProcess,
			LINKID_LegacyID,			FuID("..SpecularBlue"),
			I3D_ParamName,				FuID("Specular.B"),
			IC_ControlGroup,			2,
			IC_ControlID,				2,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				DefaultSpecularColor.B,
			INP_SubType,				IST_ColorB,
			TAG_DONE);

		InSpecularColorMtl = AddInput("Specular Color Material", "Material",
			LINKID_DataType,			CLSID_DataType_MtlGraph3D,
			LINKID_AllowedDataType,	CLSID_DataType_Image,
			LINKID_LegacyID,			FuID("..SpecularColorTex"),
			I3D_AutoFlags,				PF_AutoProcess,
			I3D_ParamName,				FuID("SpecularMtl"),
			I3D_ChildSlot,				MtlBlinnData3D::CMS_Specular,
			LINK_Main,					MMID_SpecularColor,
			INP_Required,				FALSE, 
			TAG_DONE);

	EndGroup();

	InSpecularIntensity = AddInput("Specular Intensity", "Intensity", 
		LINKID_DataType,			CLSID_DataType_Number,
		INPID_InputControl,		SLIDERCONTROL_ID,
		LINKID_LegacyID,			FuID(".SpecularIntensity"),
		I3D_AutoFlags,				PF_AutoProcess,
		I3D_ParamName,				FuID("SpecularIntensity"),
		INP_MinAllowed,			0.0,
		INP_MinScale,				0.0,
		INP_MaxScale,				1.0,
		INP_Default,				1.0,
		TAG_DONE);

	InSpecularIntensityMtl = AddInput("Specular Intensity Material", "Intensity.Material",
		LINKID_DataType,			CLSID_DataType_MtlGraph3D,
		LINKID_AllowedDataType,	CLSID_DataType_Image,
		LINKID_LegacyID,			FuID(".SpecularIntensityTex"),
		I3D_AutoFlags,				PF_AutoProcess,
		I3D_ParamName,				FuID("SpecularIntensityMtl"),
		I3D_ChildSlot,				MtlBlinnData3D::CMS_SpecularIntensity,
		LINK_Main,					MMID_SpecularIntensity,
		INP_Required,				FALSE, 
		TAG_DONE);


	if (addSpecularExponent)
	{
		InSpecularExponent = AddInput("Specular Exponent", "Exponent", 
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".SpecularExponent"),
			I3D_AutoFlags,				PF_AutoProcess,
			I3D_ParamName,				FuID("SpecularExponent"),
			INP_Default,				DefaultSpecularExponent,
			INP_MinAllowed,			1.0,
			INP_MinScale,				1.0,
			INP_MaxScale,				100.0,
			ICD_Center,					25.0,
			TAG_DONE);

		InSpecularExponentMtl = AddInput("Specular Exponent Material", "Exponent.Material",
			LINKID_DataType,			CLSID_DataType_MtlGraph3D,
			LINKID_AllowedDataType,	CLSID_DataType_Image,
			LINKID_LegacyID,			FuID(".SpecularExponentTex"),
			I3D_AutoFlags,				PF_AutoProcess,
			I3D_ParamName,				FuID("SpecularExponentMtl"),
			I3D_ChildSlot,				MtlBlinnData3D::CMS_SpecularExponent,
			LINK_Main,					MMID_SpecularExponent,
			INP_Required,				FALSE, 
			TAG_DONE);
	}
}
void MtlBlinnInputs3D::AddDiffuseBlinnInputs()
{
	InDiffuseNest = BeginGroup("Diffuse", "Diffuse", true, true);

		InDiffuseColorNest = BeginGroup("Color", "Color", true, false);

			InDiffuseR = AddInput("Red", "Red",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..DiffuseRed"),
				I3D_AutoFlags,				PF_AutoProcess,	
				I3D_ParamName,				FuID("Diffuse.R"),
				IC_ControlGroup,			1,
				IC_ControlID,				0,
				ICS_Name,					"Diffuse Color",
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_Default,				1.0,
				INP_SubType,				IST_ColorR,
				TAG_DONE);

			InDiffuseG = AddInput("Green", "Green",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..DiffuseGreen"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Diffuse.G"),
				IC_ControlGroup,			1,
				IC_ControlID,				1,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_Default,				1.0,
				INP_SubType,				IST_ColorG,
				TAG_DONE);

			InDiffuseB = AddInput("Blue", "Blue",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..DiffuseBlue"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Diffuse.B"),
				IC_ControlGroup,			1,
				IC_ControlID,				2,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_Default,				1.0,
				INP_SubType,				IST_ColorB,
				TAG_DONE);

			InAlpha = AddInput("Alpha", "Alpha", 
				LINKID_DataType,			CLSID_DataType_Number, 
				INPID_InputControl,		SLIDERCONTROL_ID,
				LINKID_LegacyID,			FuID("..Alpha"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Diffuse.A"),
				INP_Default,				DefaultAlpha,
				INP_MinAllowed,			0.0,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				TAG_DONE);

			InDiffuseMtl = AddInput("Diffuse Color Material", "Material",
				LINKID_DataType,			CLSID_DataType_MtlGraph3D,
				LINKID_AllowedDataType,	CLSID_DataType_Image,
				LINKID_LegacyID,			FuID("..DiffuseTex"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("DiffuseMtl"),
				I3D_ChildSlot,				MtlBlinnData3D::CMS_Diffuse,
				LINK_Main,					MMID_DiffuseColor,
				INP_Required,				FALSE,
				TAG_DONE);

		EndGroup();

		InOpacity = AddInput("Opacity", "Opacity", 
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".Opacity"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Default,				DefaultOpacity,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			TAG_DONE);
		
	EndGroup();
}
void MtlBlinnInputs3D::AddTransmittanceBlinnInputs()
{
	InTransmittanceNest = BeginGroup("Transmittance", "Transmittance");

		InTransmittanceColorNest = BeginGroup("Color", "Color", true, false);

			InTransmittanceR = AddInput("Red", "Red",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..TransmittanceRed"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Transmittance.R"),
				IC_ControlGroup,			3,
				IC_ControlID,				0,
				ICS_Name,					"Attenuation",
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_MaxAllowed,			1.0,
				INP_Default,				0.0,
				INP_SubType,				IST_ColorR,
				TAG_DONE);

			InTransmittanceG = AddInput("Green", "Green",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..TransmittanceGreen"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Transmittance.G"),
				IC_ControlGroup,			3,
				IC_ControlID,				1,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_MaxAllowed,			1.0,
				INP_Default,				0.0,
				INP_SubType,				IST_ColorG,
				TAG_DONE);

			InTransmittanceB = AddInput("Blue", "Blue",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..TransmittanceBlue"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Transmittance.B"),
				IC_ControlGroup,			3,
				IC_ControlID,				2,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_MaxAllowed,			1.0,
				INP_Default,				0.0,
				INP_SubType,				IST_ColorB,
				TAG_DONE);

			//InTransmittanceMtl.AddInput("Transmittance Material", "Material",
			//	LINKID_DataType,			CLSID_DataType_MtlGraph3D,
			//	LINKID_AllowedDataType,	CLSID_DataType_Image,
			// I3D_ParamName,				FuID("TransmittanceMtl"),
			// I3D_ShadeParam,			FALSE,
			//	LINK_Main,					5,
			//	INP_Required,				FALSE, 
			//	OBJP_Owner,					Owner,
			//	TAG_DONE);

		EndGroup();

		InTransmittanceAlphaDetail = AddInput("Alpha Detail", "AlphaDetail",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".TransmittanceAlphaDetail"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_MaxAllowed,			1.0,
			INP_Default,				1.0,
			TAG_DONE);

		InTransmittanceColorDetail = AddInput("Color Detail", "ColorDetail",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".TransmittanceColorDetail"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_MaxAllowed,			1.0,
			INP_Default,				0.0,
			TAG_DONE);

		InTransmittanceSaturation = AddInput("Saturation", "Saturation",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".TransmittanceSaturation"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				1.0,
			TAG_DONE);

	EndGroup();
}
예제 #14
0
bool SimpleCubeInputs::AddInputsTagList(TagList &tags)
{
   // add our inputs
   InCubeWidth = AddInput("Width", "Width", 
      LINKID_DataType,		CLSID_DataType_Number,
      INPID_InputControl,	SLIDERCONTROL_ID,
      INP_MinScale,			0.0,
      INP_MaxScale,			10.0,
      INP_Default,			1.0,
      TAG_DONE);

   InCubeHeight = AddInput("Height", "Height", 
      LINKID_DataType,		CLSID_DataType_Number,
      INPID_InputControl,	SLIDERCONTROL_ID,
      INP_MinScale,			0.0,
      INP_MaxScale,			10.0,
      INP_Default,			1.0,
      TAG_DONE);

   InCubeDepth = AddInput("Depth", "Depth", 
      LINKID_DataType,		CLSID_DataType_Number,
      INPID_InputControl,	SLIDERCONTROL_ID,
      INP_MinScale,			0.0,
      INP_MaxScale,			10.0,
      INP_Default,			1.0,
      TAG_DONE);

   InFile = AddInput("partio File", "PFile", 
         LINKID_DataType,		CLSID_DataType_Text,
         INPID_InputControl,	FILECONTROL_ID,
         INP_Required,			FALSE,
         INP_External,			FALSE,
         INP_DoNotifyChanged,	TRUE,
         FCS_FilterString,		"partio Files (*.geo)|*.geo",		
         TAG_DONE);

   InPartDiv = AddInput("Read every Nth particle", "pProxy", 
      LINKID_DataType,		CLSID_DataType_Number,
      INPID_InputControl,	SLIDERCONTROL_ID,
	  INP_Integer,			TRUE,
      INP_MinScale,			1.0,
      INP_MaxScale,			100.0,
      INP_Default,			1.0,
      TAG_DONE);

   InPartColor = BeginGroup("Default Color", "Color", true, false);

			InPartR = AddInput("Red", "Red",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..PartRed"),
				I3D_AutoFlags,				PF_AutoProcess,	
				I3D_ParamName,				FuID("Part.R"),
				IC_ControlGroup,			1,
				IC_ControlID,				0,
				ICS_Name,					"Part Color",
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_Default,				1.0,
				INP_SubType,				IST_ColorR,
				TAG_DONE);

			InPartG = AddInput("Green", "Green",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..PartGreen"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Part.G"),
				IC_ControlGroup,			1,
				IC_ControlID,				1,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_Default,				1.0,
				INP_SubType,				IST_ColorG,
				TAG_DONE);

			InPartB = AddInput("Blue", "Blue",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..PartBlue"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Part.B"),
				IC_ControlGroup,			1,
				IC_ControlID,				2,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_Default,				1.0,
				INP_SubType,				IST_ColorB,
				TAG_DONE);

		EndGroup();


   // allow the BaseClass to add its wireframe/visibility/matte/objectID inputs and any other input injectors (eg. blendmodes)
   return BaseClass::AddInputsTagList(tags);
}
void MtlBlinnInputs3D::AddTransmittanceBlinnInputs()
{
	InTransmittanceNest = BeginGroup("Transmittance", "Transmittance");

		InTransmittanceColorNest = BeginGroup("Color", "Color", true, false);

			InTransmittanceR = AddInput("Red", "Red",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..TransmittanceRed"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Transmittance.R"),
				IC_ControlGroup,			3,
				IC_ControlID,				0,
				ICS_Name,					"Attenuation",
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_MaxAllowed,			1.0,
				INP_Default,				0.0,
				INP_SubType,				IST_ColorR,
				TAG_DONE);

			InTransmittanceG = AddInput("Green", "Green",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..TransmittanceGreen"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Transmittance.G"),
				IC_ControlGroup,			3,
				IC_ControlID,				1,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_MaxAllowed,			1.0,
				INP_Default,				0.0,
				INP_SubType,				IST_ColorG,
				TAG_DONE);

			InTransmittanceB = AddInput("Blue", "Blue",
				LINKID_DataType,			CLSID_DataType_Number,
				INPID_InputControl,		COLORCONTROL_ID,
				LINKID_LegacyID,			FuID("..TransmittanceBlue"),
				I3D_AutoFlags,				PF_AutoProcess,
				I3D_ParamName,				FuID("Transmittance.B"),
				IC_ControlGroup,			3,
				IC_ControlID,				2,
				INP_MinScale,				0.0,
				INP_MaxScale,				1.0,
				INP_MaxAllowed,			1.0,
				INP_Default,				0.0,
				INP_SubType,				IST_ColorB,
				TAG_DONE);

			//InTransmittanceMtl.AddInput("Transmittance Material", "Material",
			//	LINKID_DataType,			CLSID_DataType_MtlGraph3D,
			//	LINKID_AllowedDataType,	CLSID_DataType_Image,
			// I3D_ParamName,				FuID("TransmittanceMtl"),
			// I3D_ShadeParam,			FALSE,
			//	LINK_Main,					5,
			//	INP_Required,				FALSE, 
			//	OBJP_Owner,					Owner,
			//	TAG_DONE);

		EndGroup();

		InOpacity = AddInput("Opacity", "Opacity", 
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".Opacity"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Default,				DefaultOpacity,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			TAG_DONE);

		InRefrGloss = AddInput("Refraction Gloss", "RefrGloss", 
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".RefrGloss"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Default,				1.0,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			TAG_DONE);

		InRefrIOR = AddInput("Refraction IOR", "RefrIOR", 
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".RefrIOR"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Default,				1.3,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				2.0,
			TAG_DONE);

		InRefrGlossSamples = AddInput("Refraction Gloss Samples", "RefrGlossSamples", 
			LINKID_DataType,			CLSID_DataType_Number, 
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".RefrGlossSamples"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Integer,			TRUE,
			INP_Default,				2.0,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				10.0,
			TAG_DONE);


		InTransmittanceAlphaDetail = AddInput("Alpha Detail", "AlphaDetail",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".TransmittanceAlphaDetail"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_MaxAllowed,			1.0,
			INP_Default,				1.0,
			TAG_DONE);

		InTransmittanceColorDetail = AddInput("Color Detail", "ColorDetail",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".TransmittanceColorDetail"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_MaxAllowed,			1.0,
			INP_Default,				0.0,
			TAG_DONE);

		InTransmittanceSaturation = AddInput("Saturation", "Saturation",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".TransmittanceSaturation"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				1.0,
			TAG_DONE);

		InReflBRDF = AddInput("brdf fresnel", "ReflBRDF", 
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		CHECKBOXCONTROL_ID,
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Default,				0.0,
			ICD_Width,					0.5,
			TAG_DONE);

		InBRDF_Enrg = AddInput("conserve enrg", "BRDF_Enrg", 
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		CHECKBOXCONTROL_ID,
			I3D_AutoFlags,				PF_AutoProcess,
			INP_Default,				1.0,
			ICD_Width,					0.5,
			TAG_DONE);

		InBRDF_90 = AddInput("BRDF 90", "BRDF_90",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".BRDF_90"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				1.0,
			TAG_DONE);

		InBRDF_0 = AddInput("BRDF 0", "BRDF_0",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".BRDF_0"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				1.0,
			INP_Default,				0.8,
			TAG_DONE);

		InBRDF_Curve = AddInput("BRDF Curve", "BRDF_Curve",
			LINKID_DataType,			CLSID_DataType_Number,
			INPID_InputControl,		SLIDERCONTROL_ID,
			LINKID_LegacyID,			FuID(".BRDF_Curve"),
			I3D_AutoFlags,				PF_AutoProcess,
			INP_MinAllowed,			0.0,
			INP_MinScale,				0.0,
			INP_MaxScale,				5.0,
			INP_Default,				2.0,
			TAG_DONE);

	EndGroup();
}