Moved struct DupliObject to DNA_object_types.h.
Object.create_dupli_list now works ok.
This commit is contained in:
@@ -41,7 +41,7 @@ class SCRIPT_OT_export_obj(bpy.types.Operator):
|
||||
def debug(self, message):
|
||||
print("{0}: {1}".format(self.__class__.__name__, message))
|
||||
|
||||
def execute(self, context):
|
||||
def execute_(self, context):
|
||||
self.debug("exec")
|
||||
self.debug("filename = " + self.filename)
|
||||
|
||||
@@ -56,6 +56,18 @@ class SCRIPT_OT_export_obj(bpy.types.Operator):
|
||||
# raise Exception("oops!")
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
def execute(self, context):
|
||||
self.debug("exec")
|
||||
|
||||
act = context.active_object
|
||||
|
||||
act.create_dupli_list()
|
||||
print("{0} has {1} dupli objects".format(act.name, len(act.dupli_list)))
|
||||
|
||||
act.free_dupli_list()
|
||||
|
||||
return ('FINISHED',)
|
||||
|
||||
def invoke(self, context, event):
|
||||
self.debug("invoke")
|
||||
|
||||
Reference in New Issue
Block a user