Sure, I’ve missed perspective and camera settings, I’ll add it tomorrow. Also, clipping settings is not yet addressed.
@StroBlend or about shading, I think it should be a separate toggle to sync shader mode and also the settings, I suppose.
The outliner is a difficult task, because last time then I was diving into this I found that collection state is not exposed into API. But it definitely will be a great feature.
@Lamia Yes, sure it is feasible, but it is not a target for this add-on.
All good, thanks anyway ill see if i have time to figure out how to do it.
@Crantisz
found solution for local view
after ns3d.lens = ps3d.lens
if ps3d.local_view:
override = {'area': nextArea} #override context
bpy.ops.view3d.localview(override, frame_selected=False) #switch local view
if ns3d.local_view:
override = {'area': prevArea} #override context
bpy.ops.view3d.localview(override, frame_selected=False) #switch local view
it seems working for me
or in your case:
if (ns3d.local_view is None) != (ps3d.local_view is None):
override = {'area': nextArea} #override context
bpy.ops.view3d.localview(override, frame_selected=False) #switch local view
BUT it better to use my first code, last one have a troubles in Texture Paint mode or need to add else: for prevArea
P.S. just in case, credits all yours!
I’ve got problems with my code, that’s why I commented it. So I’ll try yours
I’ve updated the add-on:
- Local view is supported, thanks @APEC
- Camera view is supported
- Clip start/end settings
You have something wrong in code.
Previous implementation works more correctly with local view.
Found:
you forgot something here (I added the missing part)
prevArea = get_biggest_area(prev, "VIEW_3D", False)
nextArea = get_biggest_area(next1, "VIEW_3D", True)
if sinchmanager.last_area is not None:
prevArea = sinchmanager.last_area
sinchmanager.last_area = nextArea
if nextArea is None:
return
sinchmanager.last_workspace = bpy.context.workspace.name
if prevArea is None:
return
Thanks, yes, missed this. But actualy I wanted to do the opposite thing, but anyway, thanks. I’ve updated the file
Great idea. Which should be embedded in Blender.
This addon does not work for me, the icon does not appear. Perhaps this is due to a conflict with other addons. Now it’s hard to say because of which ones, since I probably have a hundred of them for sure.
Addon version 1.1
Blender 3.0
What monitor resolution you use and blender app window maximized?
I just found, if blender window not maximized the icon did not appear…
Yes, indeed, when the window is maximized, the icon appears. The addon works fine. Apparently I didn’t figure it out right away.
Oh, fixed right now. Download it again. Please, check if you have any problems now
When only one 3D View window is open, the icon appears, but if you open an additional window - outliner or properties, the icon disappears. But for me personally, this is not a problem.
it disappear from custom workspaces, also in previous version (did not notice this earlier).
Worked on the very first release.
Edit
I don’t know why it’s worked for me but, here what I did:
added def checkscreen(sc):
and def drawheader(self, context):
from the first release.
def checkscreen(sc):
for window in bpy.context.window_manager.windows:
if window.screen == sc:
return True
return False
def drawheader(self, context):
biggestArea = None
max_size = 0
for screen in context.workspace.screens:
if not checkscreen(screen):
continue
for area in screen.areas:
if area.type == "VIEW_3D":
size = area.width * area.height
if size > max_size:
biggestArea = area
max_size = size
if(biggestArea != context.area):
return
# bigestarea = get_biggest_area(context.workspace, "VIEW_3D", False)
# if bigestarea != context.area:
# return
sinchmanager.last_area = context.area
# toggle & popover.
row = self.layout.row(align=True)
row.prop(context.scene, "synch_active", text="",
toggle=True, icon='UV_SYNC_SELECT')
sub = row.row(align=True)
sub.active = context.scene.synch_active
sub.popover(
SYNCW_PT_link.bl_idname,
text='',
text_ctxt='',
icon='NONE',
icon_value=0
)
Edit new:
Now, with 1.2 it works fine.
Oh, I apologize, I’ve pushed a wrong version. Now it should be ok. Check if you have 1.2 version number:
Here is some issue with local view and sides (top, left…).
I don’t know how to handle them…
-
Local view: if you select multiple objects and set local view, and then you make only one active (select one of them), then after you switch workspace the only one (that active) object will be in local view.
-
Orthographic sides: if you set view to the Right (for example), then after you switch workspace the grid will not appear and after you rotate view it will keep orthographic type.
Ok, I’ll try to figure it out.
Yes, it’s tricky. I can set that view is side view, but in this case it is always set to front… Let’s see what we can do with that.
@APEC Argh! This is a bug stops me from fixing local view https://developer.blender.org/T95197
But side views should work now, grab 1.3 version
So I decided to go out from local view when switching workspaces at this stage. It’s not a perfect solution, but I suppose it is the best that I can do at this stage. The version has been updated to 1.4
I’ve updated version to 1.5. Now it has keyboard shortcut support (Ctrl + PgUp/PgDown)