LarryG on 22/5/2016 at 11:04
Is there an easy way to move a set of concrete objects from a child archetype to the parent archetype?
Say you have a set of concrete spoons who are all children of a SPOON archetype, which in turn is a child archetype of a FLATWARE archetype. And for some reason you want to make that set of concrete spoons to descend directly from FLATWARE.
We can drag archetypes around in the hierarchy to change their parent, but I don't see a simple way to do the same or similar with concretes. Is there a way?
Daraan on 22/5/2016 at 13:08
Well I assume you just want to move the archetype of a subset(all spoons in Room A) and not the whole set(all spoons).
This could be possible - really just be a possibilty - be done within the DevMode.
In the DevObjectHirarchy there are always (~MetaProps)links from parents to childs. If these links also exist on the concrete objects it could be possible to really move them to a new archetype by deleting the old and creating a new link. It's a logical guess but only a guess.
With MultiEdit you should be able to select the specific subset and edit only them.
EDIT: Ok these links really exist from concrete objects you can delete them->UnknownObj, but I have not yet seen a way to create a new one, you can't choose the flavor.
LarryG on 22/5/2016 at 14:03
I don't want to move any archetype, only a subset of the concrete children of an archetype to a different archetype.
See attached illustration.
[ATTACH]2272[/ATTACH]
Daraan on 22/5/2016 at 14:15
That's what I understood.
So there are
Spoon A -MetaProp-> SPOON -MetaProp-> Flatware
and you would need
delete Spoon B -MetaProp-> SPOON
create Spoon B -MetaProp-> Flatware
nightshifter on 22/5/2016 at 14:28
wouldn't it be possible to have a spoon E and F ( copies from B and D ) and place them as parent archtype and use NVscript to change them when needed? thinking of NVlinkbuilder
Daraan on 22/5/2016 at 15:43
Haha I got it. Thanks for the LinkBuilder idea.
I was able to actually morph an obj this can be done via NVLinkBuilder or NVMetaTrap. (No DevMode needed)
With the NVMetaTrap it should be also possible to target multiple objects (maybe just create a simple Filter Metaproperty and then Target="@Filter") but
a) These Metas can be deleted
b) Obj will be UNKNOWN after deletion of the old.
This can also be done in EditMode:
Add NVMetaTrap and NVMetaTrap2
NVMetaTrapOff="test"; NVMetaTrapMeta="Spoon"; NVMetaTrap2On="test"; NVMetaTrap2Meta="Flatware"
and then script_test ObjID
But I think it's a bit saver to use the LinkBuilder
With LinkBuilder I could trandform a mosslump into a crate and back:
NVLinkBuilderOff="Test"; NVLinkBuilderLinkSource=5; NVLinkBuilderLinkDest="WoodCrateSealed"; NVLinkBuilderLinkType="MetaProp"; NVLinkBuilder2On="Test"; NVLinkBuilder2LinkSource=5; NVLinkBuilder2LinkDest="mosslump"; NVLinkBuilder2LinkType="MetaProp";
Descending Archetype and object name was always correct. If only 1 is present it can't be deleted.
Since this can be done in edit mode with script_test ObjID everything can be deleted after, and internally the LinkBuilder Version looks totally normal. (didn't check the meta version tough)
It's easier vs cleaner
----
It's interesting to know that actually everything is a MetaProperty.
LarryG on 22/5/2016 at 18:07
That looks like I would need to create one marker for each concrete to be moved. If I'm going to go to that much trouble, I might as well delete and recreate them manually on the new archetype. If NVLinkBuilder took an argument like NVLinkBuilderLinkSource="&ControlDevice", it might be practical to link them all to the marker with the NVLinkBuilder scripts and then run script_test. But since it doesn't, this approach seems impractical when you have many spoons to move.
And it seemed so promising too.
Daraan on 22/5/2016 at 18:52
Well you can put it on the Spoon archetype or a Metaprop with Source="[me]". ( I dunno the numbers we are talking about here, if you have 10 you don't want to move you can turn off the scripts there or replace them.
And to send the correct messages create a brute force cmd via an excel sheet.
script_test 1
script_test 2
and export that as a text and rename to .cmd
So every object will get a test message.
LarryG on 22/5/2016 at 19:27
Yeah, no, I can't put it on the archetype because I don't want every spoon to move to a new parent, only some. Maybe your idea of a metaprop with the NVLinkBuilder scripts on it and then adding the metaprop to each spoon to be moved is the best so far. I keep thinking that there has to be some simpler way to do this already built into Dromed. But maybe not.
R Soul on 22/5/2016 at 19:43
There's always a balance to be struck between setting up some clever scripting and doing it the slow way. That balance depends on how long each one takes and how often you'll need to do this type of thing.