Yeah, sorry about that. I suppose I shoul give it its own spot for developer use
Posts
-
RE: Vector.angle_between() -- Direction?
-
RE: Vector.angle_between() -- Direction?
I created a vector1.flat_angle(vector2) method that does this work for you.
-
RE: Sketchup.active_model.layers returns <Deleted Entity>?
I tried your example script, and see the problem you see.
According to the SU ruby docs:
"Currently there are two behaviors defined.
A page keeps a list of layers that do not have their default behavior. If a layer is not in that list, then it is set to its default visibility determined by one of these flags.
LAYER_VISIBLE_BY_DEFAULT 0x0000
LAYER_HIDDEN_BY_DEFAULT 0x0001"The strange thing is that in commenting out different lines and trying the script again, LAYER_IS_HIDDEN_ON_NEW_PAGES is the setting that sticks - not LAYER_IS_HIDDEN_BY_DEFAULT.
I'll report that to the SU crew.
-
RE: Sketchup.active_model.layers returns <Deleted Entity>?
Just tried this with FlightPath (which uses LAYER_IS_HIDDEN_ON_NEW_PAGES) and it worked fine. I saved the model, started a new model, then re-opened the saved model and checked the layer.page_behavior. Everything was saved with the model.
-
RE: Sketchup.active_model.layers returns <Deleted Entity>?
You can get the same thing with Sketchup.active_model.pages
The problem usually occurs when something is assigned to a variable (ie pages=Sketchup.active_model.pages), the script is loaded (say, on SU startup), and then you start/open a new model. pages was defined with the original model, and doesn't get redefined to the new model.I've mentioned this to the SU crew regarding pages. I can add that you've had the same problem with layers
-
RE: [Plugin] fixAspectRatio
I am not aware of a way to do this via ruby, other than to create an observer to report the current ratio as the user changes the size of the window manually. I have thought about doing this one, but haven't gotten to it yet.
-
RE: [Plugin] fixAspectRatio
Okay, thanks. I'll keep that in mind for the next time
-
[Plugin] fixAspectRatio
When using various Film & Stage cameras with fixed aspect ratios (and sometimes when importing components saved out from a PhotoMatch session), you can get gray bars on screen.
This new plugin will restore the aspect ratio to full display area without changing the view.
It adds a new item ("Fix Aspect Ratio") to the Camera menu.
-
RE: Saved file does not match what's on the screen.
I could take a look - contact me through Smustard.
-
RE: Accessing submenus / extension manager
Burkhard,
Yes, I fixed it last night and just sent it to you. There were a few reasons (like I mentioned above) that I took it off of Smustard, but am considering putting it back up.
-
RE: Accessing submenus / extension manager
I wrote a pair of ruby scripts that automatically rewrote the menu section of every script in the plugins folder (except for the utility scripts from SU) and then allowed users to organize their scripts into subfolders. It was temporarily available at http://www.smustard.com
One downfall was that double-clicking a file in the browser caused the scripts to not load. There might be a way around that now.
Another problem was that a few scripts couldn't be rewritten by the rewrite script because of strange formatting by the authors.
-
RE: Something about AppObserver#onQuit
Sorry I'm no help - have not tried that observer yet. The onSave observer has been requested, and noted by the SU folks, so maybe we'll get that one soon...
-
RE: Align points
Pixero,
When you add the observer, assign it to a variable, like this:
$af=Sketchup.active_model.entities.add_observer(AutofoldWatch.new) ###Observer addedThen, when you want to delete the observer, use
Sketchup.active_model.entities.remove_observer $af ###Observer removed
The reason is, right now the code tries to remove a class, rather than removing an instance of that class. That doesn't work
Hope that helps...
-
RE: [Plugin] Skin.rb
Welcome!
Re: groups, I also had the "pending" issue. I finally ended up cancelling and re-joining, which worked. I now have access. But I still like it better over here than in groups...
-
RE: [Plugin] Self Paced Tutorial Assitant
Sounds like AddPages but with an added geometry copier.
-
[Plugin] New Script: CameraDistance
A new free script at Smustard is CameraDistance - it returns the distance from the camera eye point to the nearest object in the direct line of sight (the ray from the camera eye through the camera target - or, the thing in the absolute middle of the screen). Enjoy...
-
Kann jemand mir helfen zu erlernen?
Würde jemand bereit sein, mir zu helfen zu erlernen, Deutsches zu sprechen (vermutlich durch email)? Ich habe Zahlen, Buchstaben, Monate, Tage, Farben und Jahreszeiten erlernt, aber ich benötige Hilfe beim Gespräch. Danke!
(Seien nicht beeindruckt Sie - dieses war on-line-Übersetzung)
[RickW]