× Components and Libraries for Graphics 3D Development, discussions, problems and suggestions

Question HowToCopyOrCreateObject

More
4 years 10 months ago #9391 by Milen
HowToCopyOrCreateObject was created by Milen
I'm new in 3D programming.

Now try to use GLScene. I use CT 5.70, Win 7 64 bit.

1. How can I copy 3D object? Scene editor has only delete option. In Object Inspector - I can copy, for example GLSphere1, but when I try to paste - its not copies.
2. I try to create new object in Runtime:
Procedure TForm1.FormShow(Sender: TObject);
Begin
  Sph2 := TGLSPhere.Create(GLDummyCube1.AddNewChild(TGLSphere));
  Sph2.Position.X := -0.2; Sph2.Position.Y := 0.2;
  Sph2.Slices := 64; Sph2.Stacks := 64;
  Sph2.Material.MaterialLibrary := GLMaterialLibrary1;
  Sph2.Material.LibMaterialName := 'GreyMetal';
end;

I from Scene editor have one sphere in DummyCube, but this second do not appear.

How it can be implement this (copy object in editor and create in runtime)?

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #10827 by Felipe Macedo
Replied by Felipe Macedo on topic HowToCopyOrCreateObject
Good question, I am a new CT user, and I was wondering the samething! I´m working on a college project, and we have to use 3 DummyCubes that have the same properties, and same objects into it. It would be a huge saving time the copy paste option!

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago - 3 years 6 months ago #10954 by BeanzMaster
Replied by BeanzMaster on topic HowToCopyOrCreateObject
Hi for all questions about GLZcene i suggest you to go and post questions at sourceforge.net/p/glscene/discussion/.

Milen Say :

1. How can I copy 3D object? Scene editor has only delete option. In Object Inspector - I can copy, for example GLSphere1, but when I try to paste - its not copies.

Right click on the object in the (iDE) Object Inspector like any other component and select Cut/Copy or paste

2. I try to create new object in Runtime:

You must set the "visible" property

Cheers
Jerome;D (BeanzMaster)
Last edit: 3 years 6 months ago by BeanzMaster.

Please Log in or Create an account to join the conversation.