- This topic has 3 replies, 1 voice, and was last updated 2 years, 8 months ago by supportrangers.
-
AuthorPosts
-
2022-04-20 at 11:26 am #51186supportrangersCustomer
I don’t know what i have done, but my message is in the reply underneath.
Sorry.
2022-04-20 at 11:33 am #51188supportrangersCustomerHi,
I use the version 3.9.1 of Verge3D with Blender 3.0.1.
I’ll describe my problem here and I’ll go into more detail later in this mail.
I am trying to set up a system to generate annotations based on a list containing Empty objects created in Blender.
Everything was working fine until I added the management of the annotations ids coming from a CSV.
From that moment, I face a problem.
If I want to generate my annotations according to the CSV file, it must be loaded first. To do so, I have tested several methods, but either it doesn’t work at all, or the annotations are not interactable anymore.Let’s go into a little more detail.
Currently
First of all, I create a variable consisting of a list containing all my empties in Blender (manually for the moment, but this will lead to a second question later on).
See Attachment 1Then, for each item in that list, I create an annotation by adding a custom CSS Class, and include that annotation in a list for later management.
See Attachment 2So far, it’ s going well.
Now
I create variables that are Dicts, and a variable that groups these dicts for debugging.
See Attachment 3I add the reading of a CSV file and the assignment of its data in the variables previously created.
See Attachment 4The debug log indicates that the variables are correctly assigned.
See Attachment 5Now I make sure that the annotations ids are managed by a Key present in the previously populated Dict variables.
See Attachment 6The annotations are created but everything related to the id is broken. I assume this is because the creation of the annotations is done at the same time as the loading of the CSV, and thus the Dict variables are not yet filled with the CSV informations.
So, I put the whole block of my annotations creation in the “Once ready do” slot of the Load data which manages the CSV loading.
See Attachment 7This ensures that the annotations are generated correctly, with the right Class. But by doing this method, the annotations become not interactable.
No interaction is possible either with an “on event of click” or even with an “on event of mouseover” for debugging.
However annotations are present in HTML.
See Attachment 8What is weird is that there are still interactions that are detected because the cursor changes when my mouse passes over an annotation (as specified when generating the annotations with the “set style cursor” block). Also, the z-index changes from 1 to 2 when I click on an annotation, but I guess that’s for the popup display present by default in the annotations system.
I tried to place the CSV loading in the Init part of the application, but it doesn’t work. I assume this is because the Init part does not share the same variables as the rest of the application.
I don’t know if it matters, but my puzzles are structured via the following tabs:
See Attachment 9
– Init : loading management
– Main : management of the part that I did not explain here, but which manages interactions with buttons in UI
– Variables : creation of variables used in the whole application
– Procedures : creation of functions used in the application
– Hotspot : annotation generationSo, I’ve reached a point where I’m stuck because I don’t understand why the annotations become not interactable.
I also have another question that is a bit more general, but still related to my project for the future :
Is it possible to create variables in runtime ?The idea behind this is to be able to generate annotations automatically according to the content of a CSV, rather than having to manually create the necessary variables each time.
Sorry for this long message but I prefer to bring as much precision as possible.
Thanks in advance and have a nice day.
Attachments:
You must be logged in to view attached files.2022-04-20 at 11:33 am #51193supportrangersCustomerRest of the attachment
Attachments:
You must be logged in to view attached files.2022-04-20 at 11:34 am #51198supportrangersCustomerLast one !
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- You must be logged in to reply to this topic.