Skip to content

Commit

Permalink
improved alot:
Browse files Browse the repository at this point in the history
made folders smallcase,

- defaults scene settings are now working properly.
- added name prefix, such that animated (keyframed objects) can be exported for all frames
by adding "@[EVAL:.current_frame:]" for example.
- open_archive_rib in ExporterArchive, now respects GEO,MAT,OBJ archives and looks up default rib archive (inline,readarchive) settings in scene correctly.
- camera can no be exportet as object consitently like all other objects.

etc.
  • Loading branch information
Gabriel Nützi (UBUNTU) committed May 27, 2015
1 parent 2d537a1 commit 43dd1b7
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 129 deletions.
12 changes: 11 additions & 1 deletion render_ribmosaic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ def register():
RibmosaicInfo("ribify module not found, using script level exporter")

bpy.utils.register_module(__name__)

# FIX ME: What should that do here (does not work with blender since the context is restricted access :
# http://wiki.blender.org/index.php/Extensions:2.6/Py/API_Changes
# ? We want that the pipeline to set up according to the .blend file (all shaders pinned to materials should be loaded as well, can we do this?)
#bpy.ops.wm.ribmosaic_pipeline_sync()


Expand All @@ -187,7 +191,13 @@ def unregister():

# Destroy our properties
rm_property.destroy_props()


# FIX ME: remove alll call backs registered with this addon, make some call back holder class for this addon which has an unregister /register function
# remove call back
if rm_operator.load_callback in bpy.app.handlers.load_post:
bpy.app.handlers.load_post.remove(rm_operator.load_callback)


bpy.utils.unregister_module(__name__)


Expand Down
5 changes: 5 additions & 0 deletions render_ribmosaic/rm_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def _set_pointer_datablock(self, pointer_datablock=None):
self.pointer_datablock = pointer_datablock
self.data_name = getattr(pointer_datablock, "name", "")
self.data_type = getattr(pointer_datablock, "type", self.data_type)
print("DataBlock: data_name:" , self.data_name, " data_type: " ,self.data_type, "object:" , self.pointer_datablock)

def _public_attrs(self, *include):
"""Returns list of public attributes plus any defined in include"""
Expand Down Expand Up @@ -439,6 +440,10 @@ def _context_data(self, context, context_type):
data = context.camera
search = "cameras"
window = 'CAMERA'
elif context.empty:
data = context.empty
search = "empty"
window = 'EMPTY'
elif context_type == 'RENDER':
data = context.scene
search = "renders"
Expand Down
4 changes: 3 additions & 1 deletion render_ribmosaic/rm_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import os
import traceback

import bpy

# #### Global variables

Expand All @@ -65,8 +66,8 @@
# ERROR HANDLER CLASS
# #############################################################################

# #### Define the global error handler class

# #### Define the global error handler class
class RibmosaicError(Exception):
"""UI and console error messages"""

Expand All @@ -93,3 +94,4 @@ def ReportError(self, operator=None):

if operator:
operator.report({'ERROR'}, self._message)

Loading

0 comments on commit 43dd1b7

Please sign in to comment.