OSArch Community

[prj] Blender add-on to create technical drawing

  1. T

    In an effort to realize OSArch's funding mission of incentivizing developers to work together to develop common solutions, the OSArch steering committee created the following 'bounty'.

    This project looks at integrating the efforts of prj and BlenderBIM into one common solution.

    If this is important to you, you can fund the project directly here:

    https://opencollective.com/osarch/projects/consolidating_2d_documentation

  2. S

    hi there. Is there a way to ad hatches? I'm not sure how to add it in CSS, given that i can change the fill color, but not sure how to add a hatch pattern. any help would be appreciated. ive only started to learn how to edit CSS files.

  3. A

    Hi @SavyGust27 you can see how to add custom hatches here in this video:

    The key is you need edit the css file to reference the hatch and the patterns.svg file to edit or create you own hatch

  4. D

    I'd kind of taken prj as a given in my workflow since it does what it does well, so such a bummer not being able to use it in Blender 3.6, I suspect due to the python version in use, prj is just not able to install dependencies. @strumet is there something I can do about this please?

  5. S

    Hi @DADA_universe ,

    I tried prj on blender 3.6.2 both on windows and linux and it seems working as usual... let me know what kind of error do you get... I'll see what I can do

  6. G

    It works on my end too V3.6, @DADA_universe do you see an error in the console ? On windows Window > Toggle window Console. Also try running Blender as administrator

  7. G

    Hello @strumet In Blender 4.0 the devs have removed the None display device option so this line https://gitlab.com/marzof/prj/-/blob/main/working_scene.py?ref_type=heads#L73 throws an error, do you have any clue how to fix this ? Is there a similar setting in 4.0 ? I have tried commenting it out but the output is only partial afterwards...

    Edit : Partially fixed by copy / pasting the color management settings from version 3.6 to 4.0 (in folder Blender/4.0/datafiles/colormanagement) The release notes indicate that None is replaced by Srgb with Raw transform but I didn't witness it being the same. https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Color_Management

  8. N

    Hi, is this addon still being developed for blender 4.0 and above? it seems that I couldn't make it work when using blender 4.0

  9. G

    @NNL please read my comment above, you need to copy / paste the color management settings from 3.6 to 4.0

  10. N

    @Gorgious it worked, but does it have any implications to other things?

  11. S

    @Gorgious @NNL

    Sorry for not replying: I'm very busy at the moment.... I'll try to take a look at it in the next days

  12. S

    Hi,

    not spent too much time about it...

    ...but I can say that the display_device setting doesn't affect the functioning of the add-on. You can just simply commenting (or deleting) that line:

    In the next days I'll update the release accordingly

  13. S
  14. B

    Hi

    I'm new to Inkscape. How can we tag a piece of an object's data in Inkscape? For example, Description or Tags?

    Is there a way of adding our own custom data to Blender objects for tagging in Inkscape?

  15. S

    Hi,

    in prj the Description field and the Tag field are used to assign some keyword to the object.

    "Description" is a specific tag used to describe the entity (https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc): in Inkscape it appears in the object property's window

    "Tags" are just words used as classes for the object in the svg file (along to the collection name, the object name, the camera name and other related values). This way you can use them in the css file to stylize the drawing.

  16. B
  17. B
  18. S

    I'm not sure I understood what you mean... Do you intend something like this?

    (wait for the inkscape part)

  19. B
  20. S

    I used javascript to do what you see in the previous animated gif: the script (you can find it in https://gitlab.com/marzof/prj/-/tree/main/obj_data_viewer) extracts the infos from the svg (as it comes from prj) and shows them in an html page.

    I don't know if it could be a path to try for you needs.

  21. S

    (PS: the link to the google drive file return a "Access Denied" message... in order to let anyone see it you should change its permissions)

  22. B

    Link now opened for access. Thanks @strumet for your help.

  23. B

    Sorry to be a pain. This works in a Browser but I'm wondering if it is possible to get the leaders and text to be permanently shown (and linked to <desc>) in Inkscape?

    Even better would be the ability to use Blender's Custom Properties....a bit like MeasureIt_Arch does with Autofill - Custom Properties https://kevancress.github.io/MeasureIt_ARCH/prop_descriptions/textfields/

  24. D

    @DADA_universe said:

    I'd kind of taken prj as a given in my workflow since it does what it does well, so such a bummer not being able to use it in Blender 3.6, I suspect due to the python version in use, prj is just not able to install dependencies. @strumet is there something I can do about this please?

    Face palm as I realise I've circled back a year later to the same issue to which I didn't offer further information the last time, this time with Blender 4.1.1 with prj version 0.0.9L.

    Here is the error I'm getting after clicking the button to install dependencies: Command '['/usr/bin/python3.12', '-m', 'pip', 'install', 'svgwrite']' returned non-zero exit status 1.

    Running Blender on Manjaro Linux.

  25. D

    @DADA_universe said:

    @DADA_universe said:

    I'd kind of taken prj as a given in my workflow since it does what it does well, so such a bummer not being able to use it in Blender 3.6, I suspect due to the python version in use, prj is just not able to install dependencies. @strumet is there something I can do about this please?

    Face palm as I realise I've circled back a year later to the same issue to which I didn't offer further information the last time, this time with Blender 4.1.1 with prj version 0.0.9L.

    Here is the error I'm getting after clicking the button to install dependencies: Command '['/usr/bin/python3.12', '-m', 'pip', 'install', 'svgwrite']' returned non-zero exit status 1.

    Running Blender on Manjaro Linux.

    Figured out this had to do with Python path issues from how the system installed version of Blender is installed on Manjaro. Downloaded portable version of Blender 4.2 LTS (which has python bundled in it and located in a path it seems prj can better recognize) and the prj dependencies installed with no issues, however, trying to generate an svg with prj now throws this error:

    Something went wrong...Drawing cancelled for Camera_2D

    Traceback (most recent call last):

    File ".............../.config/blender/4.2/scripts/addons/prj/init.py", line 111, in execute

    filepath = main(camera, self.selected_objects, context)
    
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "........................../.config/blender/4.2/scripts/addons/prj/main.py", line 116, in main

    draw_subjects(subjects_to_draw)

    File ".........................../.config/blender/4.2/scripts/addons/prj/draw.py", line 136, in draw_subjects

    draw(subject)

    File "........................../.config/blender/4.2/scripts/addons/prj/drawing_maker.py", line 143, in draw

    export_grease_pencil(subject=subject,grease_pencil=lineart_gp,

    File "................................./.config/blender/4.2/scripts/addons/prj/drawing_maker.py", line 100, in export_grease_pencil

    svg_data = Svg_read(tmp_file)
    
               ^^^^^^^^^^^^^^^^^^

    File "................................./.config/blender/4.2/scripts/addons/prj/svgread.py", line 42, in init

    self.root = ET.parse(filepath).getroot()
    
                ^^^^^^^^^^^^^^^^^^

    File "......................./Downloads/blender-4.2.1-linux-x64/4.2/python/lib/python3.11/xml/etree/ElementTree.py", line 1218, in parse

    tree.parse(source, parser)

    File "/............................../Downloads/blender-4.2.1-linux-x64/4.2/python/lib/python3.11/xml/etree/ElementTree.py", line 580, in parse

    self._root = parser._parse_whole(source)
    
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

    xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 2

  1. Page 1
  2. 2
  3. 3
  4. 4
  5. 5

Login or Register to reply.