Dupliframes + Shape Keys ? ...[SOLVED]

I’m trying to make a model for an architect.
I’m currently using dupliframes.
And I’m trying to use also shape key.

But my shape keys only appear in the dupliframes when I animated them.
Can I make them appear in a static way ( like dupliframes should do) ?

http://i37.photobucket.com/albums/e53/karpov77/doc1.jpg

something like that :

…anyone ?.. :expressionless:

No, Im afraid it can’t be done. I answered a similar question in the anim forum. I’m still searching for a way though.

%<

use this script:

#!BPY

#This file is better viewed with a tabspace of 2.

""" Registration info for Blender menus:
Name: 'True Dupliframe'
Blender: 241
Group: 'Object'
Tooltip: 'Apply dupliframe with all modif'
"""
__author__ = "Gabriel Beloin (Gabio)"
__url__ = ("blender", "elysiun")
__version__ = "alpha1"
__bpydoc__ = """\
"""

#History:
#

import Blender
from Blender import Draw,BGL,Object,Scene,NMesh
from Blender.Draw import *
from Blender.BGL import *
from Blender.NMesh import *
	
#-------------------------Init functions-------------------------
def init_dict():
	dict = {}
	dict["start"]	=	0
	dict["stop"]	=	100
	dict["skip"]	=	0

	return(dict)

#-------------------------Global var.-----------------------
#*******Variable
G = init_dict() #Master dict containing all data

#*******Event
NULL					= 0
QUIT					=	1
GO						=	2

#*******UI button var
num_start = Create(G["start"])
num_stop 	= Create(G["stop"])
num_skip 	= Create(G["skip"])

#-------------------------UI-------------------------

def draw():

	global num_start, num_stop, num_skip

	glClear(GL_COLOR_BUFFER_BIT)
	glRasterPos2d(10,10)
	Text("Dupliframe")
	
	num_start	=	Number("start:",NULL,20,20,100,20,num_start.val,1,num_stop.val,"The starting frame")
	num_stop	=	Number("stop:",NULL,20,40,100,20,num_stop.val,num_start.val,30000,"The end frame")
	num_skip	=	Number("skip:",NULL,20,60,100,20,num_skip.val,0,100,"how many frame to skip between duplication")
	Button("Quit",QUIT,20,80,40,20,"Quit")
	Button("Do it",GO,70,80,40,20,"Quit")
	
	
#-------------------------Event-------------------------
	
def event(evt,val):

	if (evt == QKEY and not val):
		Exit()

def bevent(evt):
	global G
	
	if evt == QUIT:
		Exit()
	elif evt == NULL:
		G["start"] = num_start.val
		G["stop"] = num_stop.val
		G["skip"] = num_skip.val
	elif evt == GO:
		dupli()
				
#------------------------Action-------------------------

def dupli():
	obl = Object.GetSelected()
	if not obl[0].getType() == "Mesh":
		PupMenu("Select a Mesh")
	else:
		obj = obl[0]
		Blender.Set("curframe",G["start"])
		x = G["start"]
		while x &lt;= G["stop"]:
			mesh = GetRawFromObject(obj.name)
			obn = PutRaw(mesh)
			obn.setMatrix(obj.getMatrix())
			x = x+G["skip"]+1
			Blender.Set("curframe",x)

Register(draw,event,bevent)

To use it. load it in a text windows, do Alt-p. There you can set start, stop and skip frame. select the object to dupliframe and press do it. To obtain something like you want, animate object moving in space and with the proper morphing at the good time. The script will make a copy of the object for all frame.[/img]

I get this error Gabio:

Using Python version 2.4
Traceback (most recent call last):
  File "TrueDupFrames.py", line 83, in bevent
  File "TrueDupFrames.py", line 96, in dupli
TypeError: expected string argument

%<

I corrected you script Gabio (alpha2)
Add name=obl[0].name in dupli()
Now It’s working pretty good
THANK YOU !



 
#!BPY

#This file is better viewed with a tabspace of 2.

""" Registration info for Blender menus:
Name: 'True Dupliframe'
Blender: 241
Group: 'Object'
Tooltip: 'Apply dupliframe with all modif'
"""
__author__ = "Gabriel Beloin (Gabio)"
__url__ = ("blender", "elysiun")
__version__ = "alpha1"
__bpydoc__ = """\
"""

#History:
#

import Blender
from Blender import Draw,BGL,Object,Scene,NMesh
from Blender.Draw import *
from Blender.BGL import *
from Blender.NMesh import *
   
#-------------------------Init functions-------------------------
def init_dict():
   dict = {}
   dict["start"]   =   0
   dict["stop"]   =   100
   dict["skip"]   =   0

   return(dict)

#-------------------------Global var.-----------------------
#*******Variable
G = init_dict() #Master dict containing all data

#*******Event
NULL               = 0
QUIT               =   1
GO                  =   2

#*******UI button var
num_start = Create(G["start"])
num_stop    = Create(G["stop"])
num_skip    = Create(G["skip"])

#-------------------------UI-------------------------

def draw():

   global num_start, num_stop, num_skip

   glClear(GL_COLOR_BUFFER_BIT)
   glRasterPos2d(10,10)
   Text("Dupliframe")
   
   num_start   =   Number("start:",NULL,20,20,100,20,num_start.val,1,num_stop.val,"The starting frame")
   num_stop   =   Number("stop:",NULL,20,40,100,20,num_stop.val,num_start.val,30000,"The end frame")
   num_skip   =   Number("skip:",NULL,20,60,100,20,num_skip.val,0,100,"how many frame to skip between duplication")
   Button("Quit",QUIT,20,80,40,20,"Quit")
   Button("Do it",GO,70,80,40,20,"Quit")
   
   
#-------------------------Event-------------------------
   
def event(evt,val):

   if (evt == QKEY and not val):
      Exit()

def bevent(evt):
   global G
   
   if evt == QUIT:
      Exit()
   elif evt == NULL:
      G["start"] = num_start.val
      G["stop"] = num_stop.val
      G["skip"] = num_skip.val
   elif evt == GO:
      dupli()
            
#------------------------Action-------------------------

def dupli():
   obl = Object.GetSelected()
   if not obl[0].getType() == "Mesh":
      PupMenu("Select a Mesh")
   else:
      obj = obl[0]
      name =obl[0].name
      Blender.Set("curframe",G["start"])
      x = G["start"]
      while x &lt;= G["stop"]:
         mesh = GetRawFromObject(name)
         obn = PutRaw(mesh)
         obn.setMatrix(obj.getMatrix())
         x = x+G["skip"]+1
         Blender.Set("curframe",x)

Register(draw,event,bevent) 


:smiley:

A right. I corrected this bug. but look like I copied the old version over.
np

I see, don’t need to create a one more variable.
I’m quite new to programming.

That’s really why I love Blender and it’s community, to be able to work with a tool you can complitly custom.Now I can model the architect’s project. I will show them the first tests on monday (That’s so fast ! I made this post on friday ).

thanks a lot Gabio :wink: