[solved] how apply material for object? is it working?

A forum to discuss the implementation of a good Materials system in FreeCAD
Post Reply
User avatar
dprojects
Posts: 429
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

[solved] how apply material for object? is it working?

Post by dprojects »

Hi, I am trying to apply Wood Material for object Cube or Pad without success. Later, I would like to use Arch Texture workbench to rotate example grain direction texture (.png transparent file with grain direction mark) on face object and see how it impacts the XML object structure. I would like to know if this could be used this way for woodworking purposes or this need to be improved.

But when I selected Pad or Cube object and click material creation like it is described here https://wiki.freecadweb.org/Arch_SetMaterial but I got error:

Code: Select all

23:04:28  <Exception> type must be str or unicode, not FeaturePython
23:04:28  Running the Python command 'Arch_Material' failed:
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAGq1Ybw/usr/Mod/Arch/ArchMaterial.py", line 128, in Activated
    FreeCADGui.doCommand("FreeCAD.ActiveDocument.getObject(\""+obj.Name+"\").Material = mat")
  File "<string>", line 1, in <module>

type must be str or unicode, not FeaturePython
I can create Wood Material without selection but I am not able to apply it to the object.
I am doing something wrong? or this is not implemented to the end? or lost feature?

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking

I don't want to kill anyone LOL, is it still OK to be for total free?
User avatar
dprojects
Posts: 429
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: [solved] how apply material for object? is it working?

Post by dprojects »

OK. I was able to add Material and also MultiMaterial with 2 layers (one Wood and one Grain).
There need to be added new property to the object named "Material" and the type App::PropertyLink. Looks like bug or forgotten and not further developed good functionality.

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking

I don't want to kill anyone LOL, is it still OK to be for total free?
Post Reply