Jump to content

Intenditore

Console and editor got WORSE

Recommended Posts

I'm drifting to r21, and with lovely new interface some problems and flaws come along though.

First, console. Why the command line which is so useful is gone now? Yeah, we can invoke it and than stick it to the bottom as before, but... What was the reason to move it?
It's kingda right you've organized messages by the origin, but the sidebar rearly used only to switch to Python takes up a lot of space. It becomes more problematic when you realize there's no automatic line breaking and long strings in the output aren't visible until you scroll or resize the window.

Long strings.. It's a pain in code editor too, there's no line wrap at all. Why? I know we can use some standalone apps like Sublime for coding, but not when you work with Python effector for instance. I don't ask for IDE with autocompletion and other features, but line wrap? It should be there for sure!

Share this post


Link to post
Share on other sites

Hi,

mostly valid points, I agree with. Did you forward these to MAXON? I'm working on my own list and maybe it raises awareness, if enough share the same complaints.

The only point I do not completely agree is the Command Line. It's still in R21 and you can add it to your layout as you like. Yet, for me it got redundant, as I have way more power in the Console (e.g. the possibility to quickly test multi line statements in there, I like a lot). In the end I guess, that's a matter of taste and I agree the Command Line should stay for those who prefer it.

For the editor... well, lets ignore its flaws for a moment, because you mentioned the external editor option (which currently unfortunately works only for the Script Manager). I wouldn't just see this as a workaround for the internal editor, but also and more importantly as a workaround for another problem. C4D has no watchdog built in, so whenever your Python (your script) runs into an infinite loop (come on, we have all been there...), C4D freezes without any possibility to get it back nor to save your last edits. Not so with an external editor. And since C4D senses changed scripts, the use of an external editor is just one additional click ("file changed, do you want to reload?") as a trade off for lost code. Leaving aside all the other convenience functions you get from a modern editor. I say this over and over and especially for Python beginners (not talking about you Intenditore) this can avoid a lot of frustration.

Your post made me think, if I should come up with a plugin, allowing something similar in Python Generators or Tags. Maybe I'll come back to this...

By the way, at least for me here on Win10 (no screen scaling, no HiDPI) for long lines even the scrolling and cursor positioning is off. It doesn't follow, if the cursor leaves on the right side. And when you click there, the cursor gets positioned a centimeter off. Sometimes not even with the scrollbar I can reach the end...

Yet, for me remain the positive changes. While (or rather because) no longer synchronized (e.g. multithreaded output can get mixed up), the Console Output got way faster, which makes it much more usable. And also the possibility to arbitrarily copy&paste from the console is a big plus for me. So, my feelings are really a bit mixed here.ö

 

Cheers

Share this post


Link to post
Share on other sites

I don't really see the need for the Command Line, as you can type in the Python Console and also drag items there, just like you could with the CL before. Haven't seen any additional functionality in the CL that I would miss.

 

The space needed for the list of various outputs can be minimized by dragging the division. While I could imagine better solutions, it's not that must wasted space.

 

The editor is indeed not very good but for short stuff it's convenient. I used an external editor for Python plugins until I realized that it's using Latin-1 encoding while C4D only knows UTF-8 so maybe I need a new Python editor/development environment altogether.

Share this post


Link to post
Share on other sites

Being a bit old school, I don't actually need an IDE for Python, yet an external editor adds an extra level of security. But please enlighten me, which modern text editor is not able to change and adapt to a text encoding?

My personal editor of choice: Certainly Sublime Text 3 (at least on Win and Mac).
To which I switched shortly after buying a lifetime license of Ultra Edit. Doh! UE itself is not bad, but nowadays it grew too big and feels sluggish, yet it would be my alternative if you are a more visual, UI focused person. It's certainly one of the most powerful editors, feature-wise. On the other hand Sublime feels so fast (as long as you don't work on multi Megabyte files, in which case Ultra Edit is probably better, and so is its hex mode) and focuses on the important stuff.

On Linux I have to admit, I'm still the Xemacs and vim dino. But I tend to use Xemacs really only for text editing, neither web browsing nor playing minesweeper...

 

Share this post


Link to post
Share on other sites
39 minutes ago, MighT said:

But please enlighten me, which modern text editor is not able to change and adapt to a text encoding?

 

It can, I just wasn't aware that it defaults to Latin-1, which caused all kinds of trouble together with the discrepancy between Python 2 and 3 handling of Unicode. (I did find out, but it took me THREE whole chapters in my Python: Spoonfed series to explain. D'oh! Let's see whether C4D switches to Python 3 before I publish a book version...) But it is indeed an ancient editor (Crimson Editor) where I am surprised that it still runs under Windows 10, so I think a change may be adviseable.

Share this post


Link to post
Share on other sites
  • Topic Author
  • 7 hours ago, MighT said:

    The only point I do not completely agree is the Command Line.

    Oh, I didn't know it's possible to drag elements to output window now, It seem to solve the problem!

    You've pointed out some important things I totally agree with. Infinite loop problem drove my computer crazy just recently, the cost of coding mistake becomes pretty significant with no good reason. But I didn't point it and some other things out as I consider myself not so good at coding yet to suggest some things related. But I'll gladly gather your thoughts and send it to MAXON. Actually, I thing they are here on the forum and might read our thread too)

    It would be just awesome to code for effector/tag/field in Sublime, I have no clue how it could be implemented, but if you'll make a bridge for that it sounds freakily good! 😄

    Also I was interested in c4dpy, but it seems it works only for IDEs, not Sublime. I do miss autocompletion, namechecking and all the good stuff ides must have. But no hope MAXON will implement it all in native editor(

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 7 hours ago, Cairyn said:

    I used an external editor for Python plugins

    The problem is it's a solution only for a script or plugin. If you're into effector/tag coding, not such option there

     

    And some thing for MAXON to rethink also, despite it's a bit different topic - when you edit User Data it's very painful you can't manually specify the ID, nor when creating nor when editing it, and more that that - you can't change to type of userdata entry after you've commited. You could try to copy it, delete the old one and change the new one however you like, but... It would get new id! (facepalm). Why is this made so clumsy?

    Share this post


    Link to post
    Share on other sites

    Oh, sorry, you misunderstood. Please send them just your own issues and thoughts. I wouldn't want mine to falsely multiply. Seeing this thread we'll overlap anyway.

    At least for the Script Manager maybe we could get an option to autosave the script on pressing the Execute button. At least users wouldn't loose any scripts by stupid mistakes anymore. If we then could get the option to have external scripts also in Python Generator and Tag (and so on), this autosaving could help there as well. Is probably an easier change than asking MAXON to tackle Pyhon's global lock (which is the real problem behind those lockups), which may not even be technically possible or feasible.

     

    Regarding c4dpy: At least if you are Windows, it's well worth taking a look at Visual Studio Code. It's more an editor, than an IDE, yet with nice features. In PluginCafe Donovan also demonstrates the use of PyCharm with c4dpy.

    Share this post


    Link to post
    Share on other sites
    21 minutes ago, Intenditore said:

    And some thing for MAXON to rethink also, despite it's a bit different topic - when you edit User Data it's very painful you can't manually specify the ID, nor when creating nor when editing it, and more that that - you can't change to type of userdata entry after you've commited. You could try to copy it, delete the old one and change the new one however you like, but... It would get new id! (facepalm). Why is this made so clumsy?

     

    I think, this has safety reasons. After a User Data parameter got defined, it's respective data is stored in a BaseContainer of the entity. And this value may now be used in a gazillion ways all over C4D, Xpresso, Animation,... I wouldn't take for granted, something expecting data of a certain type behaving gracefully when the data type suddenly changes. I'd call this defensive design.

    What is actually the issue? I do use User Data a lot, e.g. for UI prototyping, and it was never a real issue for me. If I need to change the datatype, I simply create a new parameter as you described and done. Why would I need to worry about the new ID (except changing it in one define in my code). Although I admit (and maybe this is also your main issue), it's a bit sub-optimal, to say the least, one can not see the new ID before closing and re-opening the dialog. In situations with already cluttered IDs (due to a lot of addition and removal of user data) it can get tedious. Which probably also answers my initial question... yet, I don't think, I would need the option to change an existing ID, but rather an option to see the ID of freshly created user data.

     

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...