Hi @dublove, this will do it.
- Mark

/**
* @file Make Object Style.js
*
* Note: the `makeObjectStyle` function can create
* an *empty* object style, with no settings enabled.
*
* In this example, we make "EMPTY" object style and then
* make "NewStyle" which is based on "EMPTY". We make both
* styles in the "My Group" ObjectStyleGroup.
*
* @author m1b
* @version 2025-10-01
* @discussion https://community.adobe.com/t5/indesign-discussions/how-to-create-new-object-styles-based-on-really-quot-none-quot-object-using-scripts/m-p/15412503
*/
function main() {
var doc = app.activeDocument;
var styleGroup = makeObjectStyleGroup(doc, 'My Group');
var emptyStyle = makeObjectStyle(styleGroup, 'EMPTY');
var newStyle = makeObjectStyle(styleGroup, 'NewStyle', emptyStyle);
};
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Do Script');
/**
* Returns an object style named `name`, or if it
* doesn't exist, returns an empty style.
* @author m1b
* @version 2025-10-01
* @param {Document|ObjectStyleGroup} container - the container for the new style.
* @param {String} name - the style's name.
* @param {ObjectStyle} [parentObjectStyle] - the style to base the new style on (default: nothing).
* @returns {ObjectStyle}
*/
function makeObjectStyle(container, name, parentObjectStyle) {
if (
!container
|| !container.hasOwnProperty('allObjectStyles')
)
throw new Error('makeObjectStyle: bad `container` supplied.');
var style = getThing(container.allObjectStyles, 'name', name);
if (style)
return style;
style = container.objectStyles.add({
name: name,
enableAnchoredObjectOptions: false,
enableExportTagging: false,
enableFill: false,
enableFrameFittingOptions: false,
enableObjectExportAltTextOptions: false,
enableObjectExportEpubOptions: false,
enableObjectExportTaggedPdfOptions: false,
enableParagraphStyle: false,
enableStoryOptions: false,
enableStroke: false,
enableStrokeAndCornerOptions: false,
enableTextFrameAutoSizingOptions: false,
enableTextFrameBaselineOptions: false,
enableTextFrameColumnRuleOptions: false,
enableTextFrameFootnoteOptions: false,
enableTextFrameGeneralOptions: false,
enableTextWrapAndOthers: false,
enableTransformAttributes: false,
});
style.contentEffectsEnablingSettings.properties = {
enableBevelEmboss: false,
enableDirectionalFeather: false,
enableDropShadow: false,
enableFeather: false,
enableGradientFeather: false,
enableInnerGlow: false,
enableInnerShadow: false,
enableOuterGlow: false,
enableSatin: false,
enableTransparency: false,
};
style.objectEffectsEnablingSettings.properties = {
enableBevelEmboss: false,
enableDirectionalFeather: false,
enableDropShadow: false,
enableFeather: false,
enableGradientFeather: false,
enableInnerGlow: false,
enableInnerShadow: false,
enableOuterGlow: false,
enableSatin: false,
enableTransparency: false,
};
if (parentObjectStyle && parentObjectStyle.isValid)
style.basedOn = parentObjectStyle;
return style;
};
/**
* Returns an ObjectStyleGroup named `name`,
* creating it if necessary in `container`.
* @author m1b
* @version 2025-10-01
* @param {Document|ObjectStyleGroup} container - the container for the new style.
* @param {String} name - the style's name.
*/
function makeObjectStyleGroup(container, name) {
if (
!container
|| !container.hasOwnProperty('objectStyleGroups')
)
throw new Error('makeObjectStyleGroup: bad `container` supplied.');
var styleGroup = getThing(container.objectStyleGroups, 'name', name);
if (!styleGroup)
styleGroup = container.objectStyleGroups.add({ name: name });
return styleGroup;
};
/**
* Returns a thing with matching property.
* If `key` is undefined, evaluate the object itself.
* @author m1b
* @version 2024-04-21
* @param {Array|Collection} things - the things to look through.
* @param {String} [key] - the property name (default: undefined).
* @param {*} value - the value to match.
* @returns {*?} - the thing, if found.
*/
function getThing(things, key, value) {
for (var i = 0; i < things.length; i++)
if ((undefined == key ? things[i] : things[i][key]) == value)
return things[i];
};
Edit 2025-07-18: added "basedOn" support.
Edit 2025-10-01: changed parameter `doc` to `container` and modify code to handle either Document or ObjectStyleGroup, so we can create the style inside a group. (Note: this script does not create the object style group if it is missing.)
Edit 2025-10-01: added "makeObjectStyleGroup" function to create the group if missing.