Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies) Members Gallery
(516 replies)
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

[MAXScript] Copy the geo from one Editable Poly to an empty one?
show user profile  Nanne
I'm fiddling with MAXScript again, trying to learn something useful :)

I have a Editable Poly let's call it "oldGeo" and then I want to create a new empty Editable Poly object , "newGeo" and copy all the geometry from oldGeo to newGeo. But I can't really figure out how... any ideas?

I use this trick sometimes when cleaning up a scene where strange scaling and rigging are messing up the geometry when trying to change things, like the mesh getting skewed or similar when removing a animation controller or something like that.
What I usually do is I create a sphere, delete all the geo on that, and use the Attach function of Editable Poly to transfer the vertices from oldGeo to newGeo, but now I have a clean base node with no scaling or animation controllers attached.

I suppose something similar could be done here using MAXScript, but I thought one could just copy all the vertices, edges and normals from one object to the other. That's possible, no?

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 654 times
1/30/2016 1:08:14 PM (last edit: 1/30/2016 1:08:14 PM)
show user profile  ccampbell
Sounds like a transform problem. Have you tried making a snapshot or edit poly then utilities > xform > reset xform then collapse the stack or convert to edit poly/mesh?

When you create a new sphere its transforms are un alterd and scale is 1:1 which is probably why the transfering old verts to the attached objects are working.

P.s. I'm writing this on the toilet 5 min after waking up so my instructions above could be a little off. I'll check back after breakfast

$Entrepreneur = if((Designer + Engineer)*Programmer){Problem Solver};

read 641 times
1/30/2016 5:24:32 PM (last edit: 1/30/2016 5:24:32 PM)
show user profile  ccampbell
So I never did look into this... Did this help?

$Entrepreneur = if((Designer + Engineer)*Programmer){Problem Solver};

read 599 times
2/1/2016 6:05:51 PM (last edit: 2/1/2016 6:05:51 PM)
show user profile  Nanne
Well, yes I'm sure that works. I already know how to fix the problem in Max. What I was really looking for to learn was how to copy vertices from one object to another via MAXScript :)

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 592 times
2/1/2016 8:12:17 PM (last edit: 2/1/2016 8:12:17 PM)
show user profile  ccampbell
The simplest way is..

Select object > ResetXForm $ ; convertToPoly $ assuming this works for you( you haven't tried...)

Otherwise You you have two options.

1) Rebuild a new mesh vert by vert(not trivial). See link below for more info..
Meshops - Geomtry class / TriMeshs

2) create a new empty mesh then assign your current one into the new empty one but you'll have to invert your normal's because there wont be any normal info.

Learn about Maxscript and editable meshes


$Entrepreneur = if((Designer + Engineer)*Programmer){Problem Solver};

read 587 times
2/1/2016 10:43:20 PM (last edit: 2/1/2016 10:55:50 PM)
show user profile  Garp
This should work:

x = $OldGeo
y = editable_mesh name:"NewGeo"
y.mesh = copy x.mesh
convertToPoly y

read 569 times
2/1/2016 11:19:10 PM (last edit: 2/1/2016 11:19:10 PM)
show user profile  Nanne
Thanks both of you, I'll look into that! :)

How come the "copy mesh"-thingy does not work on Editable Poly, only on the old school Editable Mesh?

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 564 times
2/1/2016 11:48:46 PM (last edit: 2/1/2016 11:49:18 PM)
show user profile  Garp
Yes, that's weird. You can read the trimesh from an epoly but not set it directly.
An oversight maybe?

read 561 times
2/1/2016 11:59:44 PM (last edit: 2/1/2016 11:59:44 PM)
#Maxforums IRC
Open chat window