Joined: Apr 16, 2014
Post Count: 22
Status:
Offline
Text name only in 2D view
Is there a way to display the catalog name only in the plan view? I have run into a situation where the top down view is undesirable, and just the catalog name of the object is more appropriate. I thought about using a plan icon image, but this does not produce the desired vector text output I need in the SVG. Any ideas?
Joined: Apr 16, 2014
Post Count: 22
Status:
Offline
Re: Text name only in 2D view
If anyone is interested, I tried using an SVG file as the planIcon, but it does not work. I get that little red X. I guess there is no quick fix inside SH :(
England
Joined: May 16, 2014
Post Count: 33
Status:
Offline
Re: Text name only in 2D view
I don't know the answer, however here are a couple of ideas:
Changing SH3D code The method paintIcon() in PlanComponent.java appears to generate an image which is used as a "proxy" for an item of furniture. Perhaps you could rewrite that method to create a little text label which displays the name of the item
PostProcessing the SVG I've exported an SVG file and it consists of vector graphics and <image .../> tags which I believe are "proxy" images. I removed the images with this:
I suspect the <image ../> tag is identical for every instance of the same item of furniture. A script could be devised to identify every <image ../> and replace it with a graphical/SVG text label unique for that <image ../>
England
Joined: May 16, 2014
Post Count: 33
Status:
Offline
Re: Text name only in 2D view
I've solved this! I've been updating the model of my home and noticed in the "Modify Furniture" Dialog that there's a check box "Display name in Plan". You should enable that on every item of furniture, the use my xmllint magic to remove the furniture "proxy". Et voila!
Joined: Apr 16, 2014
Post Count: 22
Status:
Offline
Re: Text name only in 2D view
Thanks for your suggestions clanmills, you gave me some good ideas. I am thinking "Display name in plan" should be enabled from the furniture library properties file. Going to see how hard that is to rework. Then I can just load a transparent png for the planIcon.