Is there any way to control the section fill and section cut of the currently active style? I didn’t find the relevant api，Only see that you can set the name and description， thanks
The RenderingOptions class contains method to extract the rendering information for a model.
The #each method iterates through all of the rendering options key/value pairs and you can retrieve winch rendering information keys holds what values…
For sections, this keys are there:
SectionActiveColor SectionCutDrawEdges SectionCutFilled SectionCutWidth SectionDefaultCutColor SectionDefaultFillColor SectionInactiveColor
… and after making changes to the active style (what is displayed), you need to update this style.
To do this updating, you must first select the active style in the browser (Materials inspector panel) and then make the changes, lastly update the style …
model = Sketchup.active_model styles = model.styles styles.selected_style= styles.active_style # # Make rendering options changes HERE # styles.update_selected_style
If you do not select the active style first, then any changes will be discarded when the style selection is changed, either manually or via the
#selected_style= setter method.
thinks I have another question. Do you know how to implement a function similar to that in Advanced Camera Tools? After creating a camera, you can press a certain direction arrow, such as holding down shift+“←” to pan the viewport to the left?
Please start new questions in a new topic thread. (This one is already marked as solved.)
I suggest using the Walk tool. It accepts arrow and Shift+arrow keys to pan the camera.