Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi Regina,

yes, looks irritating. I took a look and it seems that the attribute is used in two different scenarios.

When used in 'style-graphic-properties-attlist' it is

            <optional>
                <attribute name="dr3d:lighting-mode">
                    <choice>
                        <value>standard</value>
                        <value>double-sided</value>
                    </choice>
                </attribute>
            </optional>

while in 'dr3d-scene-attlist' it is

            <optional>
                <attribute name="dr3d:lighting-mode">
                    <ref name="boolean"/>
                </attribute>
            </optional>

In the 1st case it is used as object attribute for each SdrObject (but only of use when it is a 3D object) and in the style hierarchy to define if double-sided lighting is applied. This is equivalent to the button in the 3D dialog (Tab 'GeometryÄ, Button 'Double-Sided'). Mostly useful for non-closed 3D objects.

In the 2nd case it is used for 3D Scene objects only and defines if lighting is applied at all to the whole scene. If applied, flat, phong or gourard is used, if not, the objects are rendered without lighting calculations in their FillStyle definitions. This is also in the 3D dialog, see Tab 'Textures' the 'Mode' switches.

Something must have run out of order though, the original 'Mode' was not a bool but had three states (as the 3D dialog shows). Someone at some time must have changed it to bool, but probably forgot to cleanup the 3D dialog.

I am not sure if the attribute is allowed to be used with the same name in two scenarios (maybe valid), but probably not with two different data types (?) so one probably should be renamed.

And the 3D dialog should be corrected...


Regards,

ALG



Am 22.07.2016 um 00:44 schrieb Regina Henschel:
Hi all,

in ODF 1.2 exists the attribute
19.99 dr3d:lighting-mode

It has the description
"The dr3d:lighting-mode attribute specifies whether lighting is used in a three-dimensional chart." and "... a three-dimensional scene."

And for data type: "The dr3d:lighting-mode attribute has the data type boolean 18.3.3."

What is the purpose of this attribute? From the text I would expect, that it enables/disables the use of lights in the scene or chart.



But in addition exists in ODF 1.2 for 3D Objects the style property 20.79 dr3d:lighting-mode

The description is, "The dr3d:lighting-mode attribute specifies whether lighting is used for a three-dimensional object."
Notice the "three-dimensional object" here.

And for data type: "The defined values for the dr3d:lighting-mode attribute are: ●double-sided: the front and back sides of all planes are displayed if they are visible from the viewer's perspective. ●standard: Depending on the value of the dr3d:normals-direction attribute, only the front or only the back side sides of the plane are displayed. The opposite sides are not displayed, whether they are visible from the viewer's perspective or not."

So this style property is connected to normals.



The code is very confusing. I find in mbLightingMode(false) in SdXML3DSceneAttributesHelper and later setPropertyValue("D3DSceneTwoSidedLighting", uno::Any(mbLightingMode))
That makes no sense to me.

I do not find any place where "double-sided" vs "standard" is evaluated on file open, I see no UI element to set it, and the property "D3DDoubleSided", which sounds so, is mapped to XML_BACKFACE_CULLING in sdpropls.cxx, which is another different style property. And my test files do not work as I expect it in regard to normals, in case I write dr3d:lighting-mode="standard" in the file.


Reason for my investigation is, that the OASIS ODF TC will revise these texts for ODF1.3.

Kind regards
Regina



_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

--
--
ALG (PGP Key: EE1C 4B3F E751 D8BC C485 DEC1 3C59 F953 D81C F4A2)


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.