mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
Add canWriteAssets method and signal to Entities API
This commit is contained in:
parent
641f98589a
commit
9136937954
2 changed files with 13 additions and 0 deletions
|
@ -35,6 +35,7 @@ EntityScriptingInterface::EntityScriptingInterface(bool bidOnSimulationOwnership
|
||||||
connect(nodeList.data(), &NodeList::isAllowedEditorChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);
|
connect(nodeList.data(), &NodeList::isAllowedEditorChanged, this, &EntityScriptingInterface::canAdjustLocksChanged);
|
||||||
connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged);
|
connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged);
|
||||||
connect(nodeList.data(), &NodeList::canRezTmpChanged, this, &EntityScriptingInterface::canRezTmpChanged);
|
connect(nodeList.data(), &NodeList::canRezTmpChanged, this, &EntityScriptingInterface::canRezTmpChanged);
|
||||||
|
connect(nodeList.data(), &NodeList::canWriteAssetsChanged, this, &EntityScriptingInterface::canWriteAssetsChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityScriptingInterface::queueEntityMessage(PacketType packetType,
|
void EntityScriptingInterface::queueEntityMessage(PacketType packetType,
|
||||||
|
@ -63,6 +64,11 @@ bool EntityScriptingInterface::canRezTmp() {
|
||||||
return nodeList->getThisNodeCanRezTmp();
|
return nodeList->getThisNodeCanRezTmp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EntityScriptingInterface::canWriteAssets() {
|
||||||
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
return nodeList->getThisNodeCanWriteAssets();
|
||||||
|
}
|
||||||
|
|
||||||
void EntityScriptingInterface::setEntityTree(EntityTreePointer elementTree) {
|
void EntityScriptingInterface::setEntityTree(EntityTreePointer elementTree) {
|
||||||
if (_entityTree) {
|
if (_entityTree) {
|
||||||
disconnect(_entityTree.get(), &EntityTree::addingEntity, this, &EntityScriptingInterface::addingEntity);
|
disconnect(_entityTree.get(), &EntityTree::addingEntity, this, &EntityScriptingInterface::addingEntity);
|
||||||
|
|
|
@ -110,6 +110,12 @@ public slots:
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE bool canRezTmp();
|
Q_INVOKABLE bool canRezTmp();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Entities.canWriteAsseets
|
||||||
|
* @return {bool} `true` if the DomainServer will allow this Node/Avatar to write to the asset server
|
||||||
|
*/
|
||||||
|
Q_INVOKABLE bool canWriteAssets();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Add a new entity with the specified properties. If `clientOnly` is true, the entity will
|
* Add a new entity with the specified properties. If `clientOnly` is true, the entity will
|
||||||
* not be sent to the server and will only be visible/accessible on the local client.
|
* not be sent to the server and will only be visible/accessible on the local client.
|
||||||
|
@ -284,6 +290,7 @@ signals:
|
||||||
void canAdjustLocksChanged(bool canAdjustLocks);
|
void canAdjustLocksChanged(bool canAdjustLocks);
|
||||||
void canRezChanged(bool canRez);
|
void canRezChanged(bool canRez);
|
||||||
void canRezTmpChanged(bool canRez);
|
void canRezTmpChanged(bool canRez);
|
||||||
|
void canWriteAssetsChanged(bool canWriteAssets);
|
||||||
|
|
||||||
void mousePressOnEntity(const EntityItemID& entityItemID, const PointerEvent& event);
|
void mousePressOnEntity(const EntityItemID& entityItemID, const PointerEvent& event);
|
||||||
void mouseMoveOnEntity(const EntityItemID& entityItemID, const PointerEvent& event);
|
void mouseMoveOnEntity(const EntityItemID& entityItemID, const PointerEvent& event);
|
||||||
|
|
Loading…
Reference in a new issue