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.

David Duperron

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 83 total)
  • Author
    Posts
  • in reply to: Tab management in puzzle editor #72388
    David Duperron
    Customer

    Hi Yuri!
    Great! :) can’t wait to test it!

    in reply to: How to use On Event for Radio Buttons? #72383
    David Duperron
    Customer

    Hi!
    It would be better to listen for a “change” event on the radio button (HTML puzzles), than repeating your check every second.
    Then depending on the target.checked event property you hide or show your object.

    Cheers

    David

    in reply to: Curve messing with objects selection #71222
    David Duperron
    Customer

    Here is a capture of the associated puzzles.
    (there is also a functionality to add spheres on the plane, when pressing “n” and dblclick whith the mouse over the ground, but it does not interfere with the above I think…

    in reply to: Dynamic Curves? #71202
    David Duperron
    Customer

    Just found out that the Three.js example was already implemented in the V3D code examples repository here: Example
    I would be very interested in being able to transpose this in something that would be accessible from the puzzle editors. The Transformcontrols addon itself is something I would have definitely used if I knew how to get it to work in a “puzzle” environment…
    I could use some help if anyone knows how to do this!
    Cheers

    David

    in reply to: Question about createApp() function #70479
    David Duperron
    Customer

    Thanks§ that works perfectly

    in reply to: Question about createApp() function #70454
    David Duperron
    Customer

    Ok but how?? the puzzle button in the app manager is linking to the app_name.html file, with the visual_logic.xml file as a parameter, and the .js file is called inside the app_name.html file… I don’t see how to make it different for the puzzle editor and the web server.

    in reply to: Make Unique and independent copies of Objects #68157
    David Duperron
    Customer

    Oh yes sorry. here is the zipped project:

    I agree! but if you log the object “addedObjectDictionnary” after all these operations, you will see that the color has changed for two objects whereas the puzzles should only change one of them.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Make Unique and independent copies of Objects #68152
    David Duperron
    Customer

    Here is a simple demo showing the behaviour I do not understand:
    Clone demo
    Several keyborad inputs will trigger the following steps:

      “M” will append a simple cube, add its custom properties (defined in blender) as a new entry in the addedObjectsDictionnary and give it a named material, and a color according to the imported property
      “N” will duplicate and rename the first appended cube, move it and COPY the first cube’s key in the addedObjectsDictionnary, as a new key, named after the second cube: duplicate_cube1.
      “O” will again duplicate the first cube, rename it duplicate_cube2, move it, and this time, re-import the custom properties to define the new key in addedObjectsDictionnary.
      “P” will lastly change the color for duplicate_cube1, and store the new color in the dictionnary for that key.

    But you will see that in the dictionnary, the color has changed for both appended_cube AND duplicate_cube1! How is that possible??
    A click on the object prints the Object3D javascript object in the console.

    in reply to: Make Unique and independent copies of Objects #68149
    David Duperron
    Customer

    The objects DO HAVE independant and unique names, as well as their materials. I was able to change the colors, positions, scale, etc… independently, but as soon as I wanted to WRITE these data in my dictionnary, these parameters are “synchronized” if I do not create a new set of customProps… I’ll try to make a simple demo of this particular behaviour, it should me much simplier…

    in reply to: Make Unique and independent copies of Objects #68142
    David Duperron
    Customer

    @kdv77kdv
    I found something quite odd but interesting, that is apparently not in line with what you mentionned here:

    They don’t work at all. You can read them, you can change them, but that’s all.

    The “Userdata/CustomProps” dictionnary which is part of the Object3D javascript object IS changed when I manipulate my Object with puzzles, even if I do not explicitely tell my application to write the data in the object’s dictionnary.
    In other words, in my Application, I create from scratch a custom dictionnary (addedObjectsDictionnary) where I import a blender created CustomProps dictionnary, name it with a new unique ID. This dictionnary is updated when I make modifications on my object (color, position, rotation, etc…), but for some reason, the “Userdata/CustomProps” dictionnary inside the 3D object is also changed!
    And the reason why my objects where linked previously (I guess!) was that I did not make the “import customprops” step and simply duplicated my puzzle created dictionnary and asigned a new UID. But inside the 3D object they were still linked.
    Here are two screenshots of the console log for one of my objects before and after a modification (obtained with getObjectByName, no other manipulation). And as I said, I never explicitely tell my application to write something in the Object3D object…
    Before:

    After modification:

    Hoping this is clear…?

    in reply to: Make Unique and independent copies of Objects #68096
    David Duperron
    Customer

    Yes I know… I started again from scratch, using the same method I use for appending objects in the first place, to create a clone based on the same gltf file, and now it’s working! I guess this had to do with the way I was defining the custom parameters for my “cloned” objects…
    for the record, the two puzzles:
    the one which is working fine:

    and the one which is not:

    in reply to: Make Unique and independent copies of Objects #68094
    David Duperron
    Customer

    I found something: it seems that this has to do with custom properties recovered from the original appended gltf file.
    For “properly” appended objects, where the custom properties (that I store in a dictionnary) are pulled from the gltf file, everything works fine.
    But for “cloned” objects, where I do not write the new objects properties from the original custom properties, but rather copy them from the cloned object, these properties seem to be linked!
    Do you know how exactly these custom properties work and how are they linked/updated (if so?) from within the puzzles??

    in reply to: Make Unique and independent copies of Objects #68089
    David Duperron
    Customer

    I don’t know if I can build something “simple” to reproduce this behaviour… there are a lot of procedures and puzzles involved as well as UI.
    However I’ve tried to inspect the various objects to get a clue.
    Attached are the console logs of three “Object3D”
    The cube1 is the first one to be appended to the scene, from an original file called GENERIC_cube.gltf.
    The cube2 is a second object appended from the exact same gltf, with the same parameters.
    The cube3 is a duplicated object that I create by copying the parameters of the cube1 (in an internal dictionnary: gltf_file path, dimensions, rotations, etc… basically all the parameters that are originally imported with the object as customprops), using the same processus as for a new object appending (like for cube2): I get the gltf file path, append the scene, rename the objects, etc…
    And for a completely unknown reason the cube2 and cube3 are linke din some way, and when I try to change some parameters on one it changes on both.
    Cube1 remains untouched.
    I don’t know if these json files can give us a direction to look??
    Cube1
    Cube2
    Cube3
    David

    in reply to: Make Unique and independent copies of Objects #68082
    David Duperron
    Customer

    Ok… I will need to investigate deeper. Appending the same object several times works perfectly fine, but cloning causes all sorts of troubles… strange… :wacko:

    in reply to: Make Unique and independent copies of Objects #68079
    David Duperron
    Customer

    Yes I already used the console to have a closer look to the 3Dobjects
    Everything looks separate (materials, objects) except the “geometries” which is identical for both objects (same UUID, same everything…).
    Can this be causing these kind of trouble?

Viewing 15 posts - 1 through 15 (of 83 total)