Skip to content

Commit

Permalink
Rewriting docs
Browse files Browse the repository at this point in the history
  • Loading branch information
McManning committed Nov 20, 2022
1 parent 6bc5508 commit 2b6f592
Show file tree
Hide file tree
Showing 61 changed files with 421 additions and 332 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
sphinx:
configuration: RTD/conf.py
configuration: docs/conf.py
python:
version: 3.8
install:
Expand Down
8 changes: 4 additions & 4 deletions Blender/src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

bl_info = {
'name': 'Unity Coherence',
'description': 'Use the Unity Engine as a viewport renderer',
'name': 'Coherence',
'description': 'Realtime rendering with external game engines',
'author': 'Chase McManning',
'version': (0, 1, 0),
'blender': (2, 82, 0),
'doc_url': 'https://github.com/McManning/Coherence/wiki',
'blender': (2, 91, 0),
'doc_url': 'https://coherence.readthedocs.io/',
'tracker_url': 'https://github.com/McManning/Coherence/issues',
'category': 'Render'
}
Expand Down
22 changes: 4 additions & 18 deletions Blender/src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,11 @@
EntityHandle = bindings.EntityHandle

class Component(component.BaseComponent):
pass
#: bool: Can multiple instances of this component to be attached to a :class:`bpy.types.Object`
multiple: bool = False

# Not exposed yet to third parties

# def register_plugin(cls):
# """Register a third party plugin with the Coherence API.

# Args:
# cls (inherited class of :class:`.Plugin`)
# """
# runtime.instance.register_plugin(cls)

# def unregister_plugin(cls):
# """Unregister a third party plugin from the Coherence API.

# Args:
# cls (inherited class of :class:`.Plugin`)
# """
# runtime.instance.unregister_plugin(cls)
#: bool: Is this component hidden from the **Add Component** menu
hidden: bool = False

def register_component(component: 'type[Component]'):
"""Register a third party component with the Coherence API.
Expand Down
8 changes: 8 additions & 0 deletions Blender/src/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@
import importlib
importlib.reload(mesh)
importlib.reload(metaball)
importlib.reload(test)
importlib.reload(lineworks)
else:
pass
from . import mesh
from . import metaball
from . import test
from . import lineworks

import bpy

def register():
# Register builtin components
mesh.register()
metaball.register()
test.register()
lineworks.register()

def unregister():
# Unregister builtin components
mesh.unregister()
metaball.unregister()
test.unregister()
lineworks.unregister()
16 changes: 14 additions & 2 deletions Blender/src/core/bindings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import math
from ctypes import *
from enum import IntEnum, IntFlag
import math

MAX_NAME_SIZE = 128
MAX_PROPERTIES = 64
Expand Down Expand Up @@ -231,8 +232,19 @@ class CustomEvent(CoherenceStruct):

LOG_SINK_CALLBACK = CFUNCTYPE(None, c_int, c_char_p, c_size_t)


def open_lib(path) -> CDLL:
"""Load LibCoherence and typehint methods
Args:
path (str): Location of LibCoherence
Returns:
ctypes.CDLL
"""
if os.getenv('SPHINX_BUILD'):
# Skip DLL load if building docs
return None

# os.add_dll_directory('D:\\Coherence\\coherence-cpp\\Core\\tests\\lib\\')
lib = CDLL(path)
# lib = windll.LoadLibrary(path)
Expand Down
Loading

0 comments on commit 2b6f592

Please sign in to comment.