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."

Screen Shot 2021-06-03 at 9.14.31 AM.png

Click on the "New rule" line to open the rule options.

Screen Shot 2021-06-03 at 9.14.39 AM.png

Give the rule a descriptive name.

Screen Shot 2021-06-03 at 9.14.56 AM.png

Click the "+" to the right side of "Conditions" to add a condition.
Screen Shot 2021-06-03 at 9.15.19 AM.png

Select from the list of existing attributes on the catalog item.

Screen Shot 2021-06-03 at 9.16.11 AM.png

Operator value options will vary by the attribute type.

String Number Color Part Reference Image
Screen Shot 2021-06-03 at 9.24.32 AM.png Screen Shot 2021-06-03 at 9.24.23 AM.png Screen Shot 2021-06-03 at 9.26.16 AM.png Screen Shot 2021-06-03 at 9.26.23 AM.png Screen Shot 2021-06-03 at 9.26.32 AM.png

Select an appropriate operator and type or select the desired value in the right-hand field.

Screen Shot 2021-06-03 at 9.21.02 AM.png

Adding Rules & Setting Conditions in Assets

In the asset editor, click the "layout" tab.
Screen Shot 2021-06-03 at 3.31.42 PM.png

Add any relevant attributes in the Attributes Tab.

Click the "Rules" tab and add a new rule. Give the rule a descriptive name.

   
Screen Shot 2021-06-03 at 3.37.58 PM.png Screen Shot 2021-06-03 at 3.38.02 PM.png

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.

Asset Boolean
Screen Shot 2021-08-17 at 12.39.31 PM.png Screen Shot 2021-06-03 at 3.14.36 PM.png

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."
Screen Shot 2021-06-03 at 9.30.57 AM.png

Select the desired attribute to change from the dropdown.
Screen Shot 2021-06-03 at 9.41.55 AM.png

Toggle the slider to the desired setting.
Screen Shot 2021-06-03 at 9.31.48 AM.png

Screen Shot 2021-06-03 at 9.31.55 AM.png

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."
Screen Shot 2021-06-03 at 9.31.07 AM.png

Select the desired attribute from the dropdown menu.
Screen Shot 2021-06-03 at 9.42.51 AM.png

Toggle the slider to the desired setting.
Screen Shot 2021-06-03 at 9.43.28 AM.png

Screen Shot 2021-06-03 at 9.43.35 AM.png

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."
Screen Shot 2021-06-03 at 9.31.12 AM.png

Select the desired attribute.
Screen Shot 2021-06-03 at 9.55.37 AM.png

Select where the new value will originate. Options will vary by attribute type.

Screen Shot 2021-06-03 at 9.55.46 AM.png

Value will allow the attribute to be set to a specific static value.

Screen Shot 2021-06-03 at 9.56.48 AM.png

The attribute will take the same value as another attribute of the same type.

Screen Shot 2021-06-03 at 9.57.00 AM.png

Database Query will pull values from an existing data table.
Screen Shot 2021-06-03 at 9.57.13 AM.png

Values may also be pulled using metadata.
Screen Shot 2021-06-03 at 9.58.04 AM.png

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."
Screen Shot 2021-06-03 at 9.31.17 AM.png

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."
Screen Shot 2021-06-03 at 9.31.23 AM.png

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

Screen Shot 2021-06-03 at 9.31.29 AM.png

Custom script is coded in JS.

Screen Shot 2021-06-03 at 1.47.22 PM.png

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."

Screen Shot 2021-06-04 at 10.02.31 AM.png

Set the first dropdown to the appropriate node.

Screen Shot 2021-06-04 at 10.02.46 AM.png

Select how the node visibility will be manipulated. Most often this is with "attribute."

Screen Shot 2021-06-04 at 10.03.09 AM.png

Select the attribute.

NOTE: The attribute type must be boolean (true/false) and exist on the 3D asset.

Screen Shot 2021-06-04 at 10.03.29 AM.png

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."

Screen Shot 2021-06-04 at 10.15.45 AM.png

Set the first dropdown to the appropriate node(s).

Screen Shot 2021-06-04 at 10.17.56 AM.png

Select how the node(s) will receive values. Most often this is "attribute."

Screen Shot 2021-06-04 at 10.20.07 AM.png

Screen Shot 2021-06-04 at 10.18.03 AM.png

Select the attribute from the dropdown. NOTE: The attribute must be of type "material" and exist on the 3D asset.

Screen Shot 2021-06-04 at 10.18.08 AM.png

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."

Screen Shot 2021-06-04 at 10.25.13 AM.png

Select the desired node from the dropdown.

Screen Shot 2021-06-04 at 10.28.58 AM.png

Select how the node will be changed. Most often this is "attribute."

Screen Shot 2021-06-04 at 10.29.04 AM.png

Select the attribute from the list. NOTE: The attribute must be of type "model" and exist on the 3D asset.

Screen Shot 2021-06-04 at 10.29.11 AM.png

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."

Screen Shot 2021-06-04 at 10.32.12 AM.png

Follow the node path selections to choose the desired property.

Screen Shot 2021-06-04 at 10.32.55 AM.png

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.

Screen Shot 2021-06-04 at 10.33.45 AM.png

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."

Screen Shot 2021-06-04 at 10.35.55 AM.png

Select from the available cameras.

Screen Shot 2021-06-04 at 10.36.02 AM.png

What is that chain option?

Screen Shot 2021-06-04 at 10.23.04 AM.png

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.

Screen Shot 2021-06-04 at 11.21.24 AM.png

REMEMBER:
  • ALL conditions must be true for actions to trigger.
  • ALL actions will trigger if the conditions are met.
Share this