{
    "version": "https:\/\/jsonfeed.org\/version\/1.1",
    "title": "Dmitry Baramov: posts tagged solution",
    "_rss_description": "Yet another boring blog about image processing",
    "_rss_language": "en",
    "_itunes_email": "dimabaramov@yandex.ru",
    "_itunes_categories_xml": "",
    "_itunes_image": "https:\/\/www.beautycleanup.ru\/pictures\/userpic\/userpic-square@2x.jpg?1794635191",
    "_itunes_explicit": "no",
    "home_page_url": "https:\/\/www.beautycleanup.ru\/tags\/solution\/",
    "feed_url": "https:\/\/www.beautycleanup.ru\/tags\/solution\/json\/",
    "icon": "https:\/\/www.beautycleanup.ru\/pictures\/userpic\/userpic@2x.jpg?1794635191",
    "authors": [
        {
            "name": "Dmitry Baramov",
            "url": "https:\/\/www.beautycleanup.ru\/",
            "avatar": "https:\/\/www.beautycleanup.ru\/pictures\/userpic\/userpic@2x.jpg?1794635191"
        }
    ],
    "items": [
        {
            "id": "10",
            "url": "https:\/\/www.beautycleanup.ru\/all\/disconnecting-all-viewers-on-script-load\/",
            "title": "Disconnecting All Viewers on Script Load",
            "content_html": "<p>This is a lifesaver of a hook. If a broken node completely freezes your script, Nuke won’t even finish loading it unless you disconnect the viewers first. This leaves you completely blind, unable to debug what’s causing the crash or fix the issue.<\/p>\n<p>Drop this code into your main <i>menu.py<\/i> inside the <i>.nuke<\/i> folder:<\/p>\n<pre class=\"e2-text-code\"><code class=\"python\">def disconnectAllViewers():\n    for node in nuke.allNodes('Viewer'):\n        for i in range(node.inputs()):\n            node.setInput(i, None)\n            \nnuke.addOnScriptLoad(disconnectAllViewers)<\/code><\/pre><p>This function plugs directly into the <i>addOnScriptLoad()<\/i> callback. When triggered, it loops through every input of every Viewer node in the script and cuts the connection.<\/p>\n",
            "summary": "This is a lifesaver of a hook. If a broken node completely freezes your script, Nuke won’t even finish loading it unless you disconnect the viewers first",
            "date_published": "2026-10-19T01:17:19+03:00",
            "date_modified": "2026-10-24T04:29:17+03:00",
            "tags": [
                "nuke",
                "python",
                "solution"
            ],
            "_date_published_rfc2822": "Mon, 19 Oct 2026 01:17:19 +0300",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "10",
            "_rss_enclosures": [],
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "highlight\/highlight.js",
                    "highlight\/highlight.css"
                ],
                "og_images": []
            }
        },
        {
            "id": "8",
            "url": "https:\/\/www.beautycleanup.ru\/all\/adding-a-slider-to-an-integer-knob\/",
            "title": "Adding a Slider to an Integer Knob",
            "content_html": "<p>By default, an <i>integer knob<\/i> in Nuke is created without a slider. While this works fine, adding a slider definitely provides a better UX.<\/p>\n<p>You can force a slider to appear using <i>setFlag()<\/i>. The problem, however, is that as soon as the node is re-initialized — like during a copy\/paste or when reloading the script — the flag resets, and the slider vanishes.<\/p>\n<p>The solution is to inject the flag configuration into the <i>onCreate<\/i> callback. It’s a bit of a hack, sure, but it gets the job done. Here is an example for an integer knob named <i>smooth_strength<\/i>:<\/p>\n<pre class=\"e2-text-code\"><code class=\"python\">set_slider = &quot;nuke.thisNode()['smooth_strength'].setFlag(0x0000000000000002)&quot;\nnuke.selectedNode()['onCreate'].setValue(set_slider)<\/code><\/pre><p>If needed, you can also define the range and default value right then and there:<\/p>\n<pre class=\"e2-text-code\"><code class=\"python\">set_slider = &quot;&quot;&quot;\nnode = nuke.thisNode()\nnode['smooth_strength'].setFlag(0x0000000000000002)\nnode['smooth_strength'].setRange(1,50)\nnode['smooth_strength'].setDefaultValue([10])\n&quot;&quot;&quot;\nnuke.selectedNode()['onCreate'].setValue(set_slider.strip())<\/code><\/pre><p>This will add a new line inside the node’s data. To see the result, you’ll need to re-initialize the node so the <i>onCreate<\/i> callback triggers — simply cutting and pasting the node will do the trick.<br \/>\n<br><\/p>\n<div class=\"e2-text-video\">\n<video src=\"https:\/\/www.beautycleanup.ru\/video\/integer_slider_demo@loop.mp4#t=0.001\" width=\"1172\" height=\"172\" autoplay muted loop playsinline alt=\"\" \/>\n\n<\/div>\n<p>Shoutout to <a href=\"https:\/\/www.gatimedia.co.uk\/integer-slider\">Attila Gasparetz<\/a>, where I originally borrowed this clever solution from.<\/p>\n",
            "summary": "By default, an integer knob in Nuke is created without a slider. While this works fine, adding a slider definitely provides a better UX",
            "date_published": "2026-10-14T21:01:38+03:00",
            "date_modified": "2026-10-24T10:16:52+03:00",
            "tags": [
                "gizmo",
                "nuke",
                "python",
                "solution"
            ],
            "_date_published_rfc2822": "Wed, 14 Oct 2026 21:01:38 +0300",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "8",
            "_rss_enclosures": [
                {
                    "url": "https:\/\/www.beautycleanup.ru\/video\/integer_slider_demo@loop.mp4",
                    "type": "video\/mp4",
                    "length": 264480
                }
            ],
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "highlight\/highlight.js",
                    "highlight\/highlight.css"
                ],
                "og_images": []
            }
        }
    ],
    "_e2_version": 4199,
    "_e2_ua_string": "Aegea 11.5 (v4199e)"
}