It looks like the file was downloaded from GH via browser and instead of the raw version the HTML page was downloaded.File "/run/media/paullee/Home_1/paullee/Downloads/FreeCAD_0.19-17360-Linux-Conda_Py3Qt5_glibc2.12-x86_64/squashfs-root/usr/Mod/Arch/OfflineRenderingUtils.py", line 7 <!DOCTYPE html>
shadows in the freecad viewport
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: shadows in the freecad viewport
Re: shadows in the freecad viewport
Thanks @werner for the hints - I put in the wrongly downloaded file
Putting back the correct file, it works as indicated
Putting back the correct file, it works as indicated
Re: shadows in the freecad viewport
I'm just curious: this works only for BIM projects or any body or part element inside FreeCAD could get the shadows?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: shadows in the freecad viewport
Anything. Even meshes, and even wireframes seem to work too!
Re: shadows in the freecad viewport
Working flawlessly here in macOS, it's pretty cool.
How about adding it as a new type of shading? I wish I could load-unload it when I want
How about adding it as a new type of shading? I wish I could load-unload it when I want
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: shadows in the freecad viewport
Here is the prove but, I have realized that it only works with the fist body I have in the hierarchy and anything else... is this normal?:
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: shadows in the freecad viewport
Maybe you need to put the elements into a group like building part.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Re: shadows in the freecad viewport
The python snippet that Werner provided above will indeed only grab the first element form the scene. To get them all you need to do this:
then you use this newnode in your shadowgroup
Code: Select all
from pivy import coin
root = Gui.ActiveDocument.ActiveView.getSceneGraph()
nodes = [node for node in root.getChildren() if isinstance(node, coin.SoSeparator]
newnode = coin.SoSeparator()
for node in nodes:
newnode.addChild(node) # pack them all into a separator, for convenience
Re: shadows in the freecad viewport
well, I was actually using your code... could you provide mi a full code to try? I have tried several times to inject your new snippet into the main code and I can't make it work...yorik wrote: ↑Mon Jul 29, 2019 2:32 pm The python snippet that Werner provided above will indeed only grab the first element form the scene. To get them all you need to do this:
then you use this newnode in your shadowgroupCode: Select all
from pivy import coin root = Gui.ActiveDocument.ActiveView.getSceneGraph() nodes = [node for node in root.getChildren() if isinstance(node, coin.SoSeparator] newnode = coin.SoSeparator() for node in nodes: newnode.addChild(node) # pack them all into a separator, for convenience
Thanks
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here