2.8 workflow question

posted to: Face Match I

I'm using the background image from the camera settings, and the back/front + alpha settings make it reasonably easy to see how I match the reference image. But it'd be much nicer if I could toggle while sculpting (here I need to select the camera first to play with the visibility). Is there a blender 2.8 equivalent to the neat trick with the layers?

  • keenan18 replied

    I don't know if it's the best way, but it will achieve what you are trying to do.


    Use collections. Create a new collection called Background Images. When you create the background image, it will show in you file browser. Put it in you new collection.

    Now pull up an info panel. Toggle the background image off. The image toggle will show you the python code to toggle it on and off.

    Now this guy shows you how to use that code to make your own custom button which I think you could tie a hot key to.  https://www.youtube.com/watch?v=IUkofDrGd9o


  • Fred Gobry(chbug) replied

    Ooh, excellent excuse to get started with scripting :) Thanks!

  • spikeyxxx replied

    chbug 

    Here is an alternative way to do this:

    Like kkeenan18 said, put the Background Image in a separate Collection.

    Now, in Object Mode there is a shortcut to hide/un-hide a Collection. You want to add that functionality in Sculpt Mode.

    Go to Edit > Preferences > Keymap > 3D View > Object Mode > Object Mode (Global) > Hide Collection. Open that:

    Now scroll down to Sculpt > Sculpt (Global) and at the bottom click + Add New.

    Open that and in the black field, where it says none, write 'object.hide_collection'.

    Assign any shortcut you like there, as long as it's not in use yet in Sculpt Mode...



  • keenan18 replied

    This looks like a better answer, but I'm having some problems.

     1. I'm not sure why I'm opening object mode above. I don't see that any editing of the preferences there.

    2. In the sculpting section I've made those changes, except a problem occurs when I try to use the shortcut. It hides the wrong collection. Although I pick the collection with the image in the shortcut popup window it hides the collection with the default cube.

    I set up my test blend file this way:

    a. I use the default cube in the default collection.

    b.  I add a new collection and switch to it. I add the background image in that new collection.

    c. I edit the preferences according to your instructions above.

  • spikeyxxx replied

    kkeenan18 

    As to problem 1; You don't actually need to open the object mode, that was just to show you how it is done there;)

    And 2: Look at the field with the Collection Index, where it says 2 in the example. That means that the second collection will be hidden. (See also in the Object Mode are, where there are  several entries called  'Hide Collection'.

  • keenan18 replied

    I created three collections to test this. Each I renamed to Red, Blue, and Green. Each contains a cube colored red, blue and green respectively. When I press the hot key that gives the menu I choose the collection to hide. It does not hide the chosen collection. In fact it hides all other collections instead.

    I understand you point that a collection can be targeted for a hot key, but the same behaviour persists. Is this how it supposed to work? Hide all other collections not the one chosen from menu or the collection with the hot key assigned to it?

    Even in factory settings in object mode if I press Ctrl H and choose from three collections it does not hide the chosen one but instead all others.

  • spikeyxxx replied

    kkeenan18 it does have some strange behavior, but if you check 'Toggle' it toggles the visibility of the chosen collection.

    Except if one of the objects in that collection is the one in sculpt mode (which won't be the case for you, as you only have background image(s) in there), then it just hides that collection, but doesn't turn the visibility back on.

  • keenan18 replied

    Toggle doesn't change it for me. I don't know what I'm missing.

  • spikeyxxx replied

    kkeenan18 neither do I...It works for me.

  • spikeyxxx replied

    kkeenan18 . Maybe I wasn't clear enough, when I said look at the field with the Collection Index, I meant the greyed out field in the Preferences, left of the 'Toggle' checkbox (where it says: Collection Index      -1).  That is the one that should be changed!

  • keenan18 replied

    I did a screencast. Maybe it will be easier to see my misstep.

    screencast

  • spikeyxxx replied

    @keeenan18Yes, that was very helpful!

    You set the shortcut to CTRL numpad 2 and then tried to access it through ALT numpad 2.

    As far as I can tell, you did everything right otherwise.

  • Fred Gobry(chbug) replied

    spikeyxxx thanks for this alternative, I'll definitely use it as well, as soon as I get it to work fully :) 

    When I configure the key with collection index -1, I get a popup asking for the collection to hide, but I need to click Shift to actually hide it. Also once hidden, the shortcut doesn't  summon the popup anymore :/

    When I configure the collection to a different value than -1, nothing happens as far as I can tell.

  • spikeyxxx replied

    chbug , hi!

    yes, if you leave the key at -1, it'll give you a popup asking which collection to hide. 

    But a positive value of n should hide collection #n, at least when you use 'Toggle'.


  • Fred Gobry(chbug) replied

    spikeyxxx Heh, we agree on the theory :) Could it be caused by interactions with plugins & such? Is there a way to open blender in "defaut settings" mode and still being able to go back to the settings I currently have?

  • spikeyxxx replied

    chbug Only if the shortcut is already being used...

    You can certainly open Blender in default mode: 'File > Defaults > Load Factory Settings'.

    Just don't save....

  • keenan18 replied

    spikeyxxx 

    Sorry for the confusion. Ok, so I changed it to Alt+Numpad 2 and still getting an unexpected result.

    screencast (corrected)

  • spikeyxxx replied

    kkeenan18 I'm in the middle of a live stream with Wayne... Will look at it afterwards;)

  • spikeyxxx replied

    kkeenan18 

    I've looked at it a few times and can't see why it isn't working...

    Maybe I'm just too tired;) I'll try again after I've got some sleep (it's 5 AM here...).

  • spikeyxxx replied

    kkeenan18 Maybe if you try a different hotkey, something without ALT?

    (F5 to F8 are 'free' unless you are already using them.)

    I noticed that you are using a Linux distro and I have experienced that some ALT combinations don't work as hotkeys in Blender, because they are already being used by the OS.

    Can't think of anything else;)