StartUp commands in WIP (5E7w)


#1

Continuing the discussion from Rhino 5 for Mac WIP Build 5E7w:

[quote]What’s New in this RhinoWIP:

You can now run commands every time a model is opened (Preferences > General)
[/quote]

should the commands run every time a new model is opened? or, every time Rhino is launched?

reason i ask is because i’d like to use TestToggleRoundPoints in this new preference option instead of my old method of running a startUp macro upon launching…
but the problem is, i get round points in the first model, then a new model has them toggled off, then on for the next etc.

i haven’t completely thought through all the various scenarios one may encounter but based on this single problem, it seems the list of commands should run when launching rhino as opposed to every time a new model is opened.

??

thanks


[edit]… or hey, maybe just make round points a real display mode option instead of a test command :wink: …i’ve been using them for years and i’m pretty sure they haven’t caused me any problems.


(Pascal Golay) #2

Hi Jeff - can you see point clouds when round points are on?
-Pascal


#3

hmm. i’m not sure.
now that you ask, i don’t think i’ve ever used point clouds… at most, i might have 2-300 visible points in a file… usually less.
so on that note, mark me off the list of testers for round points :wink:


(Pascal Golay) #4

OK. Round points are on the way (v6) and the test command did, on Windows, and on at least some systems (mine) interfered with the display of point clouds.

-Pascal


#5

ok. nice.

so @pascal, on windows, do the startup commands run only once at the beginning of a session? or every time you open a new model? (or are new models even possible on windows in the same way they are on mac?)


(Pascal Golay) #6

Hi Jeff - on Windows the startup commands run per session only.
https://mcneel.myjetbrains.com/youtrack/issue/RH-37555

-Pascal


#7

yeah, to me, that seems correct.
but again, i haven’t really thought this through…
maybe @dan or marlin or someone is seeing something advantageous with running the commands per model?


(Dan Belcher) #8

@jeff_hammond To be honest, we didn’t know what ought to happen here, so we did something rather provocative in this RhinoWIP. Since Rhino for Mac is fundamentally different from Rhino for Windows in this regard - being a multi-doc application (where even zero documents can be open) - it seemed an interesting experiment. Another key little difference - as I’m sure aware - is that Rhino for Mac’s splash screen doesn’t automagically disappear after being launched and open a document as Rhino for Windows does.

@pascal’s logged MR-3019 and I understand. Admittedly, I’m still trying a little to understand what best to do…

Rhino for Windows says:
“Run these commands every time Rhino starts:”

Right now, RhinoWIP 5E7w says:
"Run these commands every time a model is opened:"
Given that Rhino for Mac will not automatically open a new document when you double-click the application icon, let me ask this question: what should replace the above wording?

Humor me.


(Pascal Golay) #9

“Run these commands when the Rhino application starts:” ?

-Pascal


#10

how are yours displaying there? mine have an almost non existent outline.


#11

Well, not to open a can of worms here, but…

This fundamental difference between how the Mac and Windows versions behave (MDI/Multiple instances) is something that has always annoyed me (as a Windows user), but perhaps can be used as a way to improve the behavior of both versions in this instance…

On the Windows side, the startup commands run when one opens a new instance of Rhino, that could be by either using the program icon to open a new blank document in a new instance or by double clicking on a file. However, if you open a new document from within an open instance, the startup commands do not run. This can be either a good or a bad thing, depending on if the commands you want to run - this assumes that the startup commands are being used to set up Rhino, but maybe you also want to run something that sets up the document - a script or something that can’t be included in a template for some reason…

So maybe there are two sections in startup commands - one that runs any time you open the application - on Mac that would be only once and on Windows any time a new instance was opened - and the second section would be one that runs any time a new document is opened… Just throwing this out there, maybe I haven’t thought through all the implications…


#12

something on mac that i like is the commands which remember their settings throughout a session apply to new models as well… for example, do ExtrudeCrv with bothSides option… if you run it again, both sides will be on… if you open a new model and run the command, both sides will still be selected.

so in this sense, running the start up commands per document seems redundant because the commands (at least the ones i’m imagining at the moment) will retain any options which were set when model#1 was opened… and it’s probable that if i changed the setting manually then i’d want to maintain that change throughout the session instead of it being reset upon opening a new model.

that said, the idea of resetting certain commands via opening a new model seems desirable as well…
or, i see some positives for both styles of behavior.


#13

the points?
they look like this for me:

or

(expand the images for a more accurate look)


#14

yeah, about the same here, ok


(Dan Belcher) #15

So, technically, this would be short-hand for:
“Run these commands when the Rhino application starts and the first model is opened
…?

I agree this would make it the most consistent with Rhino for Windows behavior.

-Dan


(Dan Belcher) #16

How safe is this assumption? (This is where I get unclear, myself). In your experience, is this the primary use of these commands in Rhino for Windows?

-Dan

PS: I’m relying on those who were around when this feature was created in Rhino for Windows, which is before my time.


(Dan Belcher) #17

Well, it’s been nearly a couple weeks. It sounds like there is a preference for:

“Run these commands when the Rhino application starts and the first model is opened”

…should we change the behavior of this feature?


#18

i guess i’m now feeling different about what i originally said in the thread… i’ve been using this macro in the command list:
SetMaximizedViewport Perspective

…and it’s pretty cool… so if the behavior changes to only run commands once at launch, this macro wouldn’t really work out.

i don’t know… maybe leave it how it is in the current WIP and if someone else brings it up down the road, see what they have to say about it.

?


(Marlin Prowell) #19

Rhino commands can affect settings for the application, or they can affect the current model. I can see that users would want to run either kind as start up commands. In fact, Jeff has already come up with examples of both cases.

The OP is running a command that sets application state. The problem is that the command is poorly implemented. It is a test command after all. All commands that set/change application state should have enable/disable/toggle options. With an enable/disable option, then it doesn’t matte how many times the command is run, and could be run every time a model is opened.

So I think the current implementation is the correct one. If there are application setting commands that are toggle-only, then fix the command. Don’t make start up commands even more complicated.