When i add a component, but the component lose the face's material

components

#1
component_instance, component_transformation = @parallels_components[component_index][0]
new_component_transformation = component_transformation.clone
new_component_transformation.set!(new_origin)
entities.add_instance(component_instance.definition, new_component_transformation)

how to add a component instance with the same face’s material


#2

Please enclose your code in backticks to make it readable properly:

On a new line type three backticks ``` then (no spaces) ruby

Then your code.

Then a new line and three more backticks

Then another new line and the continuation of your post


#3

thank you for your notice


#4

ok, i have solved it.
i just add it.

new_component_instance.material = component_instance.material

#5

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.