[QGIS-Developer] keys of the dict in setShapeProperties(dict)
Abdelghani Tamort
abdel.tmrt at gmail.com
Tue Jun 4 00:40:02 PDT 2024
Hello Jacky,
Thank you for your effort, it is much clearer now.
Since Model has no property, then the dictionary in the
.setShapeProperties() method should be empty?
But how do I input the model's directory into the QgsPoint3DSymbol() ?
Here is my attempt of doing so, for now it doesn't work :
*# get the layer named "arbre"layer =
QgsProject.instance().mapLayersByName('arbre')[0]s = QgsPoint3DSymbol()#
set 3d model to the symbolmodel =
qgis.analysis.Qgis.Point3DShape(7)s.setShape(model)s.setShapeProperties({"Model"
: "C:/Users/atamort/Downloads/trees_low_poly.fbx"})renderer =
QgsVectorLayer3DRenderer(s)layer.setRenderer3D(renderer)*
Any help would be appreciated !
Best,
Abdelghani
On Mon, 3 Jun 2024 at 17:44, Jacky Volpes via QGIS-Developer <
qgis-developer at lists.osgeo.org> wrote:
> Hi Abdelghani,
>
> Reading the source code, we can deduce the properties.
> I agree that the documentation is too light here.
>
>
> https://github.com/qgis/QGIS/blob/master/src/3d/symbols/qgspoint3dsymbol.cpp#L172
>
> For a cylinder, the properties are "length", "radius" (default values are
> 10).
> For a sphere: "radius" (default value is 10).
> For a cone: "length" (default value is 10).
> For a cube: "size" (default value is 10).
> For a torus: "radius" (default value is 10), "minorRadius" (default value
> is 5).
> For a plane: "size" (default value is 10).
> For extruded text: "depth" (default value is 1).
> For Model and Billboard: no property.
>
> I only did a "translator" job here :-) and I don't know if the 3D shapes
> that are listed make sense for you.
> Regards,
>
> Jacky Volpes
>
> Ingénieur SIG - Oslandia
>
>
> Le 03/06/2024 à 17:33, Abdelghani Tamort via QGIS-Developer a écrit :
>
> Howdy,
>
> I want to know which are the keys of each shape in the setShapeProperties
> (*self*, *properties: Dict[str, Any]*) method of qgis.analysis.Qgis.Point3DShape.
> It would help me choose a 3d model as a point symbol.
> There is no mention of them in the PyQGIS docs (
> https://qgis.org/pyqgis/3.36/_3d/QgsPoint3DSymbol.html#qgis._3d.QgsPoint3DSymbol.shapeProperty
> )
>
> Cheers,
>
> Abdelghani TAMORT
>
> _______________________________________________
> QGIS-Developer mailing listQGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240604/b76944a6/attachment.htm>
More information about the QGIS-Developer
mailing list