We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Using target id to show/hide groups of annotations

Home Forums Puzzles Using target id to show/hide groups of annotations

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43699
    Branden Coker
    Customer

    In the past I’ve been able to show/hide scene objects by passing target.id as a group selector (as discussed here).

    This time I’m trying to show/hide groups of annotations in the same way.

    First I make a variable to hold a list of objects (nulls) in my scene.

    variables

    Then I attach an annotation for to each null.

    annotations

    Next, I can show and hide them by setting display style to “block” or “none” by targeting the first variable I setup.

    show/hide group

    However, if I attempt to pass the target.id to this puzzle, it doesn’t work. I’ve tried to pass it directly or with the “list, GROUP” workaround. Neither has worked.

    target.id

    list group

    I could use a series of if/else statements to isolate which target the user is clicking, but it seems like there should be a way to pass the target.id directly to the puzzle without the extra bulk of a logic statement. Is there a way to do this?

    #43715

    Hi Branden,

    Can you try checking “in parent doc” in the set style puzzles too?

    Chief 3D Verger | LinkedIn | Twitter

    #43727
    Branden Coker
    Customer

    Hi Yuri, yes I tried checking that as well. It still didn’t work.

    #43731

    Hi,
    I reproduced your case and it looks like it works perfectly. Please use console.log to debug your code. Check out what happens in the “create annotation” blocks, when verify that you get proper values in event handler.

    BTW why nulls? The lists you mention above should contain actual object names, not nulls.

    Attachments:
    You must be logged in to view attached files.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #43735
    Branden Coker
    Customer

    Hello Alexander, sorry, I’m not sure where console.log resides. I have been monitoring the browser console during development. I don’t see any relevant messages there.

    I just uploaded the project here:

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:0f9a180ea2/ext/Verge apps/annotation navigation/annotation_navigation.html

    As for the nulls, sorry for the confusion. The items contained in those collections are empties from Blender. I still have a habit of calling these nulls. They are indeed real objects though.

    #43736
    Branden Coker
    Customer

    Alexander, I was also able to create the functionality that you show above. I think the main difference is that in my real app, I’m attempting to use a target id in the parent document and affect the display of a div in the main (Verge) html doc.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.