object not updated after paste ?

  • Email
  • Sharebar
  • Email
2 replies [Last post]
aplesch
aplesch's picture
Offline
MathematicianScientistTechnologistRegular Blogger
Joined: 05/10/2015

test logo:

How can I refer to the pasted object ?

Andy
Andy's picture
Offline
MathematicianTechnologistProfessional Blogger
Joined: 02/10/2010
Fixed

Thanks for finding this bug. After PASTE it will now update the object id.

There is one issue with copy and paste (def/use).   I used onclick attribute in the transform node in order to return the object id when clicked. However, X3DOM seems to always return the latest transform id of the pasted or cloned. This may be an design issue for X3DOM, I am not sure if this is what it should be.

Another issue from design, because I apply use/def on the shape node, therefore, pasted objects have only a transform but no actual shape (with appearance). Therefore, pasted objects can have own translation, rotation etc. but cannot have own material or texture. This means, that when the copied (can only be selected from Object Tree window or in the Logo program) object changed material or texture, all pasted objects will show the same material or texture. I think that programmers may wish to apply use/def in different levels such as transform, shape, appearance, material, texture etc. I will need to design the logic and command(s) to allow this. Any suggestions on this design issue?

 

aplesch
aplesch's picture
Offline
MathematicianScientistTechnologistRegular Blogger
Joined: 05/10/2015
def id

1) could perhaps be related to using both def and id, or to the order of where def and use occur in the x3d file. If the x3d is inlined there is also a mapDefToId (or so) attribute.

2) This is how def / use on shape should work since both appearance and geometry are included in the shape. One would need to def / use the indexedfaceset or -line or primitive. Would a new command copygeometry/pastegeometry work ?It is a bit ugly...