I can fetch a layer list, and I can fetch the objects from a certain layer. However, I can't find anything that changes their visibility. Is that not implemented?
If it is, is it possible to run a script that I could use for toggling visibility based on a variable within the script? AFAIK the whole script is always run, so if I define switch variables and change them, they're reset every time I run the script again.
Dang, it's still not 100% right. The buildings don't generate if the models are deleted. I tried putting ce.generateModels(VisibleObjects) under the block at line 48 (# set generate attribute for visible layers), but running the code just locks up CE. Any idea why that might be?
Try putting them in a valid selection and then passing the selection first, then hit generate on it rather than the layer.
ce.generateModels(ce.selection())
Thanks for linking the reference, I completely forgot about the options. Setting synchronous to false did the trick.
That makes sense actually. Other parameters would have been next on the list, but considering your context synchronous to false makes sense. Care to share a gif of the result? I am curious of the end result?
Here you go. I stuffed this in a loop to go through a bunch of layers and check if the models in them touch other stuff.
ZR, This is a CityEngine python question, and not an ArcPy question, right? Just clarifying for Ben.
I don't know the answer, but I have a friend David with the same question. I sent him a link to this. Maybe one or the other of you will find the answer.
Chris
I have run into the same problem. I have been able to get the layer list into a web scene (see image below), but I am having the same problem. I am continuing to research it, but I bet it hinges on filtering out each layer with a new 3DView or some other class. How they interact is still some I am playing with.
We will figure this out.
Thanks Chris. Will let you know how it goes later tonight.
Hopefully now I will have 200 cross sections webscenes, and 200 snap shots XD.