r3vsl
real/code/r3vsl.h
r3code
VSL material Class
r3Materialbase
R3CLID_MATERIALBASE
r3Vsl
R3CLID_VSL - 53
ALLOCPROP, REMOVEPROP, ENUMPROPS, INITIALIZEROOTSHADER, CHECKPROP, INSERTPROP, SETATTRSHOWSTATE, GETATTRIBUTESHOWSTATE, SHADERCHANGED, SETATTRNAME, GETATTRIBUTENAME, ADDCHANNEL, UNLINKPROP, GETPHASELEVEL, ISOFPHASELEVEL, SETATTRSHOWSTATEBYOBJ, SETATTRNAMEBYOBJ, MAKENAME, FINDBYNAME, MATCHNAME, SETATTRTOOLTIP, GETATTRIBUTETOOLTIP, CHANNELENUMCB, CHANNELRENAMECB, GETATTRPOS,
RootShader, ShowAdvanced, CurrentLevel, VirtualRoot, SelectedShader, AlsoChangesObj, AlsoChangesMth, PrepareChangesMth,
int R3RegisterVSLClass(R3APP *app);
R3VSLM_ALLOCPROP
ALLOCPROP
R3VSLM_ALLOCPROP
R3OBJ*, address of the shader object or NULL if failed
R3INT, output identifier, Must be 0.
R3INT, class id of the return value channel (R3CLID_COLORCHANNEL etc.).
R3TAG*, R3VSLA_MatpropClass, R3VSLA_MatpropParent, R3VSLA_MatpropType, R3VSLA_MatpropChannelName
rc = obj.ALLOCPROP(p1, p2, p3);
Create new shader for the material
R3VSLM_REMOVEPROP
REMOVEPROP
R3VSLM_REMOVEPROP
R3OBJ*, object to be removed
obj.REMOVEPROP(p3);
Remove the given property object.
R3VSLM_ENUMPROPS
ENUMPROPS
R3VSLM_ENUMPROPS
R3OBJ*, object to be called
R3INT, method for the callback object
void*, user data
obj.ENUMPROPS(p1, p2, p3);
Enumerate shaders in the material. The callback object is called as R3SendMsg(p1, p2, R3RA_SenderObject, shader, R3TAG_END);
R3VSLM_INITIALIZEROOTSHADER
INITIALIZEROOTSHADER
R3VSLM_INITIALIZEROOTSHADER
void*, TRUE if successful
rc = obj.INITIALIZEROOTSHADER();
for internal use. Initilizes root shader.
R3VSLM_CHECKPROP
CHECKPROP
R3VSLM_CHECKPROP
void*, TRUE if successful
R3OBJ*, shader to be checked
rc = obj.CHECKPROP(p3);
check inputs and outputs of a shader and modifies them if necessary.
R3VSLM_INSERTPROP
INSERTPROP
R3VSLM_INSERTPROP
R3OBJ*, address of the shader object or NULL if failed
R3OBJ*, parent
R3OBJ*, previous
R3OBJ*, new shader
rc = obj.INSERTPROP(p1, p2, p3);
Insert a shader under parent
R3VSLM_SETATTRSHOWSTATE
SETATTRSHOWSTATE
R3VSLM_SETATTRSHOWSTATE
void*, TRUE if successful
R3INT, attribute tag
R3INT, show state (TRUE == show, FALSE == hide)
rc = obj.SETATTRSHOWSTATE(p1, p3);
Sets the show state of a material attribute. These are the attributes * that the material reports in response to the R3RM_MAKETAGLIST method. (Includes * attributes of shaders that are contained in the material).
R3VSLM_GETATTRIBUTESHOWSTATE
GETATTRIBUTESHOWSTATE
R3VSLM_GETATTRIBUTESHOWSTATE
void*, TRUE if shown, FALSE if hidden.
R3INT, attribute tag
rc = obj.GETATTRIBUTESHOWSTATE(p3);
Gets the show state of a material attribute.
R3VSLM_SHADERCHANGED
SHADERCHANGED
R3VSLM_SHADERCHANGED
void*, TRUE
rc = obj.SHADERCHANGED();
Notifies the material, that an attribute of its shader has changed.
R3VSLM_SETATTRNAME
SETATTRNAME
R3VSLM_SETATTRNAME
void*, TRUE if successful
R3INT, attribute tag
char*, attribute name
rc = obj.SETATTRNAME(p1, p3);
Sets the name of a material attribute. These are the attributes * that the material reports in response to the R3RM_MAKETAGLIST method. (Includes * attributes of shaders that are contained in the material).
R3VSLM_GETATTRIBUTENAME
GETATTRIBUTENAME
R3VSLM_GETATTRIBUTENAME
void*, TRUE if the attribute is found, FALSE otherwise
R3INT, attribute tag
rc = obj.GETATTRIBUTENAME(p3);
Gets the name of a material attribute.
R3VSLM_ADDCHANNEL
ADDCHANNEL
R3VSLM_ADDCHANNEL
obj.ADDCHANNEL();
used internally
R3VSLM_UNLINKPROP
UNLINKPROP
R3VSLM_UNLINKPROP
obj.UNLINKPROP();
removes the shader from the material but does not delete the shader.
R3VSLM_GETPHASELEVEL
GETPHASELEVEL
R3VSLM_GETPHASELEVEL
R3OBJ*, address of the phase level
R3CLID, class id of the phase
rc = obj.GETPHASELEVEL(p3);
Returns the address of the given phase level. If not found, creates one.
R3VSLM_ISOFPHASELEVEL
ISOFPHASELEVEL
R3VSLM_ISOFPHASELEVEL
obj.ISOFPHASELEVEL();
private
R3VSLM_SETATTRSHOWSTATEBYOBJ
SETATTRSHOWSTATEBYOBJ
R3VSLM_SETATTRSHOWSTATEBYOBJ
void*, TRUE if successful, FALSE if op is not a child of material or the attr tag is unknown.
R3INT, attribute tag
R3INT, show state (TRUE == show, FALSE == hide)
rc = obj.SETATTRSHOWSTATEBYOBJ(0, p2, p3);
Sets the show state of a material attribute by a sub operator address and attribute tag.
R3VSLM_SETATTRNAMEBYOBJ
SETATTRNAMEBYOBJ
R3VSLM_SETATTRNAMEBYOBJ
void*, TRUE if successful, FALSE if op is not a child of material or the attr tag is unknown.
R3OBJ*, address of shader
R3INT, attribute tag
char*, new name
rc = obj.SETATTRNAMEBYOBJ(p1, p2, p3);
Sets the name of a material attribute by a sub operator address and attribute tag.
R3VSLM_MAKENAME
MAKENAME
R3VSLM_MAKENAME
R3INT, max size of the buffer
R3OBJ*, root
char*, buffer for the name
obj.MAKENAME(p1, p2, p3);
Make full name for given shader object. The name is * of form: 'root/../..
R3VSLM_FINDBYNAME
FINDBYNAME
R3VSLM_FINDBYNAME
R3OBJ*, shader if found
R3OBJ*, shader from which search starts, if not given search starts from the root shader
char*, full name
rc = obj.FINDBYNAME(p1, p3);
Find shader by name
R3VSLM_MATCHNAME
MATCHNAME
R3VSLM_MATCHNAME
R3BOOL, true if match
char*, regular expression (/Root/Phase Level/Constant etc.)
rc = obj.MATCHNAME(p3);
Check if the name of the given shader match the given regular expression.
R3VSLM_SETATTRTOOLTIP
SETATTRTOOLTIP
R3VSLM_SETATTRTOOLTIP
void*, TRUE if successful
R3INT, attribute tag
char*, attribute tooltip
rc = obj.SETATTRTOOLTIP(p1, p3);
Sets the tooltip of a material attribute. These are the attributes * that the material reports in response to the R3RM_MAKETAGLIST method. (Includes * attributes of shaders that are contained in the material).
R3VSLM_GETATTRIBUTETOOLTIP
GETATTRIBUTETOOLTIP
R3VSLM_GETATTRIBUTETOOLTIP
void*, TRUE if the attribute is found, FALSE otherwise
R3INT, attribute tag
rc = obj.GETATTRIBUTETOOLTIP(p3);
Gets the tooltip of a material attribute.
R3VSLM_CHANNELENUMCB
CHANNELENUMCB
R3VSLM_CHANNELENUMCB
obj.CHANNELENUMCB();
R3VSLM_CHANNELRENAMECB
CHANNELRENAMECB
R3VSLM_CHANNELRENAMECB
obj.CHANNELRENAMECB();
R3VSLM_GETATTRPOS
GETATTRPOS
R3VSLM_GETATTRPOS
R3INT, 1 if the first, 2 if the last, 0 if in the middle, -1 if not found.
R3INT, attr
R3INT, index
rc = obj.GETATTRPOS(p1, p3);
See if the attribute is the first or the last in the easy-to-use list.
RootShader
RootShader
R3VSLA_RootShader
Object
R3OBJ*
root matprop
value = jsobj.GetRootShader();
R3OBJ* value;
R3GetAttrs(r3obj, R3VSLA_RootShader, &value, R3TAG_END);
ShowAdvanced
ShowAdvanced
R3VSLA_ShowAdvanced
Boolean
R3BOOL
enable advanced mode
jsobj.SetShowAdvanced(value);
value = jsobj.GetShowAdvanced();
R3BOOL value = ...;
R3SetAttrs(r3obj, R3VSLA_ShowAdvanced, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3VSLA_ShowAdvanced, &value, R3TAG_END);
CurrentLevel
CurrentLevel
R3VSLA_CurrentLevel
Object
R3OBJ*
R3OBJ, current shader
jsobj.SetCurrentLevel(value);
value = jsobj.GetCurrentLevel();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3VSLA_CurrentLevel, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3VSLA_CurrentLevel, &value, R3TAG_END);
VirtualRoot
VirtualRoot
R3VSLA_VirtualRoot
Object
R3OBJ*
R3OBJ, virtual root shader
jsobj.SetVirtualRoot(value);
value = jsobj.GetVirtualRoot();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3VSLA_VirtualRoot, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3VSLA_VirtualRoot, &value, R3TAG_END);
SelectedShader
SelectedShader
R3VSLA_SelectedShader
Object
R3OBJ*
R3OBJ, selected shader
jsobj.SetSelectedShader(value);
value = jsobj.GetSelectedShader();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3VSLA_SelectedShader, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3VSLA_SelectedShader, &value, R3TAG_END);
AlsoChangesObj
AlsoChangesObj
R3VSLA_AlsoChangesObj
Object
R3OBJ*
callback object: R3DoA2(aco, mth, obj, tag);
jsobj.SetAlsoChangesObj(value);
value = jsobj.GetAlsoChangesObj();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3VSLA_AlsoChangesObj, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3VSLA_AlsoChangesObj, &value, R3TAG_END);
AlsoChangesMth
AlsoChangesMth
R3VSLA_AlsoChangesMth
Integer
R3INT
callback method: called after an attributes has changed
jsobj.SetAlsoChangesMth(value);
value = jsobj.GetAlsoChangesMth();
R3INT value = ...;
R3SetAttrs(r3obj, R3VSLA_AlsoChangesMth, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3VSLA_AlsoChangesMth, &value, R3TAG_END);
PrepareChangesMth
PrepareChangesMth
R3VSLA_PrepareChangesMth
Integer
R3INT
called when an attribute is about to change
jsobj.SetPrepareChangesMth(value);
value = jsobj.GetPrepareChangesMth();
R3INT value = ...;
R3SetAttrs(r3obj, R3VSLA_PrepareChangesMth, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3VSLA_PrepareChangesMth, &value, R3TAG_END);
r3appobj *