Creating custom dynamic 'hot corners'?
-
Hi there,
Apologies first of all if this is the wrong area/forum to post this in, please point me to the right place or delete if so!
I typically use a dual-monitor setup for C4D, however am currently trying to create a new custom layout that has quick access to all of my typically used managers/commands on a single monitor. The 'hot corners' - 4 palette icons that dynamically toggle the different asset, material, coords and dope sheet managers - were a great addition in R25 and seem like they'd be something that I'd like to make use of for the single monitor layout! Unfortunately, I don't seem to be able to find a way to add custom hot corners for, say, the RS Shader Graph editor.
Is this something that's possible in the current implementation of the hot corners, or are they somehow hard-coded in their current state? I also noticed that adding a new dope sheet icon to the interface shows an 'open in a new window' icon next to it, which isn't present in the same hot corner icon, leading me to suspect it does somehow differ to the usual command?
Any help would be appreciated!
-
Hello @Hexbob6,
Thank you for reaching out to us. You did post in the correct forum since your question is out of scope of support.
With that being said, I am a bit unsure what you mean by "hot corners". Are you talking about for example the icon of the Coordinate Manager as shown below,
which is either folding or unfolding the Coordinate Manager at a fixed position? This is achieved by handling the old and already before the interface overhaul existing dialog folding state. It is only that the folding state look was revamped with the interface overhaul, resulting in the new look and this new design pattern. I have shown here how to implement a
CommandData
plugin which acts like the Asset Browser, Coordinate Manager, etc. command.In turn this means:
- You can simply
- drag and drop the command icon of the thing you want into a palette,
- then open the respective dialog opened by the command, e.g., the Node Editor,
- and place it somewhere in the layout,
- click the icon in the palette to close the dialog,
- and save your layout.
- Clicking the icon will now toggle the folding state of the respective dialog.
- Dialogs which do not implement this behavior cannot be adapted by the user, they are incapable of supporting this behaviour.
- But as of
2023.2
, all dialogs found under the menu entryWindows
exhibit this behaviour (not quite sure if that was already the case in R25). - But there still exceptions, either for logical reasons or due to simply not having been retrofitted. E.g., you cannot toggle the
Xpresso
orThinking Particles
dialog in this manner. Plugin dialogs also often do not yet support this.
However, when I hear "hot corners", I would think of some kind of mouse over event being involved. I am not aware of such feature.
Cheers,
Ferdinand - You can simply
-
Hi @ferdinand, thanks for the rapid response and the link to the previous
CommandData
plugin answer, I'll be bookmarking that for future reference!I am a bit unsure what you mean by "hot corners". Are you talking about for example the icon of the Coordinate Manager as shown below...
Those are the things, yes! I wasn't sure exactly what to call them, but saw they were listed as 'hot corners' in the r25 release notes
...you cannot toggle the Xpresso or Thinking Particles dialog in this manner.
I believe this might explain my problem though! Thinking about it I probably only tested these editor types before posting my question. I assume because the original Redshift Shader Graph editor uses an xpresso-like editor, that could be the reason for me being unable to toggle it in a similar way to the other managers? Strange that the Redshift IPR allows me to toggle, however, although it isn't xpresso-like so perhaps that's the reason?
...due to simply not having been retrofitted.
So, to confirm, you're saying there isn't a work around for such editors if they haven't been retrofitted, either via python or otherwise?
As a bonus question, do you know of a way to toggle tabbed groups of managers with an icon (and not via the folding behaviour accessed by ctrl+clicking the hamburger menu). For example, pressing the red icon could close/hide the whole of the purple area despite it consisting of 2 tabbed groups?
Thanks again!
-
Hey @Hexbob6,
I assume because the original Redshift Shader Graph editor uses an xpresso-like editor, that could be the reason for me being unable to toggle it in a similar way to the other managers? Strange that the Redshift IPR allows me to toggle, however, although it isn't xpresso-like so perhaps that's the reason?
Yes, the legacy Redshift material graph is using GraphView, a.k.a., Xpresso. And which dialogs support this folding feature and which not is primarily guided by feasibility and efficiency reasons.
There never was an Open/Close Xpresso command in Cinema 4D as that would have been an ambiguous command since there can be dozens of Xpresso graphs in a scene. It is not an unsolvable problem, the new Node Editor has the same problem and it does solve it. But solving something like this would be more costly than throwing the four or five lines of code in there which realize the folding behavior in other dialogs.
The Thinking Particles dialog in the Xpresso window on the other hand, does not have any such restrictions, at least I see none, and simply has not been adapted for efficiency reasons, as there are A LOT of dialogs in Cinema 4D.
In any case, if you think that a feature X is missing in of our products, I would invite you to Submit Feedback in the
Share your Ideas section of our end user support.So, to confirm, you're saying there isn't a work around for such editors if they haven't been retrofitted, either via python or otherwise?
Yes, a dialog shipped with Cinema 4D which is wrapped by a command which does not implement this behavior cannot be retrofitted by third parties. The reason for this is that the dialogs that realize things such as Node Editor, Object Manager, Xpresso Manager, etc. are not exposed in the public API. We only expose their associated commands. This is an intentional decision.
As a bonus question, do you know of a way to toggle tabbed groups of managers with an icon (and not via the folding behaviour accessed by ctrl+clicking the hamburger menu). For example, pressing the red icon could close/hide the whole of the purple area despite it consisting of 2 tabbed groups?
Hm, I do not think so. There is AFAIK not a built-in feature like that, but the appropriate place to ask this would be end user support. Wrapping two commands into one (with either a full blown plugin or just a script) is not a problem. But dialog folding is undefined for tabbed dialogs as you show it in your screenshot. You could also file a feature request here in our support center.
What you can however do, is put multiple dialogs into a layout, and write yourself either a script or plugin which cycles through them, fold/unfolding them one by one. Not exactly the same, but similar For an example, see the end of my posting.
Cheers,
FerdinandResult:
Code:
"""Cycles the folding state of dialogs associated with multiple commands. Must be run as a Script Manager script. Could also be realized as a CommandData plugin for a fancier solution. """ from typing import Optional import c4d # ID definitions for the timeline and node editor commands. Technically not necessary, we could also # use the the integers directly, but makes things nicer to read. c4d.CID_TIMELINE_MANAGER: int = 465001541 c4d.CID_NODEEDITOR_MANAGER: int = 465002211 # Define the folding group we want to create, i.e., the script will cycle through these command IDs, # folding and unfolding dialogs associated with the command, each time it is pressed. PID_FOLDING_GROUP: tuple[int] = (c4d.CID_TIMELINE_MANAGER, c4d.CID_NODEEDITOR_MANAGER) # If #True, a state will be added at the end of the cycle, showing all dialogs. SHOW_ALL_AT_END: bool = False # If #True, a state will be added at the end of the cycle, hiding all dialogs. HIDE_ALL_AT_END: bool = True def GetNextCommandId() -> int | bool: """Determines the command ID of the next item in #PID_TOGGLE_GROUP. """ # Get the check state of all commands in PID_TOGGLE_GROUP. states: list[bool] = [c4d.IsCommandChecked(pid) for pid in PID_FOLDING_GROUP] if not any(states): return PID_FOLDING_GROUP[0] i: int = states.index(True) # Everything is open if all(states): return False if HIDE_ALL_AT_END else 0 # The cycle has reached the end elif i == len(PID_FOLDING_GROUP) - 1: if SHOW_ALL_AT_END: return True elif HIDE_ALL_AT_END: return False else: return PID_FOLDING_GROUP[0] # Pick the next item return PID_FOLDING_GROUP[i+1] def main() -> None: """Switches the group #PID_TOGGLE_GROUP to the next state. """ cid: int | bool = GetNextCommandId() for item in PID_FOLDING_GROUP: # Show the item when it is hidden and the to be shown item or all items should be shown. if not c4d.IsCommandChecked(item) and (cid == item or cid is True): c4d.CallCommand(item) # Hide the item when it is shown and not the to be shown item or all items should be hidden. elif c4d.IsCommandChecked(item) and (cid != item or cid is False): c4d.CallCommand(item) if __name__ == '__main__': main()