Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: Alex.S on July 08, 2016, 10:11:54 AM

Title: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 08, 2016, 10:11:54 AM
I think this might have been requested before, and I don't see a proper requests section?

I'd like to see that if you load a new profile on an existing Railclone object and they share parameters, and the new values are with in the bound limits, to have an option to preserve those values, maybe a popup confirmation perhaps? That would help a lot, just now I've had to refactor a complex armco profile into several smaller ones due to memory issues (i'm hamstrung on 32bit max :( - due to issues with unrelated plugins), and this means I now have to reset the parameters for like 60 objects :(

They all have different parameters so copy settings to won't really work.

Edit: I see the latest beta fixes a bug where when profiles are updated they don't get updated where they are used, but they now reset the parameters in all objects that use that profile?!
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 08, 2016, 11:20:59 AM
On an unrelated note, I appear to have found a bit of a memory leak when it comes to materials.

I created several profiles from the same max file, all using the same material, and when I add these to a new scene the material ram usage was pretty crazy, over 1gb! I've temp fixed it by applying the material locally to all objects, but still it's a bit concerning... I notice there are like 6 different xrefs to the material? I guess pooling those resources is a bit tricky - but I'd assume a material (multimaterial etc) would be imported on a per max file basis rather than max file / object basis?
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 08, 2016, 04:25:00 PM
As you pointed out, in the latest beta we have modified how library works: if a style which is used in the scene is loaded, this is re-applied to all objects with same style.
A problem with that, is how to handle the Parameters: it's possible that you want to update some of them, but keep values for others. Initially, there is no way that plugin know thats.

To solve this issue, we detect what parameters has been modified for the user, and these are not overwritten. But this mechanism works only if the object is edited with the beta (o a later release).
For this reason, now most of your parameters are reset. Once you work with the new version and edit these objects, this problem should not happen.

Regarding materials, RailClone should not create duplicate them. If a material already exists in the scene, the library just uses or replaces it, depending of the option selected here:

(http://i.imgur.com/0ZIh70j.jpg)

Futhermore, the plugin doesn't create XRef materials. These always are imported normally.
Are you using a standard or custom library ? What option is selected for duplicates ?

Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 09, 2016, 06:18:09 PM
Ah ok, so should work properly from now on - preserving parameters, yeah I wasn't on the beta before.

I use multi/sub materials with the sub materials that of a custom plugin.

I have it set to replace material from library, I can't show the xref thing as I removed them... I'll grab a screenshot in future.

Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 11, 2016, 10:26:22 AM
btw, is it possible to force the resync of a profile somehow? I often have separate max files open and edit profiles as I tweak things...

Thanks.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 11, 2016, 10:39:20 AM
btw, is it possible to force the resync of a profile somehow? I often have separate max files open and edit profiles as I tweak things...

Just save the scene which is editing the library's style, and reassign it to any of the RC objects in the main scene. That will update all of them.
There is no way to do it by scripting of other methods.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 11, 2016, 12:24:19 PM
Alright cheers, good to know.

Just noticed today that if you use a surface and use spline mat ids to signify different segments that the surface can reset some segments to an id of 1.

Gave me quite a lot of headaches tbh. Is this known? Anyway to circumvent it? I've tried normalizing the spline down to 1m segs but it still happens.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 11, 2016, 12:46:24 PM
Quote
Just noticed today that if you use a surface and use spline mat ids to signify different segments that the surface can reset some segments to an id of 1.

You're right. We're not aware of this issue.

It happens because to adapt RailClone correctly over the surface, it's necessary to generate previously a new spline conformed to the surface. In this process material IDs are lost.
I will check it we can fix it. Meanwhile, you would use our Glue (http://www.itoosoft.com/freeplugins/glue.php) plugin to conform the spline manually, fix IDs and then use it in RailClone.

Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 11, 2016, 12:55:27 PM
I already do something similar to this for now, but due to there being differences between the spline, the geometry used in the segments and the surface, this does not work as well, but is ok for now.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Rokas on July 19, 2016, 02:31:21 PM
I need to overwrite all RC objects with parameters from my current style, i tweaked the way I like.  Now I can only do this procedure ONCE.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 20, 2016, 05:45:35 PM
The method of preserving parameters seems inconsistent at present. Sometimes it seems to overwrite back to default params, sometimes it preserves them.... Even when the name of parameters or the bounds of them don't change... But say I add an extra param... some of the others go back to default when they shouldn't?
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 21, 2016, 12:16:41 PM
We're running some tests to check all possible combinations with this feature. Once completed, we'll post the results and of course will fix problems if any.

Thanks,
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Rokas on July 27, 2016, 08:39:37 AM
How is this going? currently this is my biggest issue with RC.
Possible solution:
Create new parameters checkbox like "local" and "global" so global gets inherited when copying styles and local stays by what user specified.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 27, 2016, 08:56:45 AM
There were a couple of bugs which we fixed. For example the "modified" flag was copied from the library style, and was causing the double import issue.
Now it should work much better.

We're compiling a beta version, which will be available today.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Rokas on July 27, 2016, 08:58:58 AM
Can`t wait to try..  thank You.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Rokas on July 27, 2016, 09:15:50 AM
Well tracking for modifications is not sustainable approach, in my opinion. I will write my detailed opinion and describe what I want and can`t do (if any) with the beta.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 27, 2016, 10:25:24 AM
I appreciate your suggestions. We cannot introduce many changes in an update, but we can study other options for next major versions.

I think that local/global approach is fine for your custom sytles, but it may be a pain for library styles. We would get different opinions about if a parameter must be local or global (unless we decide Salomonically to define all of them as global).
For sure it's an interesting issue to discuss. :)

By the way, RC 2.7.1 beta (http://forum.itoosoft.com/index.php?topic=3887.0) is already available. If you want to check what parameters are modified, these are stored in "$.pamodifed" (array of booleans, one for parameter).
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 27, 2016, 12:05:59 PM
IMO if a parameter is global then it should be a constant in the profile, not a parameter.

Thanks for the update, will check it out.
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Rokas on July 27, 2016, 12:58:54 PM
We would get different opinions about if a parameter must be local or global (unless we decide Salomonically to define all of them as global).
For sure it's an interesting issue to discuss. :)
Of course global. For me RC is ruined as the productivity tool. Now it just a tool.

By the way, RC 2.7.1 beta (http://forum.itoosoft.com/index.php?topic=3887.0) is already available. If you want to check what parameters are modified, these are stored in "$.pamodifed" (array of booleans, one for parameter).

ok, that is helpfull I can stop whining and get back to work having maxscript ready: 
Code: [Select]
for obj in selection do obj.pamodified = #(false,false,false)I will find my way around using scripting, but if my experience and opinion maters anything, now it worse and less intuitive and clear what it is doing then old school way- overwriting everything.


IMO if a parameter is global then it should be a constant in the profile, not a parameter.
It should be global per scene, not  per style, don`t confuse the two. In some scenes You want wall height  to be 1 meter but other times 2 meters tall. And you want all walls to be the same defined Height.
So no, user should not hardcode that parameter, don't get me started.



My typical workflow:
I create one RC object,- most often put that to my custom library for future use. I make tons of variables to tweak the style.
Later, when I have to use the style (Hundreds of RC objects for hundreds of splines) I load it on one spline and tweak parameters to my liking.
Then I copy style to rest of the splines. And do further adjustments and again copying to all the splines to take effect . But now I cant!  (well I can with script mentioned above)
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 27, 2016, 01:09:05 PM
Ah okay, sounds like you want a way to be able to set a single parameter to multiple objects - but not all, which would be nice indeed?

So many different ways people want to use the same thing :D
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 27, 2016, 01:12:06 PM
ok, that is helpfull I can stop whining and get back to work having maxscript ready: 
Code: [Select]
for obj in selection do obj.pamodified = #(false,false,false)I will find my way around using scripting, but if my experience and opinion maters anything, now it worse and less intuitive and clear what it is doing then old school way- overwriting everything.

You can disable it though? (edit. Or maybe not hmm...)
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Rokas on July 27, 2016, 01:20:15 PM
thanx, life is beautiful again ;)
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 27, 2016, 02:01:43 PM
You can disable it though? (edit. Or maybe not hmm...)

That's it. Turning off both options, RailClone works as previous versions.
Retain parameters feature is optional, although enabled by default. My mention to $.pamodified was just only if you want to check current state of parameters.

Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: Alex.S on July 27, 2016, 02:27:59 PM
It is possible to edit params by scripts right? If so then most things are possible via that.

That said having an option to bulk set selected objects back to default params should placate most issues that people may have if they wish - perhaps on the RailClone lister, to use both settings?
Title: Re: Request - Preserve Parameters if they are valid when loading profile
Post by: iToo on July 27, 2016, 03:46:42 PM
It is possible to edit params by scripts right? If so then most things are possible via that.

Yes, it's possible to modify parameters value from Maxscript (but not add or delete them). There is an array of values for each type ("paintval", "pafloatval", "paunitval" and "paboolval")

Quote
That said having an option to bulk set selected objects back to default params should placate most issues that people may have if they wish - perhaps on the RailClone lister, to use both settings?

Unfortunately default values are taken from the library, and these cannot be read without opening the browser.

The right way to reset all parameters should be to untick "General->Retain Parameters" and reapply the style from the library. If "General->Library update objects..." is off, changes are applied only to the selected object. If on, to all ojects sharing same style. This process also resets all "modified" parameter flags.