View Issue Details

IDProjectCategoryView StatusLast Update
0005685DarkRadiantScriptingpublic28.07.2021 03:14
Reporterjonri Assigned Tojonri  
PrioritynormalSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Product Version2.13.0 
Summary0005685: Brush creation via script is incomplete
DescriptionThe python script reference on the wiki states in the passing: "the GlobalBrushCreator can be called whenever a new brush should be instanced" but does not actually document this object. It can indeed be used to create a new brush which can be added, but there are no functions exposed to python which can be used to define an arbitrary brush.

My stopgap workaround was to select my newly-created empty brush, and then use GlobalCommandSystem.execute to call ResizeSelectedBrushesToBounds which would then create a box. I'd like to investigate a few ways to add more powerful brush creation to the scripting interface.

Idea 1:
Create ScriptBrushNode::addFace and allow a script to define individual faces one-by-one. The function is already in the IBrush class so it was the easiest to make a quick implementation. I'm currently experimenting with this, but it seems I need to do something more to make the faces actually show up. Adding faces by plane might be a little daunting for some, which leads us to...

Idea 2:
Create an interface that will call constructBrushPrefab (not to be confused with prefabs, these are the preset shapes you can find in the Brush menu in DR). It's a global function which in theory makes it easy to add, but I don't think I can actually do that without breaking the abstraction between the script plugin and the core.

Ideally I'd like to make both methods available.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
28.07.2021 03:14 jonri New Issue
28.07.2021 03:14 jonri Status new => assigned
28.07.2021 03:14 jonri Assigned To => jonri