#! /usr/bin/env python
# -*- Mode: Python -*-
# -*- coding: ascii -*-
"""
This is a LightWave Generic plug-in that adds a new Null object
and positions it at <0, 1, 0>.
"""
import sys
import lwsdk
class Load_Object(lwsdk.IGeneric):
def __init__(self, context):
super(Load_Object, self).__init__()
# the complete process-func goes 4 spaces to the left, so process is no longer a Sub func of __init__
def process (self, ga):
name = "F:\StaticModels\Objects\Aset_qkduW_ZTool.lwo"
result = ga.evaluate(ga.data, "LoadObject %s" % name)
return lwsdk.AFUNC_OK
ServerTagInfo = [
( "Load_Object", lwsdk.SRVTAG_USERNAME | lwsdk.LANGID_USENGLISH ),
( "Load Object", lwsdk.SRVTAG_BUTTONNAME | lwsdk.LANGID_USENGLISH ),
( "Utilities/Python", lwsdk.SRVTAG_MENU | lwsdk.LANGID_USENGLISH )
]
ServerRecord = { lwsdk.GenericFactory("LW_LoadObject", Load_Object) : ServerTagInfo }