View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005685||DarkRadiant||Scripting||public||28.07.2021 03:14||28.07.2021 03:14|
|Summary||0005685: Brush creation via script is incomplete|
|Description||The 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.
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...
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.
|Tags||No tags attached.|