Itoo Software Forum

Author Topic: Maxscript to refresh segments?  (Read 5284 times)

George

  • Full Member
  • ***
  • Posts: 120
Maxscript to refresh segments?
« on: February 12, 2011, 03:56:42 AM »
I have quite a few RailClone objects in a scene i'm working on, and i'd like to refresh the segments en-masse. I tried running this:

for o in $* where classof o.baseObject == RailClone_Pro do ( o.sobjref[1] = $Balustrade_SegmentOld.baseObject )

...but it bitches about setting a read-only property. Is there an alternative way to do it?

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3316
    • iToo Software
Re: Maxscript to refresh segments?
« Reply #1 on: February 12, 2011, 09:16:20 AM »

Try this:

for o in $* where classof o.baseObject == RailClone_Pro do (o.railclone.segmentsUpdate 0 0)

This is an interface that we use internally for debugging, but it does exactly what you want.

Carlos Quintero
iToo Software

kmax

  • Newbie
  • *
  • Posts: 18
Re: Maxscript to refresh segments?
« Reply #2 on: November 25, 2012, 09:29:21 AM »

Found this thread in the search.

As i have the same situation.After modifying the library object.The change is not reflected in the already Railcloned objects in another scene.

And the script provided doesn't refresh the segment.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3316
    • iToo Software
Re: Maxscript to refresh segments?
« Reply #3 on: November 25, 2012, 10:31:11 AM »
RailClone does not keep any reference to the library, once the style is selected. The segments and parameters are embedded in the object.

If you need to modify a segment imported from the library, please try this procedure:

1) Create a RailClone object using the library style.
2) Select the segment, and click "Extract current segment" icon. This will create a new object in the scene with the segment's geometry.
3) Now you can modify the segment's mesh, the changes will be reflected in RailClone.
4) If needed, use "Geometry->Copy To", to apply the new style to other RC objects, or save it to the library.

If you modify the segment, all RC objects that use the same style (applied with Copy To) will be updated properly. You can also remove the segment's object from the scene when you're done (RC keeps a internal reference to it), and repeat the "Extract" procedure if necessary.

Note: i just realized would be useful a "Copy To" massive option, to apply the style to a list of RC objects. We will add this feature.

« Last Edit: November 25, 2012, 10:42:23 AM by iToo »
Carlos Quintero
iToo Software

kmax

  • Newbie
  • *
  • Posts: 18
Re: Maxscript to refresh segments?
« Reply #4 on: November 25, 2012, 10:53:19 AM »

Although the procedure you provided works.But consider this scenario.

1. A scene,which needs 5 railclone styles all around.
2. Rough library objects created.But didn't need to UV or texture it now.Will do it later.
3. Railcloned the library in the scene.There will small tweaks to some of them, like "Flip A" and "Y/Z offset".
4. Then do the mapping and and texturing to the library object.
5. No update in the Railcloned object.(Understood)

Would love to see the "Sync to library" option. Or i guess "Copy to masses" will also work.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3316
    • iToo Software
Re: Maxscript to refresh segments?
« Reply #5 on: November 25, 2012, 11:16:57 AM »

A "Sync to library" option would be a bit problematic, because it will fail when trying to update the default library (since it is read-only). Also, less experienced users would apply changes unintentionally. But we have plans to add an "Export to library" feature, to save the style of the current object with a single click. That should help.

Thanks for your suggestions, we will work on this.

Carlos Quintero
iToo Software

kmax

  • Newbie
  • *
  • Posts: 18
Re: Maxscript to refresh segments?
« Reply #6 on: November 25, 2012, 12:39:49 PM »

I am sure that will be a really good addition.Thanks for the great support!

May i know the expected update going to release?

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3316
    • iToo Software
Re: Maxscript to refresh segments?
« Reply #7 on: November 25, 2012, 01:30:49 PM »

Quote
May i know the expected update going to release?

We are currently working in RailClone 2. This version has been rewritten completely; with RC 1.x we were very limited for adding new features, basically because its rigid interface. Now is much more powerful, and will be easier to improve it in the future.

This update is taking some time, because there are deep changes and we must test tons of new features, but i hope the first beta is ready soon.

Carlos Quintero
iToo Software

kmax

  • Newbie
  • *
  • Posts: 18
Re: Maxscript to refresh segments?
« Reply #8 on: November 26, 2012, 06:59:50 AM »
Glad to hear it!

crusader_yn

  • Newbie
  • *
  • Posts: 1
Re: Maxscript to refresh segments?
« Reply #9 on: November 30, 2012, 04:22:21 AM »
I'm glad to hear you are working in a new version. I want to suggest that I found a bug after use this fantastic tool for many times, this tool could handle with the curve corner navigation quite well but when it cope with the quad/rigid(90 degree) corner navigation, the segement object will break and produce massive isolate vertex. I hope it will be solved in next version. Thank you for your great work!

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3316
    • iToo Software
Re: Maxscript to refresh segments?
« Reply #10 on: November 30, 2012, 08:58:24 AM »

Quote
when it cope with the quad/rigid(90 degree) corner navigation, the segement object will break and produce massive isolate vertex.

Yes, this problem is already fixed in 2.x.

We also added a parameter available in the Slice modifier: operate on Triangles/Polygons. This mode generates better results on Slice/Bevel operations, specifically removing additional vertices in the edges (that would be a problem for welding).

Carlos Quintero
iToo Software