Change default material
-
It is possible to change the default material of the box within this script to opacity 30% automaticly?
...and set the value for the z-axis to -10cmBurkhard
-
@burkhard said:
It is possible to change the default material of the box within this script to opacity 30% automatically?
...and set the value for the z-axis to -10cmBurkhard
values = [100.cm, 100.cm, 100.cm, 0.cm, 0.cm, -10.cm] new_material=model.materials.add("Burkhard_Material") new_material.color=[128,128,128] ### a mid-grey, adjust to suit... new_material.alpha=0.5 ### 0.5=50%, 1=opaque entities.each{|e|e.material=new_material if e.typename=="Face"}
-
Thanks TIG,
but there's no change in the prompt box. I'll set the value to -10
and the box dimensions to 3oo. The prompt window shows default settings : 100 and 0.... and where do I have to copy these new material files. My tries show no results.
thanks again Burkhard
-
@burkhard said:
Thanks TIG,
but there's no change in the prompt box. I'll set the value to -10
and the box dimensions to 3oo. The prompt window shows default settings : 100 and 0.... and where do I have to copy these new material files. My tries show no results.
thanks again Burkhard
Here's a 'tweaked' version of the script. Read the ### parts to see what I've done. I added the material part in near the end after the faces are made, AND made the 'def' within a 'Box' class and then split the dialog variables as @xxx so they are defaulted at the first go but they are then remembered as last set during that session.
-
Works well here.
Thanks a lot TIG. These credits are yours
Burkhard
Advertisement