Change one instance of a component
-
ok thank you, i indeed see possibilities here.
Now it off course all depends if the creator of the drawing attached colors/materials before making it a component or after...If he defined them bore making a component i cannot change them without de-linking?
-
Then there are more steps involved;
- You need to get rid of the material (colour) definiotion on the geometry. A solution could be simply deleting that material/colour from the Material browser (or entering the component's editing contet, selecting all and repainting with the default material).
- Now select all instances and colour them with whatever you want.
- Now select the one you want to colour differently and paint that with a different colour.
-
thanks again
so in that case you:
- edit an instance so that it has no color/material definition
- this results in all other linked instances to also lose their color/material definition
- recolor the instances but instead of on entity level, do it on component level.
What about the solution we were thinking about, can we somewhere edit the component linking so we can set another component as the basic component?
-
@pout said:
so in that case you:
- edit an instance so that it has no color/material definition
- this results in all other linked instances to also lose their color/material definition
- recolor the instances but instead of on entity level, do it on component level.
Yes, exactly.
@unknownuser said:
What about the solution we were thinking about, can we somewhere edit the component linking so we can set another component as the basic component?
I'm not sure I can follow this. The link betwen the components either exists or doesn't at all (in this case you need to make certain component(s) unique but you can never reinstate that link again).
You can also use several components nested in other components or groups as well so the whole system is quite flexible.
-
well what we are looking for is this:
Somewhere there has to be defined that an instance is based upon a component. You can see that name in Entity info.
Now for example
We have 3 boxes which are instances of the same component.
Now we copy one of those boxes and make it a new component with the color red.
So we now still have 3 instances from the same component and one other, new component/instance who is exactly the same except color/material.Let's say that we want to make one of the 3 instances an instance of the copied component. So, we would like to edit the component-link information.
That way in the end we would have 2 instances from the basic component and 2 instances of the copied component.The question is: where is it defined on what component an instance is based and can this be edited.
Instance A--> base is component A
Instance B--> base is component AInstance C--> base is component B
Instance D--> base is component BWhere are those links defined and are they available for editting?
btw thanks alot for helping me on this
-
OK, I see.
Now if you have three instances of the same component and you insert a fourth one which you paint from outside, it will still remain an instance of the original component (i.e. you don't have a new component definition). You can check; in the omponent browser there will only be one component (and top of all; unpainted).
A component definition is stored within the component; that's the geometry itself (only SU has to remember this definition just once); and within each component since it is all the same if you edit this one or the other one; all instances will reflect the changes.
Now if you want to create a new component with an independent definition, you have to make it unique (different from the previous definition). later on you can save this as an skp file and select whichever component you want to define as such and reload them from this external file (as I described above).
Note however that these reloaded components won't inherit the attributes you assign to the original from outside of their context.
So you use either this method or the other but you cannot "mix" them.
To be honest, with a more concrete exmple (if you are allowed to share it) it could be made much more obvious.
-
i'll try to give a 'written' concrete example:
An apartement building. All columns are based upon the same component.
Now i want one instance (column) to recieve a different color. Temporary, for analysing purposes.
I don't want it to become a unique component or what so ever. When i hit a button it should be in it's original color again.Now when the individual elements in the component did not get a color/material before the component was created there is no problem. I can change the color/material just of that instance to red. The others stay how they were.
But, when the individual elements in the component did get a color/material before the component was created there is a problem. To change the color of the column i want i need to go into the component and edit. This results in all instances (all columns) turning red.
To solve this problem we were thinking about copying the component and making it unique and give it the color red. This has no influence, we just created a new component(column) with the same characteristics as the others except it is red.
Now if we could define that, temporary, the column we want to be in red is an instance of the newly created component the problem is solved. Then this column is not anymore an instance of the original, colorless component but an instance of the new red component.
Later (after hitting the button) this column should become an instance of the original, colorless component again.That's the theory. We now just need to know how we can alter (in code/ruby) that that specific column is now an instance of the red column component and then an instance of the original colourless component.
I hope i make sense, as always i have it in my head but writing it down is harder.
Off course i can imagine there are other , better ways to do this. So if you have an idea, please let me know.thx again
-
OK, it makes sense.
How about this:- You creat a layerA for the red component.
- you create another layerB for the component instance of the one you want to toggle red/original.
- now you create two scenes; in scene1 you have all the original instances displayed including the one on Layer B while layer A is hidden
- in scene 2 you have the original instances displayed except for the one on layerB and of course layer A is also displayed.
By clicking between the two scenes, you can display any changes like this. A way easier method than reloading and returning to previous definitions.
Is this for some presentation purposes mainly? Because if not, other approaches might be more useul.
-
ok thats sounds perfect.
but as you can imagine, if you want to do this seperately for each column you would have a huge amount of layers and a list next to your pc when you need to hide/unhide what layer in what scene.The fact a instance should be red or in it's original color is based upon a result of a script.
So all instances should have the possibility to become red or not...That's why we came up with the 'red version of a component' idea. If we could swap the link between instance and component based upon the script result we have a solid method to use without having to play with layers/scenes etc.
-
James, also thx for the feedback
-
Well, you can always make a plugin requet (maybe with a link to this discussion) in the Ruby Discussion here. Try to be as specific as you can to explain the Gurus down there what you exactly want to achive and watch...
-
thanks a lot! All help is really appreciated.
-
Advertisement