Hi,
I am new to Rhino and I am looking for some assistance.
I’ve got 1489 Library items which have “Display Colour” set to “By Layer”, when I insert any of these items into a model as a block they keep their original colour. I was hoping that someone may have a script which will run through all the Library files and change “Display Colour” to “By Parent”.
Hi Leigh - this script will ‘ByParentize’ all blocks in the current file. To use the script, save it someplace sensible on your machine and then drag and drop from there onto Rhino - from then on, you should be able to type (or put on a button) ‘ByParentize’ and have it run.
Hi Pascal,
Thanks very much for that, but I will be creating many models which will make use of these library models and therefore I was hoping that I could get a script that will individually open each of the Library Files and make the change to By Parent at that level.
Hi Gijs,
I am not all that familiar with preparing scripts but I will give it a shot at changing the commands as required, thanks very much for your help.
I have tried a combination of the above files but have been unable to build a script to run through my models and “ByParentize” the Colour of each of my individual models. Please note the models I am trying to process do not contain Blocks.
Apologies for my incompetence, but I am new to Rhino.
you can probably achieve it then with the attached script. Note this is not a vbscript, but a python script. To run it, save it to a location of choice, use RunPythonscript and browse to the script location. Though I tested it, please test it yourself on a test-folder first.
Hi Gijs,
I have tried the attached Python Script, I certainly runs through all the files but doesn’t seem to carry out any processing - see below from Command Line.
That certainly sets the material to “Use Object Parent”, however when I open a new model and insert any of the processed models they still come in displaying their original colour and do not take the colour from the layer that they are inserted on. Any advise?
Please note, in that code if any of your objects are already inside blocks, they will not be set to ByParent. AFAIK the rs.AllObjects does not return objects inside block definitions - it would need a few more lines of code to make it work if your files to be processed contain any blocks.