Ramp control in AETemplete


#1

Hi.
How can I use ramp control with mental ray shaders? I mean “AEaddRampControl” command in AETemplete.
It works fine with MayaAPI node (plugin).

But print error with same node generated from mental ray shader.

../scripts/AETemplates/AEaddRampControl.mel line 281: Attribute is not a ramp.


Shader itself works fine, the issue only with GUI.
What is wrong? Is it possible?

It’s my AETemplete:

global proc AEp_flameTemplate( string $nodeName )
 {
 	AEswatchDisplay $nodeName;
 	editorTemplate -beginScrollLayout;
 		editorTemplate -beginLayout "Main" -collapse 0;
 			AEaddRampControl ($nodeName+".density");
 			AEaddRampControl ($nodeName+".color");
 			editorTemplate -label "Step Size" -addControl "stepSize";
 			editorTemplate -label "Jitter" -addControl "jitter";
 		editorTemplate -endLayout;
 		AEdependNodeTemplate $nodeName;
 		editorTemplate -addExtraControls;
 
 	editorTemplate -endScrollLayout;
 }

And mi shader declaration:

declare shader
 		color					#: shortname "oc"
 	"p_flame" (
 		array struct	"density" {
 			scalar	"density_Position",		#: shortname "denp"
 			scalar	"density_FloatValue",	#: shortname "denfv"
 			integer	"density_Interp"		#: shortname "deni"
 			},						#: shortname "den"
 		array struct	"color" {
 			scalar	"color_Position",	#: shortname "clrp"
 			color 	"color_Color",	#: shortname "clrcv"
 			integer	"color_Interp"	#: shortname "clri"
 			},						#: shortname "clr"
 		scalar		"stepSize",		#: shortname "step" min 0.0 max 100.0 softmin 0.01 softmax 1.0 default 0.1
 		scalar		"jitter"		#: shortname "jitter" min 0.0 max 1.0 default 0.5
 	)
 	version 1
 	apply volume
 	volume level 1
 	#: nodeid 333052
 end declare