Improve brush parsing

This commit is contained in:
luboslenco
2020-03-19 15:45:37 +01:00
parent add26db23c
commit cc73048ab2
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
{"name":"Brush","nodes":[{"id":3,"name":"Input","type":"InputNode","x":83,"y":218,"color":-11959648,"inputs":[{"id":3,"node_id":3,"name":"Lazy Radius","type":"VALUE","color":-6184543,"default_value":0.0},{"id":3,"node_id":3,"name":"Lazy Step","type":"VALUE","color":-6184543,"default_value":0.0}],"outputs":[{"id":3,"node_id":3,"name":"Position","type":"VECTOR","color":-10238109,"default_value":null}],"buttons":[]},{"id":5,"name":"Brush Output","type":"BrushOutputNode","x":311,"y":192,"color":-11959648,"inputs":[{"id":5,"node_id":5,"name":"Position","type":"VECTOR","color":-10238109,"default_value":[0,0,0]},{"id":5,"node_id":5,"name":"Radius","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Scale","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Angle","type":"VALUE","color":-6184543,"default_value":0.0},{"id":5,"node_id":5,"name":"Opacity","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Hardness","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Stencil","type":"VALUE","color":-6184543,"default_value":1.0}],"outputs":[],"buttons":[{"name": "Directional","type": "BOOL","default_value": false,"output": 0}]}],"links":[{"id":0,"from_id":3,"from_socket":0,"to_id":5,"to_socket":0}]}
{"name":"Brush","nodes":[{"id":3,"name":"Input","type":"InputNode","x":83,"y":218,"color":-11959648,"inputs":[{"id":3,"node_id":3,"name":"Lazy Radius","type":"VALUE","color":-6184543,"default_value":0.0},{"id":3,"node_id":3,"name":"Lazy Step","type":"VALUE","color":-6184543,"default_value":0.0}],"outputs":[{"id":3,"node_id":3,"name":"Position","type":"VECTOR","color":-10238109,"default_value":null}],"buttons":[]},{"id":5,"name":"Brush Output","type":"BrushOutputNode","x":311,"y":192,"color":-11959648,"inputs":[{"id":5,"node_id":5,"name":"Position","type":"VECTOR","color":-10238109,"default_value":[0,0,0]},{"id":5,"node_id":5,"name":"Radius","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Scale","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Angle","type":"VALUE","color":-6184543,"default_value":0.0,"max":360},{"id":5,"node_id":5,"name":"Opacity","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Hardness","type":"VALUE","color":-6184543,"default_value":1.0},{"id":5,"node_id":5,"name":"Stencil","type":"VALUE","color":-6184543,"default_value":1.0}],"outputs":[],"buttons":[{"name": "Directional","type": "BOOL","default_value": false,"output": 0}]}],"links":[{"id":0,"from_id":3,"from_socket":0,"to_id":5,"to_socket":0}]}
+4
View File
@@ -927,7 +927,11 @@ class UISidebar {
// Show picked material next to cursor
if (Context.tool == ToolPicker && pickerSelectMaterial) {
var img = Context.material.imageIcon;
#if kha_opengl
g.drawScaledImage(img, mx + 10, my + 10 + img.height, img.width, -img.height);
#else
g.drawImage(img, mx + 10, my + 10);
#end
}
var cursorImg = Res.get("cursor.k");
+5 -1
View File
@@ -321,7 +321,11 @@ class RenderUtil {
// scons[_si] = _scon;
// mcons[_mi] = _mcon;
Context.material = _material;
MaterialParser.parsePaintMaterial();
function _parse(_) {
MaterialParser.parsePaintMaterial();
iron.App.removeRender(_parse);
}
iron.App.notifyOnRender(_parse);
// Restore paint mesh
planeo.visible = false;