I'm trying to create a shortcut for folding and unfolding the object manager. Is this possible in the API?
You can check the post here for reference. The first post will do.
Hi depending what you really want to do there is multiple ways for doing it.
c4d.CallCommand(100004803) # Fold Selected
c4d.CallCommand(100004802) # Unfold Selected
c4d.CallCommand(100004749) # Fold All
c4d.CallCommand(100004748) # Unfold All
# Main function
# Execute main()
Note: That Un/Fold Selected/All are commands already available.
If you have any question, let me know.
@m_adam said in Access Object Manager Fold and Unfold?:
Thanks for the response. Sorry for the confusion, but I'm not after the folding/unfolding of an object but the whole manager.
Here is a video posted in the link above for illustration:
As stated in the link above,
"The software is in Maya. It allows me to hide and unhide the outliner (object manager in C4D).
It’s helpful since I can hide panel/manager that occupies space."The software is in Maya. It allows me to hide and unhide the outliner (object manager in C4D). It’s helpful since I can hide panel/manager that occupies space.
The alternative is layouts. The problem is when I have to update the buttons (add or remove), I have to adjust it to other layouts. It’s a bit cumbersome by then.
I’d prefer the toggle/collapse panels instead.
Is this possible?"
You don't need a script for that. When in the Object Manager, look at the menu (File/Edit/View...). There is this point pattern to the left of it that contains the window menu.
Ctrl-leftclick on it, and it folds into a neat bar. Click the point pattern of this bar to unfold the OM again.
I am not aware of a keyboard shortcut for that functionality - and I doubt it would make sense since you need to specify the window to fold anyway, which is done by clicking in this case (thereby pointing the mouse at the desired window).
(You also don't have any window functions in the API, so you couldn't write a script even if you would be content with having as many keyboard shortcuts as possible Object Managers, which IMHO is awkward.)
Hi Bentraje, thanks for reaching out us.
With regard to your request, I confirm that it's not possible to programmatically fold/unfold a generic manager being the API involved in controlling the managers' behavior not exposed. In addition, being possible to open multiple managers (of the same or of a different type) at the same time it's currently impossible to identify on which windows to execute the fold/unfold task.
Thanks for confirmation @Cairyn and @r_gigante
Sorry for being picky. Just had some muscle memory from other softwares that wanted to port to C4D.
Anyhow, will settle for the Ctrl+LMB as specified by @Cairyn
Thanks again have a great day ahead!