mesh visibility properties on rig cannot be toggled when using library override of rig

Issue #285 resolved
Luke Graybill created an issue

When the rig is used in a library override, the mesh visibility checkboxes are disabled and cannot be toggled.

I am unfortunately still very new to the Blender API, and have not yet been able to track down what needs to change in the plugin to enable this, but the docs on property definitions seem to indicate that it should be possible.

Comments (48)

  1. Thomas Larsson repo owner

    I haven’t tested library overrides yet, so don’t know how to deal with this. The visibility code was designed in the Blender 2.7x days, and at the time seemed the natural way to control visibility of linked assets. From Blender 2.8 onwards there is a better way to do that: add meshes to different collections and link the collections you need. Even if a collection is linked, it can be excluded from the scene in the outliner. That also yields better performance than hiding the objects in viewport and render, because then the objects are still present in the scene even if invisible.

    The one thing that I haven’t been able to do with collections is to turn off masks. The visibility properties drive both the viewport and render visibility and the mask modifiers, so the underlying skin is displayed when clothes are invisible. But maybe there is some other way to do that.

  2. engetudouiti

    I remember there was blender bug report, for visiblilty driver with library over-ride, so I afraid it is caused current limit (not add on side) of library override.

    I tested and report before about library over-ride only for test purpose.

    Though library over-ride gradually have improved. but for complex rigs (with many custom driver, constrains, shape keys like this add on generate figures) I suppose there still remain some problems to replace proxy way.

    But I suppose, we will use it as main.(so sometimes test library override seems important )

  3. Luke Graybill reporter

    Just wanted to provide a better link to the portion of the docs that looks (to my unfamiliar eyes) like it shows how to create custom properties that are library overridable: https://docs.blender.org/api/current/bpy.props.html#bpy.props.BoolProperty

    Specifically, this part override (set) – Enumerator in [‘LIBRARY_OVERRIDABLE’]. seems like odd syntax to me, but makes it sound like you can just do something like:

    myprop = bpy.props.BoolProperty(name='foo', override={'LIBRARY_OVERRIDABLE'}, ...)
    

  4. engetudouiti

    Yes I know the arguments, then I think if it is already set correctly by add on side. (because I reported same issue, before, then Thomas already added the argumentts and set as

    override (set) – Enumerator in [‘LIBRARY_OVERRIDABLE’]. for most of properties.

    If it happend to not set for the property, I do not know, but there still case, even though we set props so, it still not work for library over-ride with driven props. (I afraid driven visibility may not work), though need Thomas confrim about the visibllity props.

  5. Thomas Larsson repo owner

    I don’t think that is the issue. As far as I can tell, the rig properties that control visibility were already made overridable.

  6. engetudouiti

    https://developer.blender.org/T73593

    Though it is already set as sloved (closed), but I can not confirm it work

    As Thomas confirmed, rig props (which generate) already made overridable.

    But before those driver target RNA path keep original path, (original armature path)then not worked.

    I do not know if current blender auto set path for current override rig. anyway if it is blender side problem, dev really need all step to reproduce and may request it. (may need file too) .

  7. Luke Graybill reporter

    Update to add further information that the visibility properties are actually working fine as library overrides, until the “Prettify Panels” button is clicked, which causes the properties to no longer function:

    Of other interest, the “Show All” and “Hide All” buttons function as expected, allowing toggling all mesh visibility in the library override system.

  8. Thomas Larsson repo owner

    The prettify button is an ugly hack.When you restart Blender and link the collection, Blender has forgotten that the properties in the visibility panel are booleans rather than integers. Is there some way to make Blender remember that they are booleans, to make the prettify button unnecessary.

  9. Thomas Larsson repo owner

    Now I noticed Luke’s link to the docs. I’m not sure what these LIBRARY… options do, but I added them to the definition of custom bool properties. Perhaps it makes a difference.

  10. Luke Graybill reporter

    I tried modifying the prettify code in morphing.py - probably I did something wrong, but here’s what I used:

    def prettifyAll(context):
        scn = context.scene
        for ob in getSceneObjects(context):
            if ob.type == 'ARMATURE':
                for prop in ob.keys():
                    if prop[0:7] == "DazShow":
                        setattr(bpy.types.Object, prop, BoolProperty(default=True, options={'LIBRARY_EDITABLE'}))
                    elif prop[0:3] in ["Mhh", "DzM"]:
                        setattr(bpy.types.Object, prop, BoolProperty(default=True, options={'LIBRARY_EDITABLE'}))
    

    This had no success.. the checkboxes are still disabled.

    I can’t figure out how to get a list of properties on an object, to be able to inspect whether those properties actually have the Property.is_overridable flag set, but I assume they don’t.

    After searching for other solutions, the closest thing I’ve found is this discussion from 2015, which I don’t know enough about Blender’s API to know whether it’s still applicable: https://blender.stackexchange.com/a/35921

    It talks about using proxy properties in the UI that render as checkboxes, rather than trying to create the actual object properties as booleans (I think?) which sounds at least feasible, but again I have not enough experience with the blender API to know how to apply the code discussed there.

  11. Luke Graybill reporter

    @Thomas Larsson I just saw your changes, and after reproducing them on my side (specifically, adding override={'LIBRARY_OVERRIDABLE'}` to the changes above) it seems to be working! Huzzah!

  12. engetudouiti

    Property is editable from linked instances (changes not saved) means, we can not save changes? or it means with this option. we can save the prop value of linked instances?

  13. Thomas Larsson repo owner

    I removed the LIBRARY_EDITABLE flag again, since this seems unrelated to this issue.

  14. Thomas Larsson repo owner

    No, bool properties should not be LIBRARY_EDITABLE. In the linked file, they are int properties with unlimited range if editable, but limited to (0,1) if not. We want the latter for booleans.

  15. engetudouiti

    Thanks it make me things clear.. then about check box prop change as integer,

    I suppose you used ID prop for checkbox ? I do not know if your script still work if you use RNA props ,but I used RNA props with collection property then set all shape key controller checkbox active or not. to make my sshape key viewer work. I suppose if you use RNA prop (as collection property, then set “name” as key) it may not change as integer.

    if you already use RNA prop collection property to set active check box,, ignore it please.

    https://wiki.blender.jp/Dev:Py/Scripts/Cookbook/Code_snippets/Properties

  16. engetudouiti

    Then I do not know how to use handler,, so as for me, after all I must need operator (and operator class) in panell which can add check-box for all mesh shape keys. (I hoped if I can auto-add it, when I select each mesh, but I could not.. so to get checkbox,, I needed to set operator in panell… (without it I could not find way to add RNA props for each mesh)

    I attach object.wifact wifact is collection property. so I use add() then set wifact.name = shapekey.name

    so ob.wifact[key].act_flg is actuall flag of checkbox.

    Then I use this value, to controll visiblilty or set animation key etc..

    class WIF_OT_addCheckAll(bpy.types.Operator):
        bl_idname = "wifskey.addcheckall"
        bl_label = "add check box, reflesh shape keys"
        flg : BoolProperty(
            default = True,
            )
    
        def execute(self, context):
            ob = context.active_object
            for cob in get_child(ob):
                cob.wifact.clear()
                li = non_drv_sklist(cob)
    
                for key in li:
                    str = key
                    if key not in cob.wifact.keys():
                        item = cob.wifact.add()
                        item.name = key
                        item.act_flg = True
    
                for key in cob.wifact.keys():
                    if key not in li:
                        idx = cob.wifact.find(key)
                        cob.wifact.remove(idx)
    
            return {'FINISHED'}
    

    Though I suppose you already do more complex thing with your script. (actually I can not understand, how you added check-box,, though now I got some knowledge,, about property group etc)

    The operator flg is just to add another option, how operator work (I actually not used it), then act_flg (bool) is PorpertyGroup class. then attach it to wifact(collection property)

    I expect if you do same-thing,, to attach active check box…for each category and all morph controllers.😃

    class WIF_PG_actKey(bpy.types.PropertyGroup):
        act_flg : BoolProperty(default = True)
        name : StringProperty(default = "name")
    
    def register():
        from bpy.utils import register_class
        for cls in bl_classes:
            register_class(cls)
        bpy.types.Object.wifact = CollectionProperty(type = WIF_PG_actKey)
        ## other RNA props assgin
    

  17. engetudouiti

    So now I test over-ride again (I test it maybe years ago. so do not clear remember what I needed)

    I could change pose bone morphs.. but when I use clear morphs, it seems cause error.

    location: <unknown location>:-1
    Error: Python: Traceback (most recent call last):
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\import_daz\error.py", line 247, in execute
    self.run(context)
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\import_daz\morphing.py", line 1361, in run
    clearMorphs(rig, self.morphset, self.category, scn, scn.frame_current, False)
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\import_daz\morphing.py", line 1335, in clearMorphs
    if getActivated(rig, rig, morph, force):
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\import_daz\morphing.py", line 1213, in getActivated
    pg = getActivateGroup(ob, key)
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\import_daz\morphing.py", line 1239, in getActivateGroup
    pg = rig.DazActivated.add()
    TypeError: bpy_prop_collection.add(): not supported for this collection

    location: <unknown location>:-1

    and,, about custom morphs, my override scene have 4 category.. then I can use open all category.. but can not open each category (small issue) like this pic

    Then I did not expect it,, but shape key controller morphs (the scene I already set driver for rig props about some shape key morphs,, already worked for me.

    https://developer.blender.org/T70319

    I coulld confirm,, now it already work..

    but MHX layer disable all, and enable all not work. It only show error

    Then now I tried to import pose duf,, with change IK FK,, etc,, now blender shut down ^^;

    So I sitll not play full. with overwride scene.. (and I did not save it,,,)

    May I need , re-generate MHX ? or I may need re-import and set driver for morphs too? (to check recent commit about this issue)

  18. engetudouiti

    About shape keys I found, as default without set driver for one of shape keys of mesh, with custom prop (then set the prop as override={'LIBRARY_OVERRIDABLE'}, basically all shape keys will be shown as no over-ridable.

    but we can still force shape keys value as over-ridable from outliner, mesh-data shape keys in current working (link and over-ride) scene. ( r-click each shape keys data icon of mesh, then add library override hierarchy.)

    Unfortunately by bpy, there seems no way to set shape key as over-ridable. in library file without using driver and custom prop (I still keep searching if there is bpy function or class method which can turn all shape key value, as over-ridable. but it seems intended I afraid to limit un-necessary data up-load)

    Then about over-ride MHX character, I still see those props as non-over-ride. though it not heavy issue, but hope to test library over-ride with finish MHX rig and meshes… full over-ride..

  19. engetudouiti

    I could make it work edit mhx.py but only one prop (it seems simply copy another custom prop value as ID prop,, can not over-ridable ^^; I do not know if it will work or not, but basically now all necessary slider work MHX over-ride. I hope change place of these same funciton slider,,,, because IK to FK change slider (can set value) may often use (if it can not over-ridable)

    (though shape key without driver, need manually set over-ridable in liked scene , but it seems intended.. from blender dev topic,)

  20. engetudouiti

    File size Library = 243.7 M , over-ride saved file 31.2M so it worth to use. do not remember proxy though,,

  21. engetudouiti

    I do not know if I need to regenerate morphs to work it, but active or deactive check mark related eg Ob.DazActivated[22].active can not override in linked scene still

    then I checked which prop still remain issue, so only those bool prop, which added by this function remain issue..

    def setBoolProp(ob, prop, value, desc=""):
        prop = truncateProp(prop)
        ob[prop] = value
        rna_ui = ob.get('_RNA_UI')
        if rna_ui is None:
            rna_ui = ob['_RNA_UI'] = {}
        rna_ui[prop] = { "min": 0, "max": 1 }
        if bpy.app.version < (2,90,0):
            boolprop = BoolProperty(default=value, description=desc)
        else:
            boolprop = BoolProperty(default=value, description=desc, override={'LIBRARY_OVERRIDABLE'})
        setattr(bpy.types.Object, prop, boolprop)
        setattr(ob, prop, value)
        ob[prop] = value
        setOverridable(ob, prop)
    

    Like close open individual category or, activate deactivate check box. when I serch and check when it added,, after all I reach this function.

    def setBoolProp(ob, prop, value, desc=""):

    Object.DazMorphCats[0].active or Ob.DazActivated[22].active are attached the active bool prop by this function.

    If this function have no problem,, I think I need to re-import morph (make library file again)

    about this issue, I can not catch error at all, so Only could know by use ob.is_property_overridable_library(“prop”) in library scene (input in prompt and check)

    or actually test in linked scene then confirm it still non over-ridable.

    I think if you can offer temp function which can up-date prop setting, with use

    https://docs.blender.org/api/current/bpy.types.bpy_struct.html#bpy.types.bpy_struct.property_overridable_library_set

    property_overridable_library_set(propertyoverridable)

    then force to update overridable., only about add on generated custom properties. and only prop which may need to set as overridable .if you can ^^;

    which prop may need to set as overridable is complex for me…

    About MHX props,, it auto-up-dated, ,once I edit mhx.py, and re-load script. then save library scene

    (did not use auto funciton, but added one by one for props in override={'LIBRARY_OVERRIDABLE'} in initialise section of code..to confirm)

    Then (over-ride) rig show them as over-ridable. but about these check box or active prop. I may need force overridable in each library scene,, I feel. or I may need to re-import morphs again. I may test later,, use the set function,, and force them to as overridable. in library scene rig… if it work,, I hope you offer button.(up-date overridable)

  22. engetudouiti

    so actually you do it in your code, I know.

    , but it seems not up-date correctly,, for current library rig.. at least about those bool prop.

  23. engetudouiti

    Then if Thomas have never test with over-ride character,, it is actually simple with use Collection (you already clean gathered them with Character9

    1 Make character Collection = “Character name”, then gather all related object, rig in the collection. usually I set rig and “mesh collections” as child of main collection = Character . save as testlibrary.blend

    2. in new scene. link the collection (Character) . then it appear as linked.

    3. select the linked collection, in outliner, (you may need to open collection once, then select the direct sub “Collection”) and use r-click option “add Override Hieralchys”

    it usually generate all rig and meshes of library file (in character colleciton), then you can check which props not work in over-ride scene. the behavor are almost same as proxy system.

  24. Thomas Larsson repo owner

    engetudouiti, thanks for the last comment. As you expected, I had never tried overrides myself. The mhx issues should be resolved now. The morphs active checkbox might be more difficult, since they belong to a custom group rather than a standard Blender type. We’ll see.

  25. engetudouiti

    Yes the morph checkbox, are mix type property. (group and collection) . Then I almost confirm

    property_overridable_library_set(property, overridable) may not work, if those props are defined already. So I do not expect, you can add reflesh button for the purpose.

    I could confrim it work for new custom ID props which I added in lbirary scene, but it not effect already generated custom props. (it usually just return “failed” only.

    But if you set all props correctly, in add on (when generate those props) It should work. (amy hand-made shape key check-box are almost same, how you made it for add on morph check box. the only difference is,, I need to attach thoes check box as mesh object prop, but you need them for armature object, but I do not think it cause difference.

    they worked (after I set override={'LIBRARY_OVERRIDABLE'}). then I explore how you set those props, and you use auto-function, to set-up them. I suppose if it relate issue. (I understand,, as code, they already set as LIBRARY_OVERRIDABLE.

    Anyway,, if check box worked, I do not find clear issue for over-ride scene. (though I may need to check with key -frame ,,etc,, basically it seems work already.. )

  26. engetudouiti

    btw I found one problem about MHX up-date ^^;..

    I do not remember when I make it over-ride how it worked, but I suppose I could save those value. when save over-ride blend scene.

    Now new “Re-init” button change them as over-ridable,, but at same time,, when I open saved over-ride scene, all props of the MHX properties are Hidden again, and it seem reset value.

    1. make “re-init” (because MHX properties are Hidden in panell)
    2. change IK-FK influence value like 0.3 etc
    3. save the over-ride scene.
    4. re-open saved scene,, it now return to 1. then re-init, now it reset all values.

    Though I may not so often tweak MHX properties, but it should be saved modify value I suppose. and most important setting,, current FK IK (toggle) for leg and arm not saved too. (it seems new problem,, I feel,,)

  27. engetudouiti

    Do not mind, I miss use the “init” button ^^;

    Yes I need to use “Reinit MHX property” in library scene first!!!. I hastle to test new up-date, then just open over-ride scene, then it not up-dated, so I “Reinit MHX property” in over-ride scene, (it may not work or cuase strange issue)

    So untill try with over-ride scene,, I open library scene, then use “Reinit MHX property”. and confirm props up-dated.

    then open over-ride scene.. I need not to use “Reinit MHX property”any-more,, then change props saved correclty. (it keep value and setting what I modifed, as same as before) Thanks 😇

    (Of course it is right,, how over-ride work,,I just miss used new button)

  28. engetudouiti

    I find blender side currnt limitation. (or bug which may user worry)

    1. saved scene auto-return as object mode.. I worry if some up-date script related this, but it is current blender-side problem.. I found confirmed topic.. (so add on side we can not do anything)
    2. to get visiblility option work perfectly,, it seems need to set driver. (I did not suppose it ) I could found, view layer visiblity in out-liner not work . (even though I hide item in out-liner it keep visible. but I can confrimed as-data it is already set un-visible. because I make script it work only when visible, then it show as hidden. (but viewport the mesh keep visible) ^^;

    So I have not used add on offer visiblity driver, about this case, it should be useful (if you hope to use view layer visibility often (and we actually often use it, (eye icon in outliner) , if set driver it seems work without problem by use driver props.

    on the other hand,gloval visiblity (monitor icon visilbility option) still can show/hide correctly without any driver I suppose.

    So if add on use some visiblity option, it may miss use for case. eg if add on try to check current visible bone, then only effect it, as option, the visiblity may not show same as data. I may check how bone layer visibility work.. (hope it work without problem)

  29. engetudouiti

    I still do not know why only those props still cause issue ^^;

    I can check it in library file,, then confirm, both overridabe still “False”

    About morph ceck mark

    1. rig.activated[key].active

    I suppose to change “active” as overidable,, “activated” (collection prop ) need to set as over-ridable too. I just guess so,

    anyway when I check them in library file,, rig.activated (collection porperty) and rig.activated[key].active (bool property) both remain as no-override. (I up-date recemnt version)

    So if you can offer init function like MHX? I hope if it will be solved… (but I can not make it work in bpy console (tried , property_overridable_library_set(property, overridable) for both,, so I do not know there is way to change them in library file. )

    Then another problem is morph category open and close

    2. rig.DazMorphCats[key].active

    I suppose so it is almost same prop mix. (collection prop + boolean prop). then it still not work.

    btw the related Commits,

    def setBoolProp(ob, prop, value, desc=""):
        prop = truncateProp(prop)
        #setattr(bpy.types.Object, prop, BoolPropOVR(value, description=desc))
        setattr(bpy.types.Object, prop, BoolProperty(default=value, description=desc, options={'LIBRARY_EDITABLE'}))
        setattr(ob, prop, value)
        ob[prop] = value
        setPropMinMax(ob, prop, 0, 1)
    

    So you use Library Editable,, is it right ?? (I suppose you spell miss actually intend to set “LIBRARY_OBERRIDABLE”)

    I may hope as test, without use smart custom functions like this,, but more strictly set custom props, only for those problem props.. Because at least for me,, almost same prop could over-ride (mix collection prop and bool prop of group property) without problem..

  30. engetudouiti

    Then I tried to use “Prettify panel” to force to up-date (then expect it may try to set active props as overridable) in library scene, But I could get error.. then it is related with how you set bool props (active) for collection props.

    Error: Python: Traceback (most recent call last):
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\error.py", line 247, in execute
    self.run(context)
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\morphing.py", line 1271, in run
    prettifyAll(context)
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\morphing.py", line 1253, in prettifyAll
    setBoolProp(cat, "active", True)
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\driver.py", line 464, in setBoolProp
    setattr(bpy.types.Object, prop, BoolProperty(default=value, description=desc, options={'LIBRARY_OVERRIDABLE'}))
    ValueError: bpy_struct "Object" registration error: active could not register

    I suppose,, you set arguments of “active” , like bool type etc,, when I “Prettify panell”

    but I experienced same issue when I add function which add check mark props for collection,, so to work it You may need to make group property first.

    class Daz_PG_actKey(bpy.types.PropertyGroup):
        active : BoolProperty(default = True, override={'LIBRARY_OVERRIDABLE'})
        name : StringProperty(default = "name", override={'LIBRARY_OVERRIDABLE'})
    

    Then need to register bpy.types.Object.activated , with use the Daz_PG_actkey type.

    bpy.types.Object.activated = CollectionProperty(type = Daz_PG_actKey, override={'LIBRARY_OVERRIDABLE'})

    Once register those first,, you can set value or generate with panell function.

    Though I do not know why I need to use PropertyGroup, to jsut add one bool prop, “ active,” for Collection property,, but basically it was only way which worked, when I set function in panell operator, to add check mark.

    Though I do not know, if it caused by different problem. but I think current way you set the bool property for collection may not stable. (actualy I can not pretify panell to up-date props , about recent commits,, though once I use it I seldom use, it, but it may need to reflesh check box etc,, )

  31. engetudouiti

    Thanks it worked 😋

    (Though I do not know, how you modify it,, but anyway now all props worked as overridable. and prettify panel cause no error.)

  32. Thomas Larsson repo owner

    Most things should work with file linking now. The only exception is the visibility properties. I tried to use a collection property for these booleans, like the active boxes for morphs, but it didn’t work because you can apparently not use property groups as driver targets. However, the only thing really lost is aestetics. If you turn on the Library Overrides option in the global settings, these booleans can be changed, but they are then displayed as integers rather than checkboxes.

  33. engetudouiti

    @Thomas

    I think to add visiblity toggle,, you could use layout.operator . then use icon only to call operator to toggle mesh visibility.

    Though I still not confirmed, but I did almost samething before.. (not use Layout prop, and driver, but use operator and operator function to toggle ,another property,, )

    ==========

    or you could directly set layout prop path to each object.hide_viewport . the value is booleans, so if you set it as layout prop. it auto generate check mark (as default) . about that case,, you may need not any driver. (it seems same how I add shape key controller without use any driver)

    only difficulty should be, how we can remove or append those layout prop from UI to user choose witch obj they hope to add UI checkmark. and those visiblity controller need to be drawn only when we select rig.

    object.hide_viewport is set as over-ridable. so we need not change anything. actually current plug in set driver for global visibillity (and I confirmed we can not set driver for local view layer visibility.. so if you need not set driver,, I suppose you may not see strange issue.

    Then if make it work so (non driver), I may need to set new custom prop for object.. (it keep visiblity UI controller will be shown or not)

    then when we add visiblity controller, it set it as True. then when we remove visiblity controller, the prop need to be delete (del)

  34. Thomas Larsson repo owner

    Yes, that is a very good idea. It also removes the need for the prettify button. Thank you.

  35. engetudouiti

    So you seems now use operator? anyway if it work well I apreciate it.😀

    then new commits, seems show kind of error for me.

    in library it worked, (I add new visiblity driver, then now it seems use operator to toggle,) then it can hide mesh. so I save the scene. and open the over-ride (link) file,

    But in link(over-ride) file, it seems not work… (I do not know reason,, but I suspect if the operator can not find path correctly)Then I got this erroer.

    location: <unknown location>:-1
    Python: Traceback (most recent call last):
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\panel.py", line 956, in draw
    row.prop(ob, ob, right, text=right[3:-2])
    TypeError: UILayout.prop(): error with argument 2, "property" - Function.property expected a string type, not Object

    It seems simple miss I suppose though…

    About this issue,, I think it is still experimental.. so whenever you return your way as you like, (if it can offer stable visiblity controller)

  36. engetudouiti

    Wao I think recent commit (about panell) raise some error , for panel functions.

    gloval setting button not work correctly

    location: C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\daz.py:306
    Python: Traceback (most recent call last):
    File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\import_daz\daz.py", line 209, in draw
    if showBox(scn, "DazShowContentDirs", box):
    NameError: name 'showBox' is not defined

  37. engetudouiti

    OK I apologize without show some real code which actually work,, just discribe my un-sure thinking..

    yest there are many things to check and confirm about panell with over-ride….

    About mesh visiblity controller in UI (with over-ridable) I suppose there are some way which can make it more stable with keep good UI

    I may try self,, if there is more smart way to get stable check box for visiblity… (actually I still thinking, we may not need driver for the purpose, and can only show those controller, with context selection..

    About this case, I suppose visivility only matter for child object of rig… then panel can re-draw when we change context object.

    all object already have the hide_viewport property as default,,, so we can change it or we can directly use the property as layout prop. (so layout props only need to set path for the each object.hide_viewport. (then it show current visiblity as check mark,(boolen icon) and we can toggle it)

    You made current visiblity tool, to set which object will be get controller,, then I think to limit to show the controller we need custom prop ,which contatin show or not show the visiblity check mark)

    but anyway it is my self thinking , guess so I may try later by my-self.. I may miss something the reason why you use driver for the purpose.. (I actually hoped to ask about it,, dirver offer function without it we can not manage well? )

  38. Thomas Larsson repo owner

    The whole visibility thing is becoming obsolete. It was necessary before Blender 2.80 to control mesh visibility and the mask modifiers. In B2.8x it is better to control visibility by adding meshes to separate categories which can be turn on and off. And with the new override system we can access the mask modifiers directly. But it was useful in B2.79.

  39. engetudouiti

    Thanks I could confirm,, recent version remove bug which I mentioned.

    So attually remain problem is return OP asking ^^; (though you once solved it ) so if it not work, return old version please.

  40. engetudouiti

    I suppose you means, collection visilbility set as hidden, then use the collection to switch item.

    (though actually I did not use the add on visiblit y tool ^^; (I usually not hope to attach new driver to controll modifier(eg mask) or visiblity)

    Then if you use collection to get un-visible, I found we can not use it effectively about over-ride scene.

    because I can make new hidden collection in over-ride scene. then can move item (linked) to the collection. but once I moved item to the collection, I can not return it any-more.. I think it seems current limitation of over-ride.

    maybe, over-ride not suppose user may change collection in library-scene. So I think if user use collection to set visiblity, about link (over-ride) scene, it may not work (at least with current blender versions)

  41. engetudouiti

    Yes I suppose for 2.9 to visibility work flexible with over-ride scene,, we may not need to use collection. (though it can offer grouping, but after all to manipulate each item, the object.hide_viewport is only matter. I feel..

    I may not over-ride about perfectly hidden items (eg keep default meshes etc) , then about over-ride scene, I may need to controll each assets, (eg I over-ride 3 hairs, then exchange it with visiblity (or visibility controller if I need), or may hide dress etc,, but I may not use collection for the purpose.. (even though it work in library,, when you over-ride,, we can not move each linked item as free)

  42. Luke Graybill reporter

    The whole visibility thing is becoming obsolete. It was necessary before Blender 2.80 to control mesh visibility and the mask modifiers. In B2.8x it is better to control visibility by adding meshes to separate categories which can be turn on and off. And with the new override system we can access the mask modifiers directly. But it was useful in B2.79.

    I feel like the visibility checkboxes are still very useful even in 2.93, for the reason Thomas stated at the top of this thread:

    The one thing that I haven’t been able to do with collections is to turn off masks.

    I have so far been unable to get drivers to function properly when they reference collection exclusion, and so I agree that it seems impossible at the moment to enable/disable mask modifiers when the collection containing the clothing is excluded.

    Additionally, objects can be in multiple collections, and therefore still be visible even if one of those collections is excluded - which would be counterintuitive if a modifier toggled based on that condition.

    In summary, I’m happy that the visibility checkboxes are still around, and function as library overrides now. Thank you Thomas!

  43. Log in to comment