diff --git a/src/blocks/scratch3_pen.js b/src/blocks/scratch3_pen.js
index d50bbe75..7de5e51a 100644
--- a/src/blocks/scratch3_pen.js
+++ b/src/blocks/scratch3_pen.js
@@ -328,7 +328,8 @@ class Scratch3PenBlocks {
type: ArgumentType.NUMBER,
defaultValue: 1
}
- }
+ },
+ hideFromPalette: true
},
{
opcode: 'changePenShadeBy',
@@ -339,7 +340,8 @@ class Scratch3PenBlocks {
type: ArgumentType.NUMBER,
defaultValue: 1
}
- }
+ },
+ hideFromPalette: true
},
{
opcode: 'setPenHueToNumber',
@@ -350,7 +352,8 @@ class Scratch3PenBlocks {
type: ArgumentType.NUMBER,
defaultValue: 1
}
- }
+ },
+ hideFromPalette: true
},
{
opcode: 'changePenHueBy',
@@ -361,7 +364,8 @@ class Scratch3PenBlocks {
type: ArgumentType.NUMBER,
defaultValue: 1
}
- }
+ },
+ hideFromPalette: true
}
],
menus: {
diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 1e0e90ca..b9738713 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -630,8 +630,9 @@ class Runtime extends EventEmitter {
const xmlParts = [];
for (const categoryInfo of this._blockInfo) {
const {name, color1, color2} = categoryInfo;
+ const paletteBlocks = categoryInfo.blocks.filter(block => !block.info.hideFromPalette);
xmlParts.push(``);
- xmlParts.push.apply(xmlParts, categoryInfo.blocks.map(blockInfo => blockInfo.xml));
+ xmlParts.push.apply(xmlParts, paletteBlocks.map(block => block.xml));
xmlParts.push('');
}
return xmlParts.join('\n');
diff --git a/src/extension-support/extension-manager.js b/src/extension-support/extension-manager.js
index d7c5fab0..2179e3f2 100644
--- a/src/extension-support/extension-manager.js
+++ b/src/extension-support/extension-manager.js
@@ -30,6 +30,7 @@ const builtinExtensions = {
* @property {object.|undefined} arguments - information about this block's arguments, if any
* @property {string|Function|undefined} func - the method for this block on the extension service (default: opcode)
* @property {Array.|undefined} filter - the list of targets for which this block should appear (default: all)
+ * @property {Boolean|undefined} hideFromPalette - true if should not be appear in the palette. (default false)
*/
/**