View Full Version : Clone names? / renaming nulls

04-09-2016, 07:41 PM
When you obtain a list of clone names ( "Name (n)" ), how is the nth indicated?

The idea is to start at the end of a list of null clones, and replace n with the ascii version of n.

This is a helper script for Spline Control.


04-09-2016, 08:01 PM
I believe it returns the actual name as the string. What you see as the name in Layout isn't an alias for something else.

Not sure what you mean by replacing n with the ascii version.

04-09-2016, 09:14 PM
These are NULLS, so they can be renamed, even though they are clones. So, "null (3)" would become "null 3". This prevents lessens confusion when you duplicate one to tweek a spline control spline-- it's still not optimal because it adds the new clone (i.e. duplicate) at the bottom of that hierarchical level, and the user must drag it back up in the SE to it's proper place-- (the reason you'd duplicate a node is to have it spatially NEAR its progenitor, so having it instantiate at the bottom of the spline node list is counter-productive), so it should be either the next or the previous node in the spline-- as a convention, I'd have it be the NEXT node in the spline.

Really, for elaborate spline control, there needs to be a dedicated, custom CLONE command that will place the new, duplicated node back where it makes sense. The renaming thing is just for the user (i.e., ME, jeric_synergy) because adding clones just gets too confusing. If there were a function (eg script) that CLONE SC NODEed, doing the above operations, we could skip the renaming.

Although, it still seems worthwhile to be able to do --I guess--, and someone somewhere can probably code it up in 15 minutes. It'll take me DAYS.

I thought maybe this was silly, maybe it makes more sense to just update a LWM Curve since SplineControl will now use curves directly (IIRC)(And if changing them in LWM gets them updated correctly in Layout), but then I realized a user might have ALREADY tweeked some node positions and would want to preserve those tweeks.

"CLONE SC NODE" would be the best solution, while "NAME CLONE#" is sorta hacky.

Oh, and this is all about how clones get renumbered dynamically. The idea is to FREEZE the order at the point you run the script.

If someone has a better workflow, I'll quit nattering about this....

04-09-2016, 09:49 PM
Cloning and renaming a node isn't hard through scripting. I'm not sure if you can change item order via scripting. It would be worth seeing if it's possible.

04-09-2016, 09:57 PM
My guess it's this class that has to be used to change item ID order?