Blender 2.5 Smoke; crash at domain set

User-contributed CVS development builds. Please test and give feedback!

Moderators: jesterKing, stiv

Wheels
Posts: 15
Joined: Tue May 25, 2010 10:03 pm
Location: U.S

Postby Wheels » Fri May 28, 2010 4:35 am

well i dont know if this will be any help but when i discovered it it seemed like it might be of interest for this discussion. so i was sitting here brainstorming and i thought to try something i never messed with before. i did a search in my blender folder and found the python script for the "smoke physics" and tried to run the script in the python program.

well i ended up getting an error in the new python window that opened up. unfortunately i am not a coder so i couldnt really go further into it but i figured i might as well mention my new findings here. maybe one of you has the proper coding skill to see if this is worth exploring further.

the only reason i even thought to do this was because of something keffertjuh said in his very first post here. i have andrew prices realistic fire .pdf as well as his Wow Factor book. well i was one of the unlucky ones that got a copy of his Wow Factor book with a bad line of code that made it completely openable so i just thought maybe a similar problem could apply here. he told me there was like 40 of us whose books just had some bad line of stray code that was messed up or not supposed to be there at all.

so in closing sorry for another long winded post but i just thought this was worth looking into. if you want or need some more info let me know and ill see what i can do.

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Fri May 28, 2010 4:46 pm

All those words and yet, we still don't know what the error message was.

keffertjuh
Posts: 64
Joined: Sat Oct 25, 2008 11:54 am

haha

Postby keffertjuh » Fri May 28, 2010 5:15 pm

haha burn!

edit; not a burn, my apologies...
Last edited by keffertjuh on Fri May 28, 2010 9:12 pm, edited 1 time in total.
May the LOL be with you!!!!

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Fri May 28, 2010 8:22 pm

It wasn't a burn. It was just a reminder that saying "I get an error msg" without telling us what it is and expecting help is both unproductive and annoying.

And yes, it *is* a pet peeve of mine - ever since a pre-dawn phone call from the weekend computer operator many years ago.

Wheels
Posts: 15
Joined: Tue May 25, 2010 10:03 pm
Location: U.S

Postby Wheels » Fri May 28, 2010 9:50 pm

Heres the Error:

Traceback (most recent call last):
File "c:\Documents\blender-2.5-alpha2-win32\blender-2.5-alpha2-win32\.blender\scripts\ui\properties_physics_smoke.py", line 20, in <module>
import bpy
ImportError: No module named bpy

like i said before it could be nothing but it could be useful i dont know.

And i only chose not to include it originally incase noone thought it would be worth exploring plus it was late so i was half asleep typing that. next time though ill rethink how i put my posts together srry about that.

keffertjuh
Posts: 64
Joined: Sat Oct 25, 2008 11:54 am

:D

Postby keffertjuh » Tue Jun 01, 2010 5:31 pm

One driver update later and the problem is fixed :P

To find out what your videocard etc is;
start-> run -> type "dxdiag" -> ok/enter
And videocard information will probably be under the second slot

then just go to whichever-manufacturer-belongs-to-your-videocard's site and find the latest driver there

Still no results?
I read updating your directx might help...(also mentioned in the dxdiag, first panel, I got 11)
May the LOL be with you!!!!

Wheels
Posts: 15
Joined: Tue May 25, 2010 10:03 pm
Location: U.S

Postby Wheels » Tue Jun 01, 2010 8:13 pm

Congrats on fixing your problem man. i think im gonna have to go out and get a new comp to fix my problem. i tried those 2 things you listed and my drivers are already up to date and apparently ive been running on directx 11 so im officially stumped. maybe i should just wait to see if the next blender update helps. :? :(

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Tue Jun 01, 2010 9:18 pm

ImportError: No module named bpy


bpy is a built-in module. Are you running this script inside Blender?


apparently ive been running on directx 11


Blender uses OpenGL. It does not use DirectX.

Wheels
Posts: 15
Joined: Tue May 25, 2010 10:03 pm
Location: U.S

Postby Wheels » Wed Jun 02, 2010 12:49 am

bpy is a built-in module. Are you running this script inside Blender?
no i ran the code through the "Python program" and even said that in my earlier post about it. im not completely sure how to use the codes in blender itself or i woulda tried that.

Blender uses OpenGL. It does not use DirectX.
i mentioned using DirectX because keffertjuh mentioned reading that updating DirectX could help.

i still dont know how to tell if my video card actually supports OpenGL but if it doesnt i would assume that since you mention blender runs on it that nothing would work properly on blender if my card didnt use it. my comp uses an Intel(R) G33/G31 Express Chipset Family if anyone knows about that one. or maybe thats not even what i need to be looking at if you know let me know. Thanks

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Wed Jun 02, 2010 1:44 am

no i ran the code through the "Python program" and even said that in my earlier post about it.


Sorry I missed that. This thread has wandered around quite a bit since we started talking about video problems.

Bottom line: Blender scripts MUST be run inside of Blender. You CANNOT run them with the regular Python interpreter.

Wheels
Posts: 15
Joined: Tue May 25, 2010 10:03 pm
Location: U.S

Postby Wheels » Wed Jun 02, 2010 2:50 am

Bottom line: Blender scripts MUST be run inside of Blender. You CANNOT run them with the regular Python interpreter.


ah ok understood. now then i tried doing just that a few seconds ago... im not used to working with the scripts so it took a minute to realize i have to use the "console" window, this time i ran the code in blender and got an error on just about every line and some lines from the very top of the code didnt even show up after pasting which i hope means those lines were problem free.

Oh and so i dont forget i dont want u griping at me over another "unproductive" post so...

Code: import bpy

narrowui = 180


from properties_physics_common import point_cache_ui
from properties_physics_common import effector_weights_ui


class PhysicButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"

def poll(self, context):
ob = context.object
rd = context.scene.render
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)


class PHYSICS_PT_smoke(PhysicButtonsPanel):
bl_label = "Smoke"

def draw(self, context):
layout = self.layout

md = context.smoke
ob = context.object
wide_ui = context.region.width > narrowui

split = layout.split()
split.operator_context = 'EXEC_DEFAULT'

if md:
# remove modifier + settings
split.set_context_pointer("modifier", md)
split.operator("object.modifier_remove", text="Remove")

row = split.row(align=True)
row.prop(md, "render", text="")
row.prop(md, "realtime", text="")

else:
# add modifier
split.operator("object.modifier_add", text="Add").type = 'SMOKE'
if wide_ui:
split.label()

if md:
if wide_ui:
layout.prop(md, "smoke_type", expand=True)
else:
layout.prop(md, "smoke_type", text="")

if md.smoke_type == 'TYPE_DOMAIN':

domain = md.domain_settings

split = layout.split()

col = split.column()
col.label(text="Resolution:")
col.prop(domain, "maxres", text="Divisions")
col.label(text="Particle:")
col.prop(domain, "initial_velocity", text="Initial Velocity")

if wide_ui:
col = split.column()
col.label(text="Behavior:")
col.prop(domain, "alpha")
col.prop(domain, "beta")
col.prop(domain, "dissolve_smoke", text="Dissolve")
sub = col.column()
sub.active = domain.dissolve_smoke
sub.prop(domain, "dissolve_speed", text="Time")
sub.prop(domain, "dissolve_smoke_log", text="Slow")

elif md.smoke_type == 'TYPE_FLOW':

flow = md.flow_settings

split = layout.split()

col = split.column()
col.prop(flow, "outflow")
col.label(text="Particle System:")
col.prop_object(flow, "psys", ob, "particle_systems", text="")

if md.flow_settings.outflow:
if wide_ui:
col = split.column()
else:
if wide_ui:
col = split.column()
col.label(text="Behavior:")
col.prop(flow, "temperature")
col.prop(flow, "density")

#elif md.smoke_type == 'TYPE_COLL':
# layout.separator()


class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
bl_label = "Smoke Groups"
bl_default_closed = True

def poll(self, context):
md = context.smoke
return md and (md.smoke_type == 'TYPE_DOMAIN')

def draw(self, context):
layout = self.layout

group = context.smoke.domain_settings
wide_ui = context.region.width > narrowui

split = layout.split()

col = split.column()
col.label(text="Flow Group:")
col.prop(group, "fluid_group", text="")

#col.label(text="Effector Group:")
#col.prop(group, "eff_group", text="")

if wide_ui:
col = split.column()
col.label(text="Collision Group:")
col.prop(group, "coll_group", text="")


class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
bl_label = "Smoke Cache"
bl_default_closed = True

def poll(self, context):
md = context.smoke
return md and (md.smoke_type == 'TYPE_DOMAIN')

def draw(self, context):
layout = self.layout

domain = context.smoke.domain_settings

layout.label(text="Compression:")
layout.prop(domain, "smoke_cache_comp", expand=True)

md = context.smoke.domain_settings
cache = md.point_cache_low

point_cache_ui(self, context, cache, (cache.baked is False), 0, 1)


class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
bl_label = "Smoke High Resolution"
bl_default_closed = True

def poll(self, context):
md = context.smoke
return md and (md.smoke_type == 'TYPE_DOMAIN')

def draw_header(self, context):
high = context.smoke.domain_settings

self.layout.prop(high, "highres", text="")

def draw(self, context):
layout = self.layout

md = context.smoke.domain_settings
wide_ui = context.region.width > narrowui

split = layout.split()

col = split.column()
col.label(text="Resolution:")
col.prop(md, "amplify", text="Divisions")
col.prop(md, "viewhighres")

if wide_ui:
col = split.column()
col.label(text="Noise Method:")
col.row().prop(md, "noise_type", text="")
col.prop(md, "strength")


class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
bl_label = "Smoke High Resolution Cache"
bl_default_closed = True

def poll(self, context):
md = context.smoke
return md and (md.smoke_type == 'TYPE_DOMAIN') and md.domain_settings.highres

def draw(self, context):
layout = self.layout

domain = context.smoke.domain_settings

layout.label(text="Compression:")
layout.prop(domain, "smoke_cache_high_comp", expand=True)


md = context.smoke.domain_settings
cache = md.point_cache_high

point_cache_ui(self, context, cache, (cache.baked is False), 0, 1)


class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
bl_label = "Smoke Field Weights"
bl_default_closed = True

def poll(self, context):
smoke = context.smoke
return (smoke and smoke.smoke_type == 'TYPE_DOMAIN')

def draw(self, context):
domain = context.smoke.domain_settings
effector_weights_ui(self, context, domain.effector_weights)


classes = [
PHYSICS_PT_smoke,
PHYSICS_PT_smoke_field_weights,
PHYSICS_PT_smoke_cache,
PHYSICS_PT_smoke_highres,
PHYSICS_PT_smoke_groups,
PHYSICS_PT_smoke_cache_highres]


def register():
register = bpy.types.register
for cls in classes:
register(cls)


def unregister():
unregister = bpy.types.unregister
for cls in classes:
unregister(cls)

if __name__ == "__main__":
register()


And heres the...

Errors: >>> col = split.column()
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> col.label(text="Noise Method:")
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> col.row().prop(md, "noise_type", text="")
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> col.prop(md, "strength")
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>>
>>>
>>> class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
... bl_label = "Smoke High Resolution Cache"
... bl_default_closed = True
...
>>> def poll(self, context):
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> md = context.smoke
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> return md and (md.smoke_type == 'TYPE_DOMAIN') and md.domain_settings.highres
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>>
>>> def draw(self, context):
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> layout = self.layout
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>>
>>> domain = context.smoke.domain_settings
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>>
>>> layout.label(text="Compression:")
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>> layout.prop(domain, "smoke_cache_high_comp", expand=True)
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)

>>>
>>>
>>> md = context.smoke.domain_settings
File "<string>", line None
SyntaxError: unexpected indent (<console>, line 1)


Hope someone here understands this stuff more than me :?

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Wed Jun 02, 2010 5:13 am

Actually, what you want is not the console window but to load the script file into a Text Window and execute it there.

See all those lines that say: SyntaxError: unexpected indent? Indentation is critical in Python (nice tutorial at www.python.org). By pasting the code into the console window, you trashed the indentation.

Wheels
Posts: 15
Joined: Tue May 25, 2010 10:03 pm
Location: U.S

Postby Wheels » Wed Jun 02, 2010 5:32 am

alright i just opened the script up in the "text editor" like i assume you were telling me to do. when i ran the script it didnt seem to do anything though... dont know if it wasnt supposed to or if im missing something now though :?

keffertjuh
Posts: 64
Joined: Sat Oct 25, 2008 11:54 am

...

Postby keffertjuh » Wed Jun 02, 2010 1:26 pm

Did you follow a tutorial or just winged it?

Because you might've been doing it wrong...Gotta be sure that's not the cause :P

BTW the directX thing was mentioned for a game, but I figured it'd be useful for Blender as well somehow...but OpenGL is not needed anyways...it's not integrated into that many video cards yet...just a small portion had them when I bought a new computer at the start of the year...
May the LOL be with you!!!!

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Wed Jun 02, 2010 2:38 pm

BTW the directX thing was mentioned for a game,but I figured it'd be useful for Blender as well somehow...but OpenGL is not needed anyways...it's not integrated into that many video cards yet..


Blender uses OpenGL for all its drawing. DirectX is not used because it is specific to a single platform.

Most video cards will do OpenGL nowadays. The question is how well. Video drivers play a big role here.


Return to “Testing Builds”

Who is online

Users browsing this forum: No registered users and 1 guest