[SKM Bug]Material attributes within SKM files
-
Whaat I have tried to answer your question at GG (!ยฃCensored to protect your privacyCensored to protect your privacy"ยฃ!) but THEY HAVE LOCKED IT. I have received a message saying 'you cannot reply to this message.' !!!!
So I will do it here!
On Mar 26, 11:25 pm, whaat wrote:
Still haven't found the answer to this question. Can someone from Google look into this?
They don't care about freeware exporters.I have tried to save my attributes assigned to the material. What I have found that SU saves attribute but without content...
Skm files are zipped XML files + PNG as a thumbnail.
In rhe document.xml you can find:<mat:material colorBlue="64" colorGreen="64" colorRed="64" colorizeType="0" hasTexture="0" name="Silver" trans="0.5" type="0" useTrans="0" xmlns:n0="http://sketchup.google.com/schemas/1.0/types">
<n0:AttributeDictionaries count="1">
<n0:AttributeDictionary count="1" name="su2kt">
<n0:Attribute key="kt_mat" type="11"/>
</n0:AttributeDictionary>
</n0:AttributeDictionaries>
</mat:material>There is no CONTENT although attribute has been saved.. <n0:Attribute key="kt_mat" type="11"/>
We could add manually the content but I don't know how and it is not easy inside zipped file...
Should it look like:
<n0:Attribute key="kt_mat" type="11" value="Greeting from KT-team"/>
??Cheers
Tomasz -
Tomasz,
GG automatically locks topics that haven't been "active" (replied to) for 30 days. I have no idea why...
-
well we won't lock your topic... Promise! we'll even Bump it.
-
Hmm, I thought I answered a similar post (from you?) many months ago. I experimented with assigning attributes to materials. If I remember, I was able to do it.
And if I also remember, it didn't work for you?
-
Kristoff, thanks for bumping
Jim, it was Whaat who was looking for solution. Now I have tried as well to attach attribute dictionary to a material AND saving it to SKM file. As provided sample shew the attribute distionary "su2kt" was saved but the "kt_mat" key was empty.
Tomasz
-
Tomasz,
Thanks for looking into this (although I know if this problem can be solved, it will benefit both of us ). I have given up on this at the moment although if there is an easy solution, that would be great!
Right now, material properties for SkIndigo can be saved as IGM files which can be loaded back into SketchUp fairly seamlessly. This file format also has the advantage that it can be imported by other programs like 3DSmax.I still don't understand how Jim can get the attributes to save but we can't. Hope you can help us with this one, Jim! Thanks!
-
theres Whaat... I knew he was around here somehwere.
-
At the moment, there's a 60 day thread posting period at GG forums. That annoyance is on a list of things to fix for the SU forum.
-
Gata, thanks for info.
I have done a test and simple attributes are being saved!
<n0:Attribute key="kt_mat" type="10">Test</n0:Attribute><mat;material colorBlue="0" colorGreen="0" colorRed="0" colorizeType="0" hasTexture="0" name="New" trans="0.5" type="0" useTrans="0" xmlns;n0="http://sketchup.google.com/schemas/1.0/types"> <n0;AttributeDictionaries count="1"> <n0;AttributeDictionary count="1" name="su2kt"> <n0;Attribute key="kt_mat" type="10">Test</n0;Attribute> </n0;AttributeDictionary> </n0;AttributeDictionaries> </mat;material>
It looks we have to translate all unprintable characters into \nn form ( string.dump ).
I will let you know about success or failureTomasz
-
looking forward to knowing more...
-
Here are my findings in relation to attributes assigned to the SKM file:
- SU will not save an attribute containing an array or hash
- SU will save multiple keys within single attribute dictionary .. but will load only first!
In attached sample there are three keys saved:
<n0:AttributeDictionary count="3" name="su2kt">
<n0:Attribute key="kt_lib_path" type="10">TEST1</n0:Attribute>
<n0:Attribute key="kt_map" type="10">KT MAP</n0:Attribute>
<n0:Attribute key="kt_mat" type="10">KT MAT</n0:Attribute>but only first kt_lib_path will be loaded
I am afraid only a fix from Google would help.Tomasz
Advertisement