engine/gamesys/src/gamesys/scripts/script_spine_model.cpp
/** DEPRECATED! reset a shader constant for a spine model
     * Resets a shader constant for a spine model component.
     * The constant must be defined in the material assigned to the spine model.
     * Resetting a constant through this function implies that the value defined in the material will be used.
     * Which spine model to reset a constant for is identified by the URL.
     *
     * @name spine.reset_constant
     * @param url [type:string|hash|url] the spine model that should have a constant reset
     * @param constant [type:string|hash] name of the constant
     * @examples
     *
     * The following examples assumes that the spine model has id "spinemodel" and that the default-material in builtins is used, which defines the constant "tint".
     * If you assign a custom material to the sprite, you can reset the constants defined there in the same manner.
     *
     * How to reset the tinting of a spine model:
     *
     * ```lua
     * function init(self)
     *   spine.reset_constant("#spinemodel", "tint")
     * end
     * ```
     */


@name spine.reset_constant
@param url [type:string|hash|url] the spine model that should have a constant reset
@param constant [type:string|hash] name of the constant
@examples

The following examples assumes that the spine model has id "spinemodel" and that the default-material in builtins is used, which defines the constant "tint".
If you assign a custom material to the sprite, you can reset the constants defined there in the same manner.




@name spine . reset_constant @param url [ type : string|hash|url ] the spine model that should have a constant reset @param constant [ type : string|hash ] name of the constant @examples The following examples assumes that the spine model has id " spinemodel " and that the default - material in builtins is used which defines the constant " tint " . If you assign a custom material to the sprite you can reset the constants defined there in the same manner .
int SpineComp_ResetConstant(lua_State* L)
    {
        int top = lua_gettop(L);
        dmGameObject::HInstance instance = CheckGoInstance(L);
        dmhash_t name_hash = dmScript::CheckHashOrString(L, 2);
        dmGameSystemDDF::ResetConstantSpineModel msg;
        msg.m_NameHash = name_hash;
        dmMessage::URL receiver;
        dmMessage::URL sender;
        dmScript::ResolveURL(L, 1, &receiver, &sender);
        dmMessage::Post(&sender, &receiver, dmGameSystemDDF::ResetConstantSpineModel::m_DDFDescriptor->m_NameHash, (uintptr_t)instance, (uintptr_t)dmGameSystemDDF::ResetConstantSpineModel::m_DDFDescriptor, &msg, sizeof(msg), 0);
        assert(top == lua_gettop(L));
        return 0;
    }
int SpineComp_ResetConstant ( lua_State * L ) { int top = lua_gettop ( L ) ; dmGameObject :: HInstance instance = CheckGoInstance ( L ) ; dmhash_t name_hash = dmScript :: CheckHashOrString ( L , 2 ) ; dmGameSystemDDF :: ResetConstantSpineModel msg ; msg . m_NameHash = name_hash ; dmMessage :: URL receiver ; dmMessage :: URL sender ; dmScript :: ResolveURL ( L , 1 , & receiver , & sender ) ; dmMessage :: Post ( & sender , & receiver , dmGameSystemDDF :: ResetConstantSpineModel :: m_DDFDescriptor -> m_NameHash , ( uintptr_t ) instance , ( uintptr_t ) dmGameSystemDDF :: ResetConstantSpineModel :: m_DDFDescriptor , & msg , sizeof ( msg ) , 0 ) ; assert ( top == lua_gettop ( L ) ) ; return 0 ; }
DEPRECATED!
DEPRECATED!