Rules
What are Rules?
Rules are used for refining configurator options, adjusting asset values, and manipulating the user interface.
NOTE:
Rules may be created without conditions or with multiple conditions.
Rules may trigger a single action or multiple actions.
Rule Order
All rules are triggered from top to bottom.
All conditions and actions are triggered from top to bottom.
Adding Rules & Setting Conditions in Catalog
Enter edit mode for the catalog item.
Scroll to the bottom left and locate "Rules." Click "Add Rule."
Click on the "New rule" line to open the rule options.
Give the rule a descriptive name.
Click the "+" to the right side of "Conditions" to add a condition.
Select from the list of existing attributes on the catalog item.
Operator value options will vary by the attribute type.
Select an appropriate operator and type or select the desired value in the right-hand field.
Adding Rules & Setting Conditions in Assets
In the asset editor, click the "layout" tab.
Add any relevant attributes in the Attributes Tab.
Click the "Rules" tab and add a new rule. Give the rule a descriptive name.
Click the "+" to add new conditions if desired.
Operator value options will vary by the attribute type. In addition to those above, the following are asset specific.
Actions Note
Some actions are only available in the asset editor mode.
Typically only those actions necessary for 3D asset modification are placed on the asset. All other actions are created on rules within the catalog item.
Actions: "set attribute visible"
This action hides or shows attribute values in the configurator. If an attribute is hidden from the end user, it will retain its default value.
Click the "+" icon to the right of the "Actions" and select "set attribute visible."
Select the desired attribute to change from the dropdown.
Toggle the slider to the desired setting.
Actions: "set attribute enabled"
This action disables or enables the attribute within the configurator. If an attribute is disabled, the value will no longer affect the preview or renders.
NOTE:
Disabling an attribute does not hide it in the configurator.
Click the "+" icon to the right of the "Actions" and select "set attribute visible."
Select the desired attribute from the dropdown menu.
Toggle the slider to the desired setting.
Actions: "set attribute value"
This action changes the current value of the selected attribute. The new value will persist until changed by a user or another rule action.
Click the "+" icon to the right of the "Actions" and select "set attribute value."
Select the desired attribute.
Select where the new value will originate. Options will vary by attribute type.
Value will allow the attribute to be set to a specific static value.
The attribute will take the same value as another attribute of the same type.
Database Query will pull values from an existing data table.
Values may also be pulled using metadata.
Actions: "set attribute value visibility"
This action allows attributes with multiple predefined values to show or hide specific value options in the configurator based upon rule conditions. Hidden values may still be utilized by other rules.
Click the "+" icon to the right of the "Actions" and select "set attribute value visibility."
Actions: "set attribute value enabled"
This action allows attributes with multiple predefined values to enable or disable specific value options in the configurator based upon rule conditions. Disabled values are not passed on and no longer affect the preview or renders.
NOTE:
Disabling an attribute value does not hide it from the user in the configurator.
Click the "+" icon to the right of the "Actions" and select "set attribute value enabled."
Actions: "custom script"
Custom script should be used with caution as it may change the behavior of other features within Threekit in unexpected ways.
Click the "+" icon to the right of the "Actions" and select
Custom script is coded in JS.
Actions: "set visibility"
This action changes hides or shows the selected node on the 3D asset when utilized in preview or for renders.
Click the "+" icon to the right of the "Actions" and select "set visibility."
Set the first dropdown to the appropriate node.
Select how the node visibility will be manipulated. Most often this is with "attribute."
Select the attribute.
NOTE: The attribute type must be boolean (true/false) and exist on the 3D asset.
Actions: "set material"
This action allows material to be dynamically changed, often by manipulating attributes in the configurator.
Click the "+" icon to the right of the "Actions" and select "set material."
Set the first dropdown to the appropriate node(s).
Select how the node(s) will receive values. Most often this is "attribute."
Select the attribute from the dropdown. NOTE: The attribute must be of type "material" and exist on the 3D asset.
Actions: "set model"
This action allows the model to be dynamically changed, often by manipulating attributes in the configurator.
Click the "+" icon to the right of the "Actions" and select "set model."
Select the desired node from the dropdown.
Select how the node will be changed. Most often this is "attribute."
Select the attribute from the list. NOTE: The attribute must be of type "model" and exist on the 3D asset.
Actions: "set property"
This action allows properties of the 3D asset node to be dynamically changed, often by manipulating attributes with rules in the configurator.
NOTE:
This can manipulate any property in the asset Properties panel in the Editor mode.
Click the "+" icon to the right of the "Actions" and select "set property."
Follow the node path selections to choose the desired property.
Options will vary depending on property type. Common options are static values or linking to attributes. NOTE: When linking to attributes, the attribute must be exist on the 3D asset.
Actions: "set active camera"
This action allows selection of camera to be dynamically changed, often by manipulating attributes with rules in the configurator.
Click the "+" icon to the right of the "Actions" and select "set active camera."
Select from the available cameras.
What is that chain option?
The "chain" icon provides the ability to choose between using the incoming attribute instance or to create a new instance.
Typically the incoming instance is used, however there are instances when you will wish to unlink the nodes so a single instance may be manipulated. For example, if you assign one material to 4 parts but you want to override a property of the material on one of the parts. You unlink it and then can modify that one instance.
Complex Rules
Rule Order
All rules are triggered from top to bottom.
All conditions and actions are triggered from top to bottom.
When multiple changes need made based upon the same condition(s), a single rule may be implemented. Click the "+" icon to add additional conditions and/or actions as desired.
REMEMBER:
ALL conditions must be true for actions to trigger.
ALL actions will trigger if the conditions are met.
Last updated