Here is what I am trying to achieve: I have two 3D views
- One for manipulating objects (which needs to have some custom manipulation tools in its header). This view cannot be rotated.
- A second one used to view the result from any point of view. This one does not allow to interact with the objects of the scene. It can be rotated.
The goal here is to hide the manipulators in the right 3d area from the user.
But, of course, there's still a
plus sign that allows the user to reach those features (not only from the toolbar, but on the sides toolshelves, etc, as well).
I tried different approaches so far.
- The most satisfying was to detach the right one into a new window and switch that view to fullscreen (removes anything else but the
windowregion. But, since my app is small sized on screen, I would like to keep both views in a unique window.
Another possibility I tried was to override the draw callback of the header. Of course it leads to removing it from both views:
def my_draw(self, context): #... pass bpy.types.VIEW3D_HT_header.draw = my_draw
Maybe there is a way to distinguish between the areas owning the header, and do the regular
draw() for the left one and leave it empty for the right one (but I don't think so). But an empty header on the right would be more than enough for me.
- I also tried to find a way to sort of mimic the way the
region_quadviewswork. That would have been a "dualviews" version, but don't really know where to start with that kind of approach.
- And last thing I've been thinking about was to use another type of area for the right side and override its window region with the one from the left side area (since I won't need an
OUTLINER, neither a
RENDERarea). But same problem: I read lot of threads here and there, but couldn't figure out if this is something that can be done, and if so how to implement it.
Well, I've read many times that we cannot hide the header via python (just saw a patch allowing it here).
But, if you guys have an idea about how to get close to one of the options above, or have another approach to suggest (even a simple idea) to help having a behavior that is not to far from was I'm trying to achieve, then thanks for your time.
EDIT: To be more specific, I have disabled the
3D Manipulators from
user prefs and have a
modal operator running on the left side allowing to deal with manipulating the green objects. And I use the code below to lock this same area from being rotated:
# Locks: Prevents from any numpad, mouse, ... rotation, as well as # leaving the 'ORTHO' mode rv3d.is_perspective = False rv3d.lock_rotation = True